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 Fri, 29 Apr 2005 15:20:25 GMT
schof       2005/04/29 08:20:25

  Modified:    src/components/org/apache/myfaces/custom/navmenu/jscookmenu
                        HtmlJSCookMenuRenderer.java
  Log:
  Fixes MYFACE-196.  Patch by Martin Bosak
  
  Revision  Changes    Path
  1.16      +10 -4     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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HtmlJSCookMenuRenderer.java	13 Apr 2005 13:52:01 -0000	1.15
  +++ HtmlJSCookMenuRenderer.java	29 Apr 2005 15:20:25 -0000	1.16
  @@ -34,6 +34,7 @@
   import javax.faces.event.ActionEvent;
   import javax.faces.webapp.UIComponentTag;
   import java.io.IOException;
  +import java.util.ArrayList;
   import java.util.List;
   import java.util.Map;
   
  @@ -41,6 +42,9 @@
    * @author Thomas Spiegl (latest modification by $Author$)
    * @version $Revision$ $Date$
    *          $Log$
  + *          Revision 1.16  2005/04/29 15:20:25  schof
  + *          Fixes MYFACE-196.  Patch by Martin Bosak
  + *
    *          Revision 1.15  2005/04/13 13:52:01  schof
    *          Fixes MYFACES-185 (patch submitted by Martin Bosak)
    *
  @@ -198,9 +202,8 @@
               NavigationMenuItem item = (NavigationMenuItem)items[i];
               Object tempObj = null;
               UINavigationMenuItem uiNavMenuItem = null;
  -            try {
  +            if (i < uiNavMenuItemList.size()) {
                   tempObj = uiNavMenuItemList.get(i);
  -            } catch (IndexOutOfBoundsException  e) {
               }
               if (tempObj != null) {
                   if (tempObj instanceof UINavigationMenuItem) {
  @@ -264,7 +267,10 @@
                       {
                           encodeNavigationMenuItems(context, writer, menuItems, 
                                   uiNavMenuItem.getChildren(), menuId);
  -                    } 
  +                    } else {
  +                        encodeNavigationMenuItems(context, writer, menuItems, 
  +                                new ArrayList(1), menuId);
  +                    }
                   }
               };
               writer.write("]");
  
  
  

Mime
View raw message