click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r927043 - in /click/trunk/click: build/checkstyle-suppressions.xml examples/src/org/apache/click/examples/page/BorderPage.java
Date Wed, 24 Mar 2010 13:03:42 GMT
Author: medgar
Date: Wed Mar 24 13:03:42 2010
New Revision: 927043

URL: http://svn.apache.org/viewvc?rev=927043&view=rev
Log:
Menu refactoring to use MenuFactory pattern, added support for loading arbitary attributes
e.g. as visible and enabled from the XML.

Modified:
    click/trunk/click/build/checkstyle-suppressions.xml
    click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java

Modified: click/trunk/click/build/checkstyle-suppressions.xml
URL: http://svn.apache.org/viewvc/click/trunk/click/build/checkstyle-suppressions.xml?rev=927043&r1=927042&r2=927043&view=diff
==============================================================================
--- click/trunk/click/build/checkstyle-suppressions.xml (original)
+++ click/trunk/click/build/checkstyle-suppressions.xml Wed Mar 24 13:03:42 2010
@@ -121,6 +121,10 @@
               lines="915"/>
 
 	<!-- Static Variable Name -->              
+              
+    <suppress checks="StaticVariableName"
+              files="MenuFactory.java"
+              lines="58,61"/>
 
     <suppress checks="StaticVariableName"
               files="MockRequest.java"

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java?rev=927043&r1=927042&r2=927043&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java Wed Mar
24 13:03:42 2010
@@ -20,6 +20,7 @@ package org.apache.click.examples.page;
 
 import org.apache.click.Page;
 import org.apache.click.extras.control.Menu;
+import org.apache.click.extras.control.MenuFactory;
 import org.apache.click.util.ClickUtils;
 
 /**
@@ -71,10 +72,11 @@ public class BorderPage extends Page {
     public void onInit() {
         super.onInit();
 
-        rootMenu = Menu.getRootMenu();
+        MenuFactory menuFactory = new MenuFactory();
+        rootMenu = menuFactory.getRootMenu();
 
         // Add rootMenu to Page control list. Note: rootMenu is removed in Page
-        // onDestroy() to ensure rootMenu is not Serialized to disk
+        // onDestroy() to ensure rootMenu is not serialized
         addControl(rootMenu);
     }
 
@@ -83,7 +85,7 @@ public class BorderPage extends Page {
      */
     @Override
     public void onDestroy() {
-        // Remove menu for when BorderPage is Serialized to disk
+        // Remove menu for when BorderPage is serialized
         if (rootMenu != null) {
             removeControl(rootMenu);
         }



Mime
View raw message