[richfaces-svn-commits] JBoss Rich Faces SVN: r5183 - branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Jan 8 10:44:16 EST 2008


Author: akushunin
Date: 2008-01-08 10:44:16 -0500 (Tue, 08 Jan 2008)
New Revision: 5183

Modified:
   branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
Log:
RF-1825

Modified: branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
===================================================================
--- branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java	2008-01-08 15:41:29 UTC (rev 5182)
+++ branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java	2008-01-08 15:44:16 UTC (rev 5183)
@@ -24,6 +24,7 @@
 
 import java.io.IOException;
 import java.util.Iterator;
+import java.util.List;
 
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
@@ -59,7 +60,14 @@
 		String contentStyle = (String) toolBarGroup.getToolBar().getAttributes().get("contentStyle");
 		
 		if (component.getChildCount() > 0) {
-			for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
+			List children = component.getChildren();
+			for (Iterator iter = children.iterator(); iter.hasNext();) {
+				UIComponent child = (UIComponent) iter.next();
+				if(!child.isRendered()){
+					iter.remove();
+				}
+			}
+			for (Iterator it = children.iterator(); it.hasNext();) {
 				UIComponent child = (UIComponent) it.next();
 				writer.startElement("td", component);
 				writer.writeAttribute("class", "dr-toolbar-int rich-toolbar-item " + contentClass +" "+styleClass, null);
@@ -71,6 +79,7 @@
 				if (it.hasNext()) {
 					insertSeparatorIfNeed(writer, facesContext, toolBarGroup);
 				}				
+				
 			}
 		}		
 	}




More information about the richfaces-svn-commits mailing list