protected void encodeTabContent(FacesContext context, Ribbon ribbon, Tab tab, boolean active) throws IOException { ResponseWriter writer = context.getResponseWriter(); String contentClass = active ? Ribbon.ACTIVE_TAB_CONTENT_CLASS : Ribbon.INACTIVE_TAB_CONTENT_CLASS; int childCount = tab.getChildCount(); writer.startElement("div", ribbon); writer.writeAttribute("id", tab.getClientId(context), null); writer.writeAttribute("class", contentClass, null); if (childCount > 0) { writer.startElement("ul", ribbon); writer.writeAttribute("class", Ribbon.GROUPS_CLASS, null); List<UIComponent> children = tab.getChildren(); for (int i = 0; i < childCount; i++) { UIComponent child = children.get(i); if (child instanceof RibbonGroup && child.isRendered()) { RibbonGroup group = (RibbonGroup) child; group.encodeAll(context); } } writer.endElement("ul"); } writer.endElement("div"); }
protected void encodeTabContent(FacesContext context, Ribbon ribbon, Tab tab, boolean active) throws IOException { ResponseWriter writer = context.getResponseWriter(); String contentClass = active ? Ribbon.ACTIVE_TAB_CONTENT_CLASS : Ribbon.INACTIVE_TAB_CONTENT_CLASS; int childCount = tab.getChildCount(); writer.startElement("div", ribbon); writer.writeAttribute("id", tab.getClientId(context), null); writer.writeAttribute("class", contentClass, null); if (childCount > 0) { writer.startElement("ul", ribbon); writer.writeAttribute("class", Ribbon.GROUPS_CLASS, null); List<UIComponent> children = tab.getChildren(); for (int i = 0; i < childCount; i++) { UIComponent child = children.get(i); if (child instanceof RibbonGroup && child.isRendered()) { RibbonGroup group = (RibbonGroup) child; group.encodeAll(context); } } writer.endElement("ul"); } writer.endElement("div"); }