public interface WebLayoutManager extends LayoutManager
It manages registries of layout definitions and widget types and handles the creation of layouts and widgets instances.
Modifier and Type | Field and Description |
---|---|
static String |
JSF_CATEGORY |
Modifier and Type | Method and Description |
---|---|
Widget |
createWidget(javax.faces.view.facelets.FaceletContext ctx,
String type,
String mode,
String valueName,
List<FieldDefinition> fieldDefinitions,
String label,
String helpLabel,
Boolean translated,
Map<String,Serializable> properties,
Widget[] subWidgets)
Returns a widget computed from given information.
|
Widget |
createWidget(javax.faces.view.facelets.FaceletContext ctx,
String type,
String mode,
String valueName,
Map<String,Serializable> properties,
Widget[] subWidgets)
Deprecated.
|
Widget |
createWidget(javax.faces.view.facelets.FaceletContext ctx,
WidgetDefinition widgetDef,
String mode,
String valueName,
Widget[] subWidgets)
Returns a widget computed from given information.
|
javax.faces.view.facelets.FaceletHandler |
getFaceletHandler(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.view.facelets.TagConfig config,
Widget widget)
Deprecated.
since 5.6: use
getFaceletHandler(FaceletContext, TagConfig, Widget, FaceletHandler) instead |
javax.faces.view.facelets.FaceletHandler |
getFaceletHandler(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.view.facelets.TagConfig config,
Widget widget,
javax.faces.view.facelets.FaceletHandler nextHandler)
Returns the facelet handler for given widget.
|
Layout |
getLayout(javax.faces.view.facelets.FaceletContext ctx,
LayoutDefinition layoutDef,
String mode,
String valueName,
List<String> selectedRows,
boolean selectAllRowsByDefault)
Returns the computed layout for this definition, mode and list of selected rows in given context, or null if the
layout definition is null.
|
Layout |
getLayout(javax.faces.view.facelets.FaceletContext ctx,
String layoutName,
String mode,
String valueName)
Returns the computed layout for this name and mode in given context, or null if no layout with this name is
found.
|
Layout |
getLayout(javax.faces.view.facelets.FaceletContext ctx,
String layoutName,
String mode,
String valueName,
List<String> selectedRows,
boolean selectAllRowsByDefault)
Returns the computed layout for this name, mode and list of selected rows in given context, or null if no layout
with this name is found.
|
Layout |
getLayout(javax.faces.view.facelets.FaceletContext ctx,
String layoutName,
String layoutCategory,
String mode,
String valueName,
List<String> selectedRows,
boolean selectAllRowsByDefault)
Returns the computed layout for this name, category, mode and list of selected rows in given context, or null if
no layout with this name is found.
|
Widget |
getWidget(javax.faces.view.facelets.FaceletContext ctx,
String widgetName,
String widgetCategory,
String layoutMode,
String valueName,
String layoutName)
Returns a widget instance given a name and a category, as it would be computed when defined within a layout.
|
Widget |
getWidget(javax.faces.view.facelets.FaceletContext ctx,
WidgetDefinition widgetDef,
String layoutMode,
String valueName,
String layoutName)
Returns a widget instance given a name and a category, as it would be computed when defined within a layout.
|
WidgetTypeHandler |
getWidgetTypeHandler(String typeName)
Returns the widget type handler for the registered widget type with this type name.
|
WidgetTypeHandler |
getWidgetTypeHandler(String typeCategory,
String typeName)
Returns the widget type handler for the registered widget type with this type name and type category.
|
boolean |
referencePropertyAsExpression(String name,
Serializable value,
String widgetType,
String mode,
String template)
Deprecated.
since 5.7.3, use
referencePropertyAsExpression(String, Serializable, String, String, String, String) instead |
boolean |
referencePropertyAsExpression(String name,
Serializable value,
String widgetType,
String widgetTypeCategory,
String mode,
String template)
Returns true if property with given name and value should be referenced as a value expression.
|
getDefaultStoreCategory, getLayoutDefinition, getLayoutDefinitionNames, getLayoutTypeDefinition, getLayoutTypeDefinitions, getWidgetDefinition, getWidgetType, getWidgetTypeDefinition, getWidgetTypeDefinitions
static final String JSF_CATEGORY
WidgetTypeHandler getWidgetTypeHandler(String typeName) throws WidgetException
If the no widget type is found with this name, return null.
WidgetException
WidgetTypeHandler getWidgetTypeHandler(String typeCategory, String typeName) throws WidgetException
If the no widget type is found with this name, return null.
WidgetException
Layout getLayout(javax.faces.view.facelets.FaceletContext ctx, String layoutName, String mode, String valueName)
When a widget is configured not to be rendered in this mode, the layout will hold a null value instead. As well, when a row does not hold any non-null widget in this mode, the layout will not hold it.
ctx
- the facelet context this layout will be computed in. If context is null, no expressions can be
resolved during computing.layoutName
- the layout definition name.mode
- the mode.valueName
- the value name to use when computing tag attributes.getLayout(FaceletContext, String, String, String, List, boolean)
Layout getLayout(javax.faces.view.facelets.FaceletContext ctx, String layoutName, String mode, String valueName, List<String> selectedRows, boolean selectAllRowsByDefault)
layoutName
- the layout definition name.LayoutManager.getLayoutDefinition(String)
,
getLayout(FaceletContext, LayoutDefinition, String, String, List, boolean)
Layout getLayout(javax.faces.view.facelets.FaceletContext ctx, String layoutName, String layoutCategory, String mode, String valueName, List<String> selectedRows, boolean selectAllRowsByDefault)
layoutName
- the layout definition name.LayoutManager.getLayoutDefinition(String)
,
getLayout(FaceletContext, LayoutDefinition, String, String, List, boolean)
Layout getLayout(javax.faces.view.facelets.FaceletContext ctx, LayoutDefinition layoutDef, String mode, String valueName, List<String> selectedRows, boolean selectAllRowsByDefault)
When a widget is configured not to be rendered in this mode, the layout will hold a null value instead. As well, when a row does not hold any non-null widget in this mode, the layout will not hold it.
If parameter selectedRows is not null, layout rows will be filtered according to this value. If selectedRows is null and parameter selectAllRowsByDefault is true, all rows will be taken into account, even rows marked as not selected by default.
ctx
- the facelet context this layout will be computed in. If context is null, no expressions can be
resolved during computing.layoutDef
- the layout definition instance.mode
- the mode.valueName
- the value name to use when computing tag attributes (useful for fields mapping)selectedRows
- the list of selected rows namesselectAllRowsByDefault
- boolean indicating if all rows should be considered selected by default in case
parameter selectedRows resolves to null.Widget getWidget(javax.faces.view.facelets.FaceletContext ctx, String widgetName, String widgetCategory, String layoutMode, String valueName, String layoutName)
ctx
- the facelet context this widget will be computed in. If context is null, no expressions can be
resolved during computing.widgetName
- the widget namewidgetCategory
- the widget categorylayoutMode
- the pseudo layout modevalueNale
- the value name to use when computing tag attributes (useful for fields mapping)layoutName
- the pseudo layout name (if any)Widget getWidget(javax.faces.view.facelets.FaceletContext ctx, WidgetDefinition widgetDef, String layoutMode, String valueName, String layoutName)
ctx
- the facelet context this widget will be computed in. If context is null, no expressions can be
resolved during computing.widgetDef
- the widget definitionlayoutMode
- the pseudo layout modevalueName
- the value name to use when computing tag attributes (useful for fields mapping)layoutName
- the pseudo layout name (if any)@Deprecated javax.faces.view.facelets.FaceletHandler getFaceletHandler(javax.faces.view.facelets.FaceletContext ctx, javax.faces.view.facelets.TagConfig config, Widget widget)
getFaceletHandler(FaceletContext, TagConfig, Widget, FaceletHandler)
insteadctx
- the facelet context.config
- the tag config, used to hook the handler in the jsf tree.widget
- the computed widget.javax.faces.view.facelets.FaceletHandler getFaceletHandler(javax.faces.view.facelets.FaceletContext ctx, javax.faces.view.facelets.TagConfig config, Widget widget, javax.faces.view.facelets.FaceletHandler nextHandler)
ctx
- the facelet context.config
- the tag config, used to hook the handler in the jsf tree.widget
- the computed widget.nextHandler
- the next handler in the execution chain@Deprecated Widget createWidget(javax.faces.view.facelets.FaceletContext ctx, String type, String mode, String valueName, Map<String,Serializable> properties, Widget[] subWidgets)
ctx
- the facelet context this layout will be computed in. If context is null, no expressions can be
resolved during computing.type
- the widget type name.mode
- the mode.valueName
- the value name to use when computing tag attributes.properties
- optional properties to use when computing the widget.subWidgets
- optional sub widgets for this widget.createWidget(FaceletContext, String, String, String, List, String, String, Boolean, Map, Widget[])
Widget createWidget(javax.faces.view.facelets.FaceletContext ctx, String type, String mode, String valueName, List<FieldDefinition> fieldDefinitions, String label, String helpLabel, Boolean translated, Map<String,Serializable> properties, Widget[] subWidgets)
ctx
- the facelet context this layout will be computed in. If context is null, no expressions can be
resolved during computing.type
- the widget type name.category
- the widget type category.mode
- the mode.valueName
- the value name to use when computing tag attributes.fieldDefinitions
- label
- the widget labelhelpLabel
- the widget help labeltranslated
- if true, the labels will be translatedproperties
- optional properties to use when computing the widget.subWidgets
- optional sub widgets for this widget.Widget createWidget(javax.faces.view.facelets.FaceletContext ctx, WidgetDefinition widgetDef, String mode, String valueName, Widget[] subWidgets)
ctx
- the facelet context this layout will be computed in. If context is null, no expressions can be
resolved during computing.type
- the widget type name.category
- the widget type category.mode
- the mode.valueName
- the value name to use when computing tag attributes.fieldDefinitions
- widgetName
- the widget namelabel
- the widget labelhelpLabel
- the widget help labeltranslated
- if true, the labels will be translatedproperties
- optional properties to use when computing the widget.subWidgets
- optional sub widgets for this widget.@Deprecated boolean referencePropertyAsExpression(String name, Serializable value, String widgetType, String mode, String template)
referencePropertyAsExpression(String, Serializable, String, String, String, String)
insteadAssumes the widget type is in category #JSF_CATEGORY for backward compatibility.
referencePropertyAsExpression(String, Serializable, String, String, String)
boolean referencePropertyAsExpression(String name, Serializable value, String widgetType, String widgetTypeCategory, String mode, String template)
Referencing properties as value expressions makes it possible to resolve this value again when reloading components in ajax for instance, as literal values kept by JSF components are not evaluated again.
But some components wait for a literal value and do not evaluate value expressions, so their properties should not be referenced as value expressions. An extension point on the service makes it possible to declare these properties: by default other properties will be using references.
This method returns false if it finds a matching disabled property ref for given criteria. If any of the given parameters are null, this criterion is ignored, and this looks up any matching (and enabled) contribution.
name
- the property namevalue
- the property valuewidgetType
- the widget type if anywidgetTypeCategory
- the widget type category if anymode
- the widget mode if anytemplate
- the widget template if anyCopyright © 2015 Nuxeo SA. All rights reserved.