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


Java UIComponent.encodeAll方法代碼示例

本文整理匯總了Java中javax.faces.component.UIComponent.encodeAll方法的典型用法代碼示例。如果您正苦於以下問題:Java UIComponent.encodeAll方法的具體用法?Java UIComponent.encodeAll怎麽用?Java UIComponent.encodeAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.faces.component.UIComponent的用法示例。


在下文中一共展示了UIComponent.encodeAll方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: visit

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
public VisitResult visit(
  VisitContext context,
  UIComponent  target)
{
  try
  {
    // we have the subtree we want, render it
    target.encodeAll(context.getFacesContext());
  }
  catch (IOException ioe)
  {
    // launder the IOException as a FacesException, we'll unwrap this later
    throw new FacesException(ioe);
  }

  PartialPageContext pprContext = RenderingContext.getCurrentInstance().getPartialPageContext();

  // if we finished rendering all of the destired targets, return that we are
  // done.  Otherwise, reject this subtree so that we don't traverse into it, since
  // we have already rendered all of the targets in it
  if (pprContext.areAllTargetsProcessed())
    return VisitResult.COMPLETE;
  else
    return VisitResult.REJECT;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:26,代碼來源:PanelPartialRootRenderer.java

示例2: encodeChildren

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
 * Renders the children in their raw form.
 * There is no Renderer for this component because it has no
 * visual representation or any sort of layout for its children.
 * @param context the FacesContext
 * @throws IOException if there is an error encoding the children
 */
@Override
public void encodeChildren(FacesContext context) throws IOException
{
  if (context == null)
    throw new NullPointerException();

  if (!isRendered())
    return;

  if (getChildCount() > 0)
  {
    for(UIComponent child : (List<UIComponent>)getChildren())
    {
      child.encodeAll(context);
    }
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:25,代碼來源:UIXGroupTemplate.java

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

示例4: encodeComponentResources

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
 * Hook for rendering the component resources for the <code>target</code>.
 * @param context Current <code>FacesContext</code> object for this request.
 * @param target The target for the resources (e.g. head/body/form)
 *
 * @throws IOException
 */
protected final void encodeComponentResources(
  FacesContext context,
  String       target
  ) throws IOException
{
  if(target != null)
  {
    UIViewRoot viewRoot = context.getViewRoot();
    for(UIComponent componentResource : viewRoot.getComponentResources(context, target))
    {
      componentResource.encodeAll(context);
    }
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:22,代碼來源:CoreRenderer.java

示例5: encodeChild

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
 * Hook for encoding a child;  this assumes that isRendered()
 * has already been called. (RenderUtils.encodeRecursive()
 * can be used if you don't need that check.)
 * =-=AEW Ugh.
 */
@SuppressWarnings("unchecked")
protected void encodeChild(
  FacesContext context,
  UIComponent  child
  ) throws IOException
{
  child.encodeAll(context);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:15,代碼來源:CoreRenderer.java

示例6: __encodeRecursive

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
 * render a component. this is called by renderers whose
 * getRendersChildren() return true.
 * @deprecated {@link UIComponent#encodeAll(FacesContext)} should be used instead of this method
 */
@Deprecated
void __encodeRecursive(FacesContext context, UIComponent component)
  throws IOException
{
  component.encodeAll(context);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:12,代碼來源:UIXComponentBase.java

示例7: encodeChildren

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
 * Only render the currently active facet.
 */
@Override
public void encodeChildren(FacesContext context)
  throws IOException
{
  UIComponent facet = _getFacet();
  if (facet != null)
  {
    facet.encodeAll(context);
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:14,代碼來源:UIXSwitcherTemplate.java

示例8: encodeChildren

import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
 * Repeatedly render the children as many times as needed.
 */
@Override
public void encodeChildren(final FacesContext context)
  throws IOException
{
  if (!isRendered())
    return;
  
  // if this is the table there will be a rendererType:
  if (getRendererType() != null)
  {
    Renderer renderer = getRenderer(context);
    if (renderer != null)
    {
      renderer.encodeChildren(context, this);
    }
  }
  else // this is not the table. it must be the iterator
  {
    Runner runner = new IndexedRunner(context)
    {
      @Override
      protected void process(
        UIComponent                kid,
        ComponentProcessingContext cpContext
        ) throws IOException
      {
        kid.encodeAll(context);
      }
    };
    runner.run();
    Exception exp = runner.getException();
    if (exp != null)
    {
      if (exp instanceof RuntimeException)
        throw (RuntimeException) exp;

      if (exp instanceof IOException)
        throw (IOException) exp;
      throw new IllegalStateException(exp);
    }
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:46,代碼來源:UIXIteratorTemplate.java


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