public class WidgetImpl extends Object implements Widget
Constructor and Description |
---|
WidgetImpl(String layoutName,
String name,
String mode,
String type,
String valueName,
FieldDefinition[] fields,
String label,
String helpLabel,
boolean translated,
boolean handlingLabels,
Map<String,Serializable> properties,
boolean required,
Widget[] subWidgets,
int level,
WidgetSelectOption[] selectOptions,
String definitionId,
List<RenderingInfo> renderingInfos) |
WidgetImpl(String layoutName,
String name,
String mode,
String type,
String valueName,
FieldDefinition[] fields,
String label,
String helpLabel,
boolean translated,
Map<String,Serializable> properties,
boolean required,
Widget[] subWidgets,
int level)
|
WidgetImpl(String layoutName,
String name,
String mode,
String type,
String valueName,
FieldDefinition[] fields,
String label,
String helpLabel,
boolean translated,
Map<String,Serializable> properties,
boolean required,
Widget[] subWidgets,
int level,
WidgetSelectOption[] selectOptions)
|
WidgetImpl(String layoutName,
String name,
String mode,
String type,
String valueName,
FieldDefinition[] fields,
String label,
String helpLabel,
boolean translated,
Map<String,Serializable> properties,
boolean required,
Widget[] subWidgets,
int level,
WidgetSelectOption[] selectOptions,
String definitionId) |
WidgetImpl(String layoutName,
String name,
String mode,
String type,
String valueName,
FieldDefinition[] fields,
String label,
String helpLabel,
boolean translated,
Map<String,Serializable> properties,
boolean required,
Widget[] subWidgets,
int level,
WidgetSelectOption[] selectOptions,
String definitionId,
List<RenderingInfo> renderingInfos) |
Modifier and Type | Method and Description |
---|---|
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 |
getValueName()
Gets the value name used to compute tag attributes.
|
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 |
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 |
toString() |
@Deprecated public WidgetImpl(String layoutName, String name, String mode, String type, String valueName, FieldDefinition[] fields, String label, String helpLabel, boolean translated, Map<String,Serializable> properties, boolean required, Widget[] subWidgets, int level)
@Deprecated public WidgetImpl(String layoutName, String name, String mode, String type, String valueName, FieldDefinition[] fields, String label, String helpLabel, boolean translated, Map<String,Serializable> properties, boolean required, Widget[] subWidgets, int level, WidgetSelectOption[] selectOptions)
WidgetImpl(String, String, String, String, String, FieldDefinition[], String, String, boolean, Map, boolean, Widget[], int, WidgetSelectOption[], String)
public WidgetImpl(String layoutName, String name, String mode, String type, String valueName, FieldDefinition[] fields, String label, String helpLabel, boolean translated, Map<String,Serializable> properties, boolean required, Widget[] subWidgets, int level, WidgetSelectOption[] selectOptions, String definitionId)
public WidgetImpl(String layoutName, String name, String mode, String type, String valueName, FieldDefinition[] fields, String label, String helpLabel, boolean translated, Map<String,Serializable> properties, boolean required, Widget[] subWidgets, int level, WidgetSelectOption[] selectOptions, String definitionId, List<RenderingInfo> renderingInfos)
public WidgetImpl(String layoutName, String name, String mode, String type, String valueName, FieldDefinition[] fields, String label, String helpLabel, boolean translated, boolean handlingLabels, Map<String,Serializable> properties, boolean required, Widget[] subWidgets, int level, WidgetSelectOption[] selectOptions, String definitionId, List<RenderingInfo> renderingInfos)
public String getId()
Widget
public String getTagConfigId()
Widget
getTagConfigId
in interface Widget
Layout#getTagConfigId()}.
public void setId(String id)
Widget
public String getLayoutName()
Widget
getLayoutName
in interface Widget
public String getName()
Widget
public String getMode()
Widget
This mode can be different from the layout mode.
public String getType()
Widget
public String getLabel()
Widget
public String getHelpLabel()
Widget
getHelpLabel
in interface Widget
public boolean isTranslated()
Widget
Defaults to false.
isTranslated
in interface Widget
public boolean isHandlingLabels()
Widget
Defaults to false.
isHandlingLabels
in interface Widget
public Map<String,Serializable> getProperties()
Widget
The way that properties will be mapped to rendered components is managed by the widget type.
getProperties
in interface Widget
public Serializable getProperty(String name)
Widget
getProperty
in interface Widget
name
- the property name.public void setProperty(String name, Serializable value)
Widget
setProperty
in interface Widget
name
- the property name.value
- the property value or null if not found.public boolean isRequired()
Widget
This is a short link for the "required" property, already evaluated from an EL expression (if needed). Defaults to false.
isRequired
in interface Widget
public FieldDefinition[] getFieldDefinitions()
Widget
getFieldDefinitions
in interface Widget
public Widget[] getSubWidgets()
Widget
getSubWidgets
in interface Widget
public String getValueName()
Widget
getValueName
in interface Widget
public void setValueName(String valueName)
Widget
setValueName
in interface Widget
public int getLevel()
Widget
For instance a standard widget will have a level of 0, and its potential subwidgets will have a level of 1.
public WidgetSelectOption[] getSelectOptions()
Widget
getSelectOptions
in interface Widget
public List<RenderingInfo> getRenderingInfos()
Widget
Useful for preview management where some configuration needs to be changed: what's changed can be set as rendering information here to be displayed.
getRenderingInfos
in interface Widget
Copyright © 2012 Nuxeo SA. All Rights Reserved.