public interface Widget extends Serializable
 A widget is built from a WidgetDefinition in a given mode.
| Modifier and Type | Method and Description | 
|---|---|
Serializable | 
getControl(String name)
Returns control with given name. 
 | 
Map<String,Serializable> | 
getControls()
Returns controls on this widget. 
 | 
WidgetDefinition | 
getDefinition()
Returns the definition from which this widget instance was generated. 
 | 
FieldDefinition[] | 
getFieldDefinitions()
Returns the list of fields managed by this widget. 
 | 
String | 
getHelpLabel()
Return the help label to use in this mode. 
 | 
String | 
getId()
Returns the widget id, unique within the facelet context. 
 | 
String | 
getLabel()
Returns the label to use in this mode. 
 | 
String | 
getLayoutName()
Returns the layout name. 
 | 
int | 
getLevel()
Returns the widget level in the widget hierarchy. 
 | 
String | 
getMode()
Returns the widget mode. 
 | 
String | 
getName()
Returns the widget name used to identify it within a layout. 
 | 
Map<String,Serializable> | 
getProperties()
Get properties to use in this mode. 
 | 
Serializable | 
getProperty(String name)
Returns property with given name in this mode. 
 | 
List<RenderingInfo> | 
getRenderingInfos()
Returns the list of rendering information. 
 | 
WidgetSelectOption[] | 
getSelectOptions()
Returns the select options for this widget. 
 | 
Widget[] | 
getSubWidgets()
Returns sub widgets. 
 | 
String | 
getTagConfigId()
Returns the unique identifier of this widget to be used in tag configuration. 
 | 
String | 
getType()
Returns the widget type used to render it. 
 | 
String | 
getTypeCategory()
Returns the widget type category. 
 | 
String | 
getValueName()
Gets the value name used to compute tag attributes. 
 | 
boolean | 
isDynamic()
Returns true if this widget was generated from configuration on a service, and not generated on-the-fly using
 dynamic behaviors. 
 | 
boolean | 
isGlobal()
Returns true if the widget is defined globally (as opposed to being held by a layout definition). 
 | 
boolean | 
isHandlingLabels()
Returns true if the widget is handling his own labels display (usual label and help label). 
 | 
boolean | 
isRequired()
Returns true if the widget is required. 
 | 
boolean | 
isTranslated()
Returns true if all labels are messages that need to be translated. 
 | 
void | 
setControl(String name,
          Serializable value)
Sets control with given name and value. 
 | 
void | 
setId(String id)
Sets the widget id, unique within the facelet context. 
 | 
void | 
setProperty(String name,
           Serializable value)
Sets property with given name on the layout. 
 | 
void | 
setValueName(String valueName)
Sets the value name used to compute tag attributes. 
 | 
String getTagConfigId()
Layout#getTagConfigId()}.String getLayoutName()
String getTypeCategory()
String getValueName()
void setValueName(String valueName)
FieldDefinition[] getFieldDefinitions()
String getHelpLabel()
boolean isTranslated()
Defaults to false.
boolean isHandlingLabels()
Defaults to false.
Map<String,Serializable> getProperties()
The way that properties will be mapped to rendered components is managed by the widget type.
Serializable getProperty(String name)
name - the property name.void setProperty(String name, Serializable value)
name - the property name.value - the property value or null if not found.Map<String,Serializable> getControls()
WidgetDefinition.getControls()Serializable getControl(String name)
WidgetDefinition.getControls()void setControl(String name, Serializable value)
WidgetDefinition.getControls()boolean isRequired()
This is a short link for the "required" property, already evaluated from an EL expression (if needed). Defaults to false.
Widget[] getSubWidgets()
int getLevel()
For instance a standard widget will have a level of 0, and its potential subwidgets will have a level of 1.
WidgetSelectOption[] getSelectOptions()
List<RenderingInfo> getRenderingInfos()
Useful for preview management where some configuration needs to be changed: what's changed can be set as rendering information here to be displayed.
boolean isGlobal()
boolean isDynamic()
WidgetDefinition getDefinition()
Useful in dev mode to show the corresponding configuration in the UI.
Copyright © 2019 Nuxeo. All rights reserved.