本文整理匯總了Java中javax.faces.component.UIComponent.getFacetsAndChildren方法的典型用法代碼示例。如果您正苦於以下問題:Java UIComponent.getFacetsAndChildren方法的具體用法?Java UIComponent.getFacetsAndChildren怎麽用?Java UIComponent.getFacetsAndChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.faces.component.UIComponent
的用法示例。
在下文中一共展示了UIComponent.getFacetsAndChildren方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _gatherTransientComponents
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
static private void _gatherTransientComponents(
UIComponent component, List<UIComponent> componentsToRemove)
{
Iterator<UIComponent> kids = component.getFacetsAndChildren();
while (kids.hasNext())
{
UIComponent kid = kids.next();
// UIXComponentBase doesn't mind transient components
// in its saved state, so don't bother with this.
if (!(component instanceof UIXComponentBase) &&
kid.isTransient())
{
componentsToRemove.add(kid);
}
else
{
_gatherTransientComponents(kid, componentsToRemove);
}
}
}
示例2: _findInsideOf
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
static private UIComponent _findInsideOf(
UIComponent from,
String id)
{
Iterator<UIComponent> kids = from.getFacetsAndChildren();
while (kids.hasNext())
{
UIComponent kid = kids.next();
if (id.equals(kid.getId()))
return kid;
if (!(kid instanceof NamingContainer))
{
UIComponent returned = _findInsideOf(kid, id);
if (returned != null)
return returned;
}
}
return null;
}
示例3: _resetChildren
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void _resetChildren(UIComponent comp)
{
Iterator<UIComponent> kids = comp.getFacetsAndChildren();
while (kids.hasNext())
{
UIComponent kid = kids.next();
if (kid instanceof UIXEditableValue)
{
((UIXEditableValue) kid).resetValue();
RequestContext.getCurrentInstance().addPartialTarget(kid);
}
else if (kid instanceof EditableValueHolder)
{
_resetEditableValueHolder((EditableValueHolder) kid);
RequestContext.getCurrentInstance().addPartialTarget(kid);
}
else if (kid instanceof UIXCollection)
{
((UIXCollection) kid).resetStampState();
RequestContext.getCurrentInstance().addPartialTarget(kid);
}
_resetChildren(kid);
}
}
示例4: _executeBindings
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Execute any "binding" attributes so that a popped view
* is properly set up
*/
@SuppressWarnings("unchecked")
private void _executeBindings(FacesContext context, UIComponent component)
{
ValueExpression expression = component.getValueExpression("binding");
if (expression != null)
expression.setValue(context.getELContext(), component);
Iterator<UIComponent> kids = component.getFacetsAndChildren();
while (kids.hasNext())
_executeBindings(context, kids.next());
}
示例5: _renderChildren
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
private static void _renderChildren(FacesContext context, UIComponent root) throws IOException
{
Iterator<UIComponent> iterator = root.getFacetsAndChildren();
while (iterator.hasNext())
{
UIComponent child = iterator.next();
if (child.isRendered())
child.encodeAll(context);
}
}
示例6: _clearCachedClientIds
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Default implementation of clearing the cached client ids
*/
private static void _clearCachedClientIds(UIComponent component)
{
// clear this component
String id = component.getId();
component.setId(id);
// clear the children
Iterator<UIComponent> allChildren = component.getFacetsAndChildren();
while (allChildren.hasNext())
{
clearCachedClientIds(allChildren.next());
}
}
示例7: findComponentById
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
public static UIComponent findComponentById(UIComponent parent, String id) {
if (id.equals(parent.getId())) {
return parent;
}
Iterator<UIComponent> kids = parent.getFacetsAndChildren();
while (kids.hasNext()) {
UIComponent kid = kids.next();
UIComponent found = findComponentById(kid, id);
if (found != null) {
return found;
}
}
return null;
}
示例8: getRenderedFacetsAndChildren
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Allows the rendered to specify what components should be involved with rendered children
* life-cycle operations and methods.
*
* @param facesContext the faces context
* @param component the component from which to get the rendered facets and children
* @see UIXComponentBase#getRenderedFacetsAndChildren(FacesContext)
* @return A list of components to process as rendered components. Defaults to all facets and
* children of a component
*/
public Iterator<UIComponent> getRenderedFacetsAndChildren(
FacesContext facesContext,
UIComponent component)
{
return component.getFacetsAndChildren();
}