You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/03/15 17:37:14 UTC

svn commit: r754689 - /incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java

Author: sabob
Date: Sun Mar 15 16:37:13 2009
New Revision: 754689

URL: http://svn.apache.org/viewvc?rev=754689&view=rev
Log:
cache context

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

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java?rev=754689&r1=754688&r2=754689&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java Sun Mar 15 16:37:13 2009
@@ -541,9 +541,10 @@
      * @return true if the user is in one of the menu roles, or false otherwise
      */
     public boolean isUserInRoles() {
+        Context context = getContext();
         for (Iterator i = getRoles().iterator(); i.hasNext();) {
             String rolename = (String) i.next();
-            if (getContext().getRequest().isUserInRole(rolename)) {
+            if (context.getRequest().isUserInRole(rolename)) {
                 return true;
             }
         }