Author: dbiatenia
Date: 2007-05-18 11:00:20 -0400 (Fri, 18 May 2007)
New Revision: 808
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
Log:
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
===================================================================
---
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-18
14:58:11 UTC (rev 807)
+++
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-18
15:00:20 UTC (rev 808)
@@ -157,7 +157,7 @@
return styleBuffer.toString();
}
- @Override
+
public String getHideStyle(FacesContext context, UIComponent component) {
// TODO Auto-generated method stub
if (!(component.getParent() instanceof UIPanelMenu)) {
Modified:
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
---
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-05-18
14:58:11 UTC (rev 807)
+++
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-05-18
15:00:20 UTC (rev 808)
@@ -22,6 +22,7 @@
package org.richfaces.renderkit;
import java.io.IOException;
+import java.util.Iterator;
import java.util.Map;
import javax.faces.component.UICommand;
@@ -176,12 +177,14 @@
public boolean isChildrenExpanded(UIComponent component){
if (component.getChildren() != null){
- for(Object child : component.getChildren()){
+ Iterator itr = component.getChildren().iterator();
+ while(itr.hasNext()){
+ UIComponent child = (UIComponent)itr.next();
if(child instanceof UIPanelMenuGroup){
if( ((UIPanelMenuGroup)child).isExpanded() ){
return true;
} else {
- return isChildrenExpanded((UIComponent)child);
+ return isChildrenExpanded(child);
}
}
}