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,
WidgetDefinition widgetDef,
String mode,
String valueName,
Widget[] subWidgets)
Returns a widget computed from given information.
|
Layout |
getLayout(javax.faces.view.facelets.FaceletContext ctx,
LayoutConversionContext lctx,
String conversionCat,
LayoutDefinition layoutDef,
String mode,
String valueName,
List<String> selectedRows,
boolean selectAllRowsByDefault)
Returns a layout with conversion.
|
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,
LayoutConversionContext lctx,
String conversionCat,
WidgetDefinition widgetDef,
String layoutMode,
String valueName,
String layoutName)
Returns a widget with conversion.
|
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(javax.faces.view.facelets.TagConfig config,
String typeCategory,
String typeName)
Returns the widget type handler for the registered widget type with this type name and type category.
|
WidgetTypeHandler |
getWidgetTypeHandler(javax.faces.view.facelets.TagConfig config,
Widget widget)
Returns the widget type handler for the registered widget.
|
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(javax.faces.view.facelets.TagConfig config, String typeCategory, String typeName) throws WidgetException
If no widget type is found with this name, returns null.
WidgetException
WidgetTypeHandler getWidgetTypeHandler(javax.faces.view.facelets.TagConfig config, Widget widget) throws WidgetException
If widget is null or its widget type is unknown, returns 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.Layout getLayout(javax.faces.view.facelets.FaceletContext ctx, LayoutConversionContext lctx, String conversionCat, LayoutDefinition layoutDef, String mode, String valueName, List<String> selectedRows, boolean selectAllRowsByDefault)
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 modevalueName
- 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)Widget getWidget(javax.faces.view.facelets.FaceletContext ctx, LayoutConversionContext lctx, String conversionCat, WidgetDefinition widgetDef, String layoutMode, String valueName, String layoutName)
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.mode
- the mode.valueName
- the value name to use when computing tag attributes.fieldDefinitions
- the field definitionslabel
- 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.widgetDef
- the widget definition.mode
- the mode.valueName
- the value name to use when computing tag attributes.subWidgets
- optional sub widgets for this widget.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 © 2018 Nuxeo. All rights reserved.