click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r784179 - /incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
Date Fri, 12 Jun 2009 16:20:28 GMT
Author: sabob
Date: Fri Jun 12 16:20:28 2009
New Revision: 784179

URL: http://svn.apache.org/viewvc?rev=784179&view=rev
Log:
ensure menu is not serialized to disk

Modified:
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java?rev=784179&r1=784178&r2=784179&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
(original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
Fri Jun 12 16:20:28 2009
@@ -20,7 +20,6 @@
 
 import org.apache.click.Page;
 import org.apache.click.extras.control.Menu;
-import org.apache.click.util.Bindable;
 import org.apache.click.util.ClickUtils;
 
 /**
@@ -40,7 +39,7 @@
      * The root menu. Note this transient variable is reinitialized in onInit()
      * to support serialized stateful pages.
      */
-    @Bindable public transient Menu rootMenu;
+    private transient Menu rootMenu;
 
     // ------------------------------------------------------------ Constructor
 
@@ -73,6 +72,15 @@
         super.onInit();
 
         rootMenu = Menu.getRootMenu();
+
+        // Add rootMenu to Page control list. Note: rootMenu is removed in Page
+        // onDestroy() to ensure rootMenu is not Serialized to disk
+        addControl(rootMenu);
+    }
+
+    public void onDestroy() {
+        // Remove menu for when BorderPage is Serialized to disk
+        removeControl(rootMenu);
     }
 
     // --------------------------------------------------------- Public Methods



Mime
View raw message