/** * @param context * @param processAction */ private void processColumns(FacesContext context, int processAction) { for (Iterator it = getChildren().iterator(); it.hasNext();) { UIComponent child = (UIComponent) it.next(); if (child instanceof UIColumns) { process(context, child, processAction); } } }
/** * @see javax.faces.component.UIData#encodeEnd(javax.faces.context.FacesContext) */ public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); for (Iterator iter = getChildren().iterator(); iter.hasNext();) { UIComponent component = (UIComponent) iter.next(); if (component instanceof UIColumns) { ((UIColumns) component).encodeTableEnd(context); } } }
/** * @return the index coresponding to the given column name. */ protected int columnNameToIndex(String columnName) { int index = 0; for (Iterator iter = getChildren().iterator(); iter.hasNext();) { UIComponent aChild = (UIComponent) iter.next(); if (aChild instanceof UIColumn) { UIComponent headerFacet = ((UIColumn) aChild).getHeader(); if (headerFacet != null && headerFacet instanceof HtmlCommandSortHeader) { HtmlCommandSortHeader sortHeader = (HtmlCommandSortHeader) headerFacet; if (columnName != null && columnName.equals(sortHeader.getColumnName())) return index; } } index += 1; } return -1; }
/** * Invoke the specified phase on all facets of all UIColumn children of this component. Note that no methods are * called on the UIColumn child objects themselves. * * @param context * is the current faces context. * @param processAction * specifies a JSF phase: decode, validate or update. */ private void processColumnFacets(FacesContext context, int processAction) { for (Iterator childIter = getChildren().iterator(); childIter.hasNext();) { UIComponent child = (UIComponent) childIter.next(); if (child instanceof UIColumn) { if (!child.isRendered()) { //Column is not visible continue; } for (Iterator facetsIter = child.getFacets().values() .iterator(); facetsIter.hasNext();) { UIComponent facet = (UIComponent) facetsIter.next(); process(context, facet, processAction); } } } }
protected Object saveDescendantComponentStates() { if (!getFacets().isEmpty()) { UIComponent detailStampFacet = getFacet(DETAIL_STAMP_FACET_NAME); if (detailStampFacet != null) { return saveDescendantComponentStates(new _DetailStampFacetAndChildrenIterator(detailStampFacet, getChildren()), false); } } return super.saveDescendantComponentStates(); }
protected void restoreDescendantComponentStates(Object state) { if (!getFacets().isEmpty()) { UIComponent detailStampFacet = getFacet(DETAIL_STAMP_FACET_NAME); if (detailStampFacet != null) { restoreDescendantComponentStates(new _DetailStampFacetAndChildrenIterator(detailStampFacet, getChildren()), state, false); return; } } super.restoreDescendantComponentStates(state); }
break; for (Iterator it = getChildren().iterator(); it.hasNext();)
for (Iterator iter = getChildren().iterator(); iter.hasNext();)
for (Iterator iter = getChildren().iterator(); iter.hasNext();) for (Iterator iter = getChildren().iterator(); iter.hasNext();)