myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject svn commit: r400035 - /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
Date Fri, 05 May 2006 10:04:00 GMT
Author: jlust
Date: Fri May  5 03:03:58 2006
New Revision: 400035

URL: http://svn.apache.org/viewcvs?rev=400035&view=rev
Log:
Fix for TOMAHAWK-415. Requires testing though

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java?rev=400035&r1=400034&r2=400035&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
Fri May  5 03:03:58 2006
@@ -64,17 +64,20 @@
      */
     public void decode(FacesContext context, UIComponent component)
     {
-        String reqValue = (String) context.getExternalContext()
-                .getRequestParameterMap().get(
-                        HtmlRendererUtils
-                                .getHiddenCommandLinkFieldName(findNestingForm(
-                                        component, context).getFormName()));
-        UIComponent source = context.getViewRoot().findComponent(reqValue);
-        if (source instanceof UINavigationMenuItem)
+        FormInfo nestingForm = findNestingForm(component, context);
+        if (nestingForm != null)
         {
-            UINavigationMenuItem item = (UINavigationMenuItem) source;
-            item.queueEvent(new ActionEvent(item));
+            String fieldName = HtmlRendererUtils.getHiddenCommandLinkFieldName(nestingForm.getFormName());
+            String reqValue = (String) context.getExternalContext()
+            .getRequestParameterMap().get(fieldName);
+            UIComponent source = context.getViewRoot().findComponent(reqValue);
+            if (source instanceof UINavigationMenuItem)
+            {
+                UINavigationMenuItem item = (UINavigationMenuItem) source;
+                item.queueEvent(new ActionEvent(item));
+            }
         }
+        
     }
 
     /**



Mime
View raw message