本文整理匯總了Java中javax.faces.component.UIComponent.isTransient方法的典型用法代碼示例。如果您正苦於以下問題:Java UIComponent.isTransient方法的具體用法?Java UIComponent.isTransient怎麽用?Java UIComponent.isTransient使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.faces.component.UIComponent
的用法示例。
在下文中一共展示了UIComponent.isTransient方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _getChildren
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Store the structure of all the children.
*/
@SuppressWarnings("unchecked")
private List<Structure> _getChildren(UIComponent component)
{
if (component.getChildCount() == 0)
return null;
List<UIComponent> children = component.getChildren();
ArrayList<Structure> list = new ArrayList<Structure>(children.size());
for(UIComponent child : children)
{
if ((child != null) && !child.isTransient())
{
list.add(new Structure(child));
}
}
if (list.isEmpty())
return null;
return list;
}
示例2: _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);
}
}
}
示例3: _getFacets
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Store the structure of all the facets.
*/
@SuppressWarnings("unchecked")
private List<Object> _getFacets(UIComponent component)
{
Iterator<String> facetNames;
if (component instanceof UIXComponentBase)
{
facetNames = ((UIXComponentBase) component).getFacetNames();
}
else
{
facetNames = component.getFacets().keySet().iterator();
}
if (!facetNames.hasNext())
return null;
Map<String, UIComponent> facets = component.getFacets();
ArrayList<Object> list = new ArrayList<Object>(facets.size() * 2);
while (facetNames.hasNext())
{
String name = facetNames.next();
UIComponent facet = facets.get(name);
if ((facet != null) && !facet.isTransient())
{
list.add(name);
list.add(new Structure(facet));
}
}
if (list.isEmpty())
return null;
return list;
}
示例4: _isVisitable
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* default implementation checking the <code>VisitHint.SKIP_TRANSIENT</code> and
* <code>VisitHint.SKIP_UNRENDERED</code> hints.
*/
private static boolean _isVisitable(VisitContext visitContext, UIComponent component)
{
Collection<VisitHint> hints = visitContext.getHints();
if (hints.contains(VisitHint.SKIP_TRANSIENT) && component.isTransient())
return false;
if (hints.contains(VisitHint.SKIP_UNRENDERED) && !component.isRendered())
return false;
return true;
}