本文整理匯總了Java中javax.faces.component.UIComponent.encodeEnd方法的典型用法代碼示例。如果您正苦於以下問題:Java UIComponent.encodeEnd方法的具體用法?Java UIComponent.encodeEnd怎麽用?Java UIComponent.encodeEnd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.faces.component.UIComponent
的用法示例。
在下文中一共展示了UIComponent.encodeEnd方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _renderComponent
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void _renderComponent(FacesContext context, UIComponent component)
throws IOException
{
component.encodeBegin(context);
if (component.getRendersChildren())
{
component.encodeChildren(context);
}
else
{
int count = component.getChildCount();
if (count > 0)
{
List<UIComponent> children = component.getChildren();
for (int i = 0; i < count; i++)
{
UIComponent child = children.get(i);
if (child.isRendered())
_renderComponent(context, child);
}
}
}
component.encodeEnd(context);
}
示例2: encodeChildren
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
@Override
public void encodeChildren(FacesContext context,
UIComponent component) throws IOException
{
ResponseWriter out = context.getResponseWriter();
UIComponent month = component.getFacet("month");
month.encodeBegin(context);
month.encodeChildren(context);
month.encodeEnd(context);
out.writeText("\u00a0/\u00a0", null);
UIComponent day = component.getFacet("day");
day.encodeBegin(context);
day.encodeChildren(context);
day.encodeEnd(context);
out.writeText("\u00a0/\u00a0", null);
UIComponent year = component.getFacet("year");
year.encodeBegin(context);
year.encodeChildren(context);
year.encodeEnd(context);
}
示例3: doRenderResponse
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Renders the component tree.
*
* @param context the faces context
* @param component the component tree to render
*
* @throws IOException when the render fails
*/
@SuppressWarnings("unchecked")
protected void doRenderResponse(
FacesContext context,
UIComponent component) throws IOException
{
component.encodeBegin(context);
if (component.getRendersChildren())
{
component.encodeChildren(context);
}
else
{
for(UIComponent child : (List<UIComponent>)component.getChildren())
{
doRenderResponse(context, child);
}
}
component.encodeEnd(context);
}
示例4: encodeChildren
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public void encodeChildren(FacesContext context) throws IOException
{
for(UIComponent child : (List<UIComponent>)getChildren())
{
assert(child.getChildCount() == 0);
assert(child.getFacets().isEmpty());
child.encodeBegin(context);
child.encodeChildren(context);
child.encodeEnd(context);
}
}
示例5: encodeRecursive
import javax.faces.component.UIComponent; //導入方法依賴的package包/類
/**
* Encodes a component and all of its children.
*/
@SuppressWarnings("unchecked")
static public void encodeRecursive(FacesContext context,
UIComponent component)
throws IOException
{
if (component.isRendered())
{
component.encodeBegin(context);
if (component.getRendersChildren())
{
component.encodeChildren(context);
}
else
{
if (component.getChildCount() > 0)
{
for(UIComponent child : (List<UIComponent>)component.getChildren())
{
encodeRecursive(context, child);
}
}
}
component.encodeEnd(context);
}
}