public class LayoutTagHandler extends javax.faces.view.facelets.TagHandler
Computes a layout in given facelet context, for given mode and value attributes. The layout can either be computed from a layout definition, or by a layout name, where the layout service will lookup the corresponding definition.
If a template is found for this layout, include the corresponding facelet and use facelet template features to iterate over rows and widgets.
Since 5.6, the layout name attribute also accepts a comma separated list of layout names.
Modifier and Type | Field and Description |
---|---|
protected javax.faces.view.facelets.TagAttribute |
category |
protected javax.faces.view.facelets.TagConfig |
config |
protected javax.faces.view.facelets.TagAttribute |
definition |
protected javax.faces.view.facelets.TagAttribute |
layout
The layout instance to render, instead of resolving it from a name or definition
|
protected javax.faces.view.facelets.TagAttribute |
mode |
protected javax.faces.view.facelets.TagAttribute |
name |
protected String[] |
reservedVarsArray |
protected javax.faces.view.facelets.TagAttribute |
resolveOnly
Parameter used to specify that layout should not be rendered, only resolved and exposed to the context.
|
protected javax.faces.view.facelets.TagAttribute |
selectAllByDefault |
protected javax.faces.view.facelets.TagAttribute |
selectedColumns |
protected javax.faces.view.facelets.TagAttribute |
selectedRows |
protected javax.faces.view.facelets.TagAttribute |
template |
protected javax.faces.view.facelets.TagAttribute |
value |
protected javax.faces.view.facelets.TagAttribute[] |
vars |
Constructor and Description |
---|
LayoutTagHandler(javax.faces.view.facelets.TagConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent) |
protected void |
applyErrorHandler(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent,
FaceletHandlerHelper helper,
String message) |
protected void |
applyLayoutHandler(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent,
FaceletHandlerHelper helper,
WebLayoutManager layoutService,
Layout layoutInstance,
String templateValue,
Map<String,Serializable> additionalProps,
Map<String,javax.el.ValueExpression> vars,
boolean resolveOnly) |
protected javax.faces.view.facelets.FaceletHandler |
getDevFaceletHandler(javax.faces.view.facelets.FaceletContext ctx,
FaceletHandlerHelper helper,
javax.faces.view.facelets.TagConfig config,
Layout layout) |
protected Map<String,javax.el.ValueExpression> |
getVariablesForLayoutBuild(javax.faces.view.facelets.FaceletContext ctx,
String modeValue) |
protected Map<String,javax.el.ValueExpression> |
getVariablesForLayoutRendering(javax.faces.view.facelets.FaceletContext ctx,
WebLayoutManager layoutService,
Layout layoutInstance)
Computes variables for rendering, making available the layout instance and its properties to the context.
|
protected List<String> |
resolveLayoutNames(String nameValue)
Resolves layouts names, splitting on character "," and trimming resulting names, and allowing empty strings if
the whole string is not empty to ease up rendering of layout names using variables.
|
protected final javax.faces.view.facelets.TagConfig config
protected final javax.faces.view.facelets.TagAttribute layout
protected final javax.faces.view.facelets.TagAttribute name
protected final javax.faces.view.facelets.TagAttribute category
protected final javax.faces.view.facelets.TagAttribute definition
protected final javax.faces.view.facelets.TagAttribute mode
protected final javax.faces.view.facelets.TagAttribute value
protected final javax.faces.view.facelets.TagAttribute template
protected final javax.faces.view.facelets.TagAttribute selectedRows
protected final javax.faces.view.facelets.TagAttribute selectedColumns
protected final javax.faces.view.facelets.TagAttribute selectAllByDefault
protected final javax.faces.view.facelets.TagAttribute resolveOnly
protected final javax.faces.view.facelets.TagAttribute[] vars
protected final String[] reservedVarsArray
public LayoutTagHandler(javax.faces.view.facelets.TagConfig config)
public void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent) throws IOException, javax.faces.FacesException, javax.el.ELException
IOException
javax.faces.FacesException
javax.el.ELException
protected List<String> resolveLayoutNames(String nameValue)
For instance, if value is null or empty, will return a single empty layout name "". If value is "," it will
return an empty list, triggering no error for usage like
protected void applyLayoutHandler(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent, FaceletHandlerHelper helper, WebLayoutManager layoutService, Layout layoutInstance, String templateValue, Map<String,Serializable> additionalProps, Map<String,javax.el.ValueExpression> vars, boolean resolveOnly) throws IOException, javax.faces.FacesException, javax.el.ELException
IOException
javax.faces.FacesException
javax.el.ELException
protected Map<String,javax.el.ValueExpression> getVariablesForLayoutBuild(javax.faces.view.facelets.FaceletContext ctx, String modeValue)
protected Map<String,javax.el.ValueExpression> getVariablesForLayoutRendering(javax.faces.view.facelets.FaceletContext ctx, WebLayoutManager layoutService, Layout layoutInstance)
protected void applyErrorHandler(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent, FaceletHandlerHelper helper, String message) throws IOException
IOException
protected javax.faces.view.facelets.FaceletHandler getDevFaceletHandler(javax.faces.view.facelets.FaceletContext ctx, FaceletHandlerHelper helper, javax.faces.view.facelets.TagConfig config, Layout layout)
Copyright © 2015 Nuxeo SA. All rights reserved.