You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gr...@apache.org on 2007/08/14 23:17:49 UTC
svn commit: r565916 -
/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
Author: grantsmith
Date: Tue Aug 14 14:17:47 2007
New Revision: 565916
URL: http://svn.apache.org/viewvc?view=rev&rev=565916
Log:
patch applied for TOMAHAWK-1047
Modified:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java?view=diff&rev=565916&r1=565915&r2=565916
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java Tue Aug 14 14:17:47 2007
@@ -89,9 +89,12 @@
for (Iterator it = children.iterator(); it.hasNext(); )
{
UIComponent child = (UIComponent)it.next();
- if (child instanceof HtmlCommandNavigationItem)
+ UIComponent prevItem = (UIComponent)previousRoot.findComponent(child.getClientId(facesContext));
+
+ if (prevItem instanceof HtmlCommandNavigationItem &&
+ child instanceof HtmlCommandNavigationItem)
{
- HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
+ HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)prevItem;
if (previousItem != null)
{
((HtmlCommandNavigationItem)child).setOpen(previousItem.isOpen());