Interface Layout
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
LayoutImpl
public interface Layout extends Serializable
Layout interface.A layout is a group of
Widgetinstances, built from aLayoutDefinitionin a given mode.- Author:
- Anahide Tchertchian
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetColumns()Returns the maximum number of columns.LayoutDefinitiongetDefinition()Returns the definition from which this layout instance was generated.StringgetDevTemplate()Returns the template to use for dev mode.StringgetId()Returns the layout id, unique within the facelet context.StringgetMode()Returns the layout mode.StringgetName()Returns the layout name used to identify it within the layout service.Map<String,Serializable>getProperties()Get properties to use in this mode.SerializablegetProperty(String name)Returns property with given name in this mode.LayoutRow[]getRows()Returns the table of widgets.StringgetTagConfigId()Returns the unique identifier of this widget to be used in tag configuration.StringgetTemplate()Returns the template used to render widgets.StringgetType()Returns the layout type.StringgetTypeCategory()Returns the layout type category.StringgetValueName()Gets the value name used to compute widget attributes.WidgetgetWidget(String name)Returns widget with given name.Map<String,Widget>getWidgetMap()Returns a widget map, with widget name as key.booleanisDynamic()Return true if this layout was generated from configuration on a service, and not generated on-the-fly using dynamic behaviors.voidsetId(String id)Sets the layout id, unique within the facelet context.voidsetProperty(String name, Serializable value)Sets property with given name on the layout.voidsetValueName(String valueName)Sets the value name used to compute widget bindings.
-
-
-
Method Detail
-
getId
String getId()
Returns the layout id, unique within the facelet context.
-
getTagConfigId
String getTagConfigId()
Returns 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.
- Since:
- 5.4.2
-
setId
void setId(String id)
Sets the layout id, unique within the facelet context.
-
getName
String getName()
Returns the layout name used to identify it within the layout service.
-
getType
String getType()
Returns the layout type.- Since:
- 6.0
-
getTypeCategory
String getTypeCategory()
Returns the layout type category.- Since:
- 6.0
-
getMode
String getMode()
Returns the layout mode.
-
getTemplate
String getTemplate()
Returns the template used to render widgets.
-
getRows
LayoutRow[] getRows()
Returns the table of widgets.This list is computed from the
LayoutDefinitionrows.Widgets that are not found are ignored.
-
getColumns
int getColumns()
Returns the maximum number of columns.
-
getWidget
Widget getWidget(String name)
Returns widget with given name.Only widgets of the first level are retrieved.
- Since:
- 5.2M4
-
getWidgetMap
Map<String,Widget> getWidgetMap()
Returns a widget map, with widget name as key.Only widgets of the first level are retrieved.
- Since:
- 5.2M4
-
getProperties
Map<String,Serializable> getProperties()
Get properties to use in this mode.The way that properties will be mapped to rendered components is managed by the widget type.
- Since:
- 5.3.1
-
getProperty
Serializable getProperty(String name)
Returns property with given name in this mode.- Parameters:
name- the property name.- Returns:
- the property value or null if not found.
- Since:
- 5.3.1
-
setProperty
void setProperty(String name, Serializable value)
Sets property with given name on the layout. If there is already a property with this name on the layout, it will be overridden.- Parameters:
name- the property name.value- the property value or null if not found.- Since:
- 5.3.2
-
getValueName
String getValueName()
Gets the value name used to compute widget attributes.- Since:
- 5.7
-
setValueName
void setValueName(String valueName)
Sets the value name used to compute widget bindings.- Since:
- 5.7
-
isDynamic
boolean isDynamic()
Return true if this layout was generated from configuration on a service, and not generated on-the-fly using dynamic behaviors.- Since:
- 6.0
-
getDevTemplate
String getDevTemplate()
Returns the template to use for dev mode.Is retrieved from layout definition templates, or from layout type templates, using the
BuiltinModes.DEV.- Since:
- 6.0
-
getDefinition
LayoutDefinition getDefinition()
Returns the definition from which this layout instance was generated.Useful in dev mode to show the corresponding configuration in the UI.
- Since:
- 6.0
-
-