Class LayoutImpl
- All Implemented Interfaces:
Serializable,Layout
- Author:
- Anahide Tchertchian
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected LayoutDefinitionprotected Stringprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected Map<String,Serializable> protected LayoutRow[]protected Stringprotected Stringprotected Stringprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLayoutImpl(String name, String mode, String template, List<LayoutRow> rows, int columns, Map<String, Serializable> properties, String definitionId) LayoutImpl(String name, String mode, String template, Map<String, Widget> widgets, Map<String, Serializable> properties, String definitionId) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintReturns the maximum number of columns.Returns the definition from which this layout instance was generated.Returns the template to use for dev mode.getId()Returns the layout id, unique within the facelet context.getMode()Returns the layout mode.getName()Returns the layout name used to identify it within the layout service.Get properties to use in this mode.getProperty(String name) Returns property with given name in this mode.getRows()Returns the table of widgets.Returns the unique identifier of this widget to be used in tag configuration.Returns the template used to render widgets.getType()Returns the layout type.Returns the layout type category.Gets the value name used to compute widget attributes.Returns widget with given name.Returns a widget map, with widget name as key.booleanReturn true if this layout was generated from configuration on a service, and not generated on-the-fly using dynamic behaviors.voidsetDefinition(LayoutDefinition definition) voidsetDevTemplate(String devTemplate) voidsetDynamic(boolean dynamic) voidSets the layout id, unique within the facelet context.voidsetProperty(String name, Serializable value) Sets property with given name on the layout.voidvoidsetTypeCategory(String typeCategory) voidsetValueName(String valueName) Sets the value name used to compute widget bindings.toString()
-
Field Details
-
id
-
name
-
type
-
typeCategory
-
mode
-
template
-
devTemplate
-
rows
-
widgetMap
-
columns
protected int columns -
properties
-
definitionId
-
valueName
-
dynamic
protected boolean dynamic -
definition
-
-
Constructor Details
-
LayoutImpl
protected LayoutImpl() -
LayoutImpl
public LayoutImpl(String name, String mode, String template, List<LayoutRow> rows, int columns, Map<String, Serializable> properties, String definitionId) - Since:
- 5.5
-
LayoutImpl
public LayoutImpl(String name, String mode, String template, Map<String, Widget> widgets, Map<String, Serializable> properties, String definitionId) - Since:
- 8.1
-
-
Method Details
-
computeWidgetMap
protected void computeWidgetMap() -
getId
Description copied from interface:LayoutReturns the layout id, unique within the facelet context. -
getTagConfigId
Description copied from interface:LayoutReturns the unique identifier of this widget to be used in tag configuration.In JSF, layouts are rendered dynamically and re-use the tag configuration of the tag rendering them when adding handlers to the facelet hierarchy. Since this tag identifier is used to perform some kind of caching on the JSF layer, it needs to change when the layout definition changes, so that JSF components are not mistaken for another one.
This identifier is unique to a given layout definition and always returns the same result given the same layout definition.
- Specified by:
getTagConfigIdin interfaceLayout
-
setId
Description copied from interface:LayoutSets the layout id, unique within the facelet context. -
getName
Description copied from interface:LayoutReturns the layout name used to identify it within the layout service. -
getMode
Description copied from interface:LayoutReturns the layout mode. -
getTemplate
Description copied from interface:LayoutReturns the template used to render widgets.- Specified by:
getTemplatein interfaceLayout
-
getRows
Description copied from interface:LayoutReturns the table of widgets.This list is computed from the
LayoutDefinitionrows.Widgets that are not found are ignored.
-
getColumns
public int getColumns()Description copied from interface:LayoutReturns the maximum number of columns.- Specified by:
getColumnsin interfaceLayout
-
getWidget
Description copied from interface:LayoutReturns widget with given name.Only widgets of the first level are retrieved.
-
getWidgetMap
Description copied from interface:LayoutReturns a widget map, with widget name as key.Only widgets of the first level are retrieved.
- Specified by:
getWidgetMapin interfaceLayout
-
getProperties
Description copied from interface:LayoutGet properties to use in this mode.The way that properties will be mapped to rendered components is managed by the widget type.
- Specified by:
getPropertiesin interfaceLayout
-
getProperty
Description copied from interface:LayoutReturns property with given name in this mode.- Specified by:
getPropertyin interfaceLayout- Parameters:
name- the property name.- Returns:
- the property value or null if not found.
-
setProperty
Description copied from interface:LayoutSets property with given name on the layout. If there is already a property with this name on the layout, it will be overridden.- Specified by:
setPropertyin interfaceLayout- Parameters:
name- the property name.value- the property value or null if not found.
-
getValueName
Description copied from interface:LayoutGets the value name used to compute widget attributes.- Specified by:
getValueNamein interfaceLayout
-
setValueName
Description copied from interface:LayoutSets the value name used to compute widget bindings.- Specified by:
setValueNamein interfaceLayout
-
getType
Description copied from interface:LayoutReturns the layout type. -
setType
- Since:
- 6.0
-
getTypeCategory
Description copied from interface:LayoutReturns the layout type category.- Specified by:
getTypeCategoryin interfaceLayout- Since:
- 6.0
-
setTypeCategory
- Since:
- 6.0
-
toString
-
isDynamic
public boolean isDynamic()Description copied from interface:LayoutReturn true if this layout was generated from configuration on a service, and not generated on-the-fly using dynamic behaviors. -
setDynamic
public void setDynamic(boolean dynamic) -
getDevTemplate
Description copied from interface:LayoutReturns the template to use for dev mode.Is retrieved from layout definition templates, or from layout type templates, using the
BuiltinModes.DEV.- Specified by:
getDevTemplatein interfaceLayout
-
setDevTemplate
-
getDefinition
Description copied from interface:LayoutReturns the definition from which this layout instance was generated.Useful in dev mode to show the corresponding configuration in the UI.
- Specified by:
getDefinitionin interfaceLayout
-
setDefinition
-