click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1023460 - /click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java
Date Sun, 17 Oct 2010 11:26:21 GMT
Author: sabob
Date: Sun Oct 17 11:26:21 2010
New Revision: 1023460

URL: http://svn.apache.org/viewvc?rev=1023460&view=rev
Log:
Remove the page state when the last control state is removed. CLK-715

Modified:
    click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java

Modified: click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java?rev=1023460&r1=1023459&r2=1023460&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java (original)
+++ click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Sun Oct 17 11:26:21
2010
@@ -2591,11 +2591,16 @@ public class ClickUtils {
         if (pageMap != null) {
             Object pop = pageMap.remove(controlName);
 
-            // Check if control state was emoved
-            if (pop != null) {
-                // If control state was removed, set session attribute to force
-                // session replication in a cluster
-                context.setSessionAttribute(resourcePath, pageMap);
+            if (pageMap.isEmpty()) {
+                // If this was the last state for the page, remove the page state map
+                context.removeSessionAttribute(resourcePath);
+            } else {
+                // Check if control state was emoved
+                if (pop != null) {
+                    // If control state was removed, set session attribute to force
+                    // session replication in a cluster
+                    context.setSessionAttribute(resourcePath, pageMap);
+                }
             }
         }
     }



Mime
View raw message