myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: incubator-myfaces/src/components/org/apache/myfaces/custom/navmenu/jscookmenu HtmlJSCookMenuRenderer.java
Date Tue, 12 Apr 2005 17:47:51 GMT
schof       2005/04/12 10:47:51

  Modified:    src/components/org/apache/myfaces/custom/navmenu/jscookmenu
                        HtmlJSCookMenuRenderer.java
  Log:
  Fixes MYFACES-182 (Thanks to David Heffelfinger for reporting and fixing.)
  
  Revision  Changes    Path
  1.14      +11 -5     incubator-myfaces/src/components/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java
  
  Index: HtmlJSCookMenuRenderer.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HtmlJSCookMenuRenderer.java	8 Apr 2005 13:05:59 -0000	1.13
  +++ HtmlJSCookMenuRenderer.java	12 Apr 2005 17:47:51 -0000	1.14
  @@ -41,6 +41,9 @@
    * @author Thomas Spiegl (latest modification by $Author$)
    * @version $Revision$ $Date$
    *          $Log$
  + *          Revision 1.14  2005/04/12 17:47:51  schof
  + *          Fixes MYFACES-182 (Thanks to David Heffelfinger for reporting and fixing.)
  + *
    *          Revision 1.13  2005/04/08 13:05:59  schof
    *          Fixes MyFaces-20 (Patch by Martin Bosak)
    *
  @@ -94,7 +97,7 @@
   
           Map parameter = context.getExternalContext().getRequestParameterMap();
           String actionParam = (String)parameter.get(JSCOOK_ACTION_PARAM);
  -        if (actionParam != null)
  +        if (actionParam != null && !actionParam.trim().equals(""))
           {
               String compId = component.getId();
               int idx = actionParam.indexOf(':');
  @@ -250,8 +253,11 @@
                   if (menuItems != null && menuItems.length > 0)
                   {
                       writer.write(",");
  -                    encodeNavigationMenuItems(context, writer, menuItems, 
  -                            uiNavMenuItem.getChildren(), menuId);
  +                    if (uiNavMenuItem != null)
  +                    {
  +                        encodeNavigationMenuItems(context, writer, menuItems, 
  +                                uiNavMenuItem.getChildren(), menuId);
  +                    } 
                   }
               };
               writer.write("]");
  
  
  

Mime
View raw message