本文整理匯總了Java中javax.faces.component.UIComponent.getFacetCount方法的典型用法代碼示例。如果您正苦於以下問題:Java UIComponent.getFacetCount方法的具體用法?Java UIComponent.getFacetCount怎麽用?Java UIComponent.getFacetCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.faces.component.UIComponent
的用法示例。
在下文中一共展示了UIComponent.getFacetCount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: invokeVisitCallback
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
@Override
public VisitResult invokeVisitCallback(UIComponent component, VisitCallback callback)
{
if (component instanceof UIXColumn)
{
if (component.getFacetCount() > 0)
{
// visit the facet children without filtering for just UIXColumn children
for (UIComponent facetChild : component.getFacets().values())
{
if (UIXComponent.visitTree(getWrapped(), facetChild, callback))
return VisitResult.COMPLETE;
}
// visit the indexed children, recursively looking for more columns
for (UIComponent child : component.getChildren())
{
if (UIXComponent.visitTree(this, child, callback))
return VisitResult.COMPLETE;
}
}
}
// at this point, we either have already manually processed the UIXColumn's children, or
// the component wasn't a UIXColumn and shouldn't be processed
return VisitResult.REJECT;
}