當前位置: 首頁>>代碼示例>>Java>>正文


Java UIComponent.isTransient方法代碼示例

本文整理匯總了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;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:26,代碼來源:Structure.java

示例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);
    }
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:22,代碼來源:StateManagerImpl.java

示例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;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:38,代碼來源:Structure.java

示例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;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:17,代碼來源:UIXComponent.java


注:本文中的javax.faces.component.UIComponent.isTransient方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。