click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r928168 - /click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
Date Sat, 27 Mar 2010 08:14:57 GMT
Author: sabob
Date: Sat Mar 27 08:14:57 2010
New Revision: 928168

URL: http://svn.apache.org/viewvc?rev=928168&view=rev
Log:
typo

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java?rev=928168&r1=928167&r2=928168&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java Sat Mar 27 08:14:57
2010
@@ -954,7 +954,7 @@ public class Menu extends AbstractContro
                 String childName = child.getName();
                 String menuName = menu.getName();
                 if (childName != null && menuName != null) {
-                    if (childName.equals(menu.getName())) {
+                    if (childName.equals(menuName)) {
                         return true;
                     }
                 }
@@ -964,6 +964,19 @@ public class Menu extends AbstractContro
     }
 
     /**
+     * Return the menu with the given name.
+     *
+     * @param controlName the name of the control to get from the container
+     * @return the named control from the container if found or null otherwise
+     */
+    public Menu findMenuByName(String Name) {
+        if (hasControls()) {
+            return (Control) getControlMap().get(controlName);
+        }
+        return null;
+    }
+
+    /**
      * Find the root menu, or null if no root menu can be found.
      *
      * @return the root menu, or null if no root menu can be found.
@@ -1305,6 +1318,10 @@ public class Menu extends AbstractContro
      * <p/>
      * The returned root menu is always selected.
      *
+     * @deprecated use
+     * {@link MenuFactory#loadRootMenu(java.lang.String, java.lang.String, org.apache.click.extras.security.AccessController,
java.lang.Class)}
+     * instead
+     *
      * @param accessController the menu access controller
      * @return a copy of the application's root Menu
      */



Mime
View raw message