Class WidgetSelectOptionImpl
- java.lang.Object
-
- org.nuxeo.ecm.platform.forms.layout.api.impl.WidgetSelectOptionImpl
-
- All Implemented Interfaces:
Serializable
,WidgetSelectOption
public class WidgetSelectOptionImpl extends Object implements WidgetSelectOption
- Since:
- 5.4.2
- Author:
- Anahide Tchertchian
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Serializable
itemDisabled
protected String
itemLabel
protected Serializable
itemRendered
protected String
itemValue
protected Map<String,String>
labels
protected Serializable
value
protected String
var
-
Constructor Summary
Constructors Modifier Constructor Description protected
WidgetSelectOptionImpl()
WidgetSelectOptionImpl(Serializable value, String var, String itemLabel, String itemValue)
WidgetSelectOptionImpl(Serializable value, String var, String itemLabel, String itemValue, Serializable itemDisabled, Serializable itemRendered)
WidgetSelectOptionImpl(String itemLabel, String itemValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WidgetSelectOption
clone()
boolean
equals(Object obj)
Serializable
getItemDisabled()
Returns the disabled behaviour for the select option.String
getItemLabel()
Returns the item label for the select option.String
getItemLabel(String locale)
Getter to handle l10n localization of select options.Map<String,String>
getItemLabels()
Getter to handle l10n localization of select options.Serializable
getItemRendered()
Returns the rendered behaviour for the select option.String
getItemValue()
Returns the item value for the select option.String
getTagConfigId()
Returns the unique identifier of this select option to be used in tag configuration.Serializable
getValue()
Returns the value representing the option.String
getVar()
Returns the var representing the value returned byWidgetSelectOption.getValue()
void
setItemLabels(Map<String,String> labels)
-
-
-
Field Detail
-
value
protected Serializable value
-
var
protected String var
-
itemLabel
protected String itemLabel
-
itemValue
protected String itemValue
-
itemDisabled
protected Serializable itemDisabled
-
itemRendered
protected Serializable itemRendered
-
-
Constructor Detail
-
WidgetSelectOptionImpl
protected WidgetSelectOptionImpl()
-
WidgetSelectOptionImpl
public WidgetSelectOptionImpl(Serializable value, String var, String itemLabel, String itemValue)
-
WidgetSelectOptionImpl
public WidgetSelectOptionImpl(Serializable value, String var, String itemLabel, String itemValue, Serializable itemDisabled, Serializable itemRendered)
-
-
Method Detail
-
getValue
public Serializable getValue()
Description copied from interface:WidgetSelectOption
Returns the value representing the option.This value is optional when using static label and values, it can be useful to use it in conjunction with the
WidgetSelectOption.getVar()
method to retrieve the id and label from the object.- Specified by:
getValue
in interfaceWidgetSelectOption
-
getVar
public String getVar()
Description copied from interface:WidgetSelectOption
Returns the var representing the value returned byWidgetSelectOption.getValue()
This value can be used in the potential EL expressions returned by
WidgetSelectOption.getItemLabel()
,WidgetSelectOption.getItemValue()
,WidgetSelectOption.getItemDisabled()
andWidgetSelectOption.getItemRendered()
.- Specified by:
getVar
in interfaceWidgetSelectOption
-
getItemLabel
public String getItemLabel()
Description copied from interface:WidgetSelectOption
Returns the item label for the select option.This can be an EL expression if
WidgetSelectOption.getValue()
andWidgetSelectOption.getVar()
return a non-null value.- Specified by:
getItemLabel
in interfaceWidgetSelectOption
-
getItemLabel
public String getItemLabel(String locale)
Description copied from interface:WidgetSelectOption
Getter to handle l10n localization of select options.- Specified by:
getItemLabel
in interfaceWidgetSelectOption
-
getItemLabels
public Map<String,String> getItemLabels()
Description copied from interface:WidgetSelectOption
Getter to handle l10n localization of select options.- Specified by:
getItemLabels
in interfaceWidgetSelectOption
-
getItemValue
public String getItemValue()
Description copied from interface:WidgetSelectOption
Returns the item value for the select option.This can be an EL expression if
WidgetSelectOption.getValue()
andWidgetSelectOption.getVar()
return a non-null value.- Specified by:
getItemValue
in interfaceWidgetSelectOption
-
getItemDisabled
public Serializable getItemDisabled()
Description copied from interface:WidgetSelectOption
Returns the disabled behaviour for the select option.This value can either be an EL expression that should resolve to a boolean value, either a string representing a boolean ("true" or "false") either a Boolean value.
- Specified by:
getItemDisabled
in interfaceWidgetSelectOption
-
getItemRendered
public Serializable getItemRendered()
Description copied from interface:WidgetSelectOption
Returns the rendered behaviour for the select option.This value can either be an EL expression that should resolve to a boolean value, either a string representing a boolean ("true" or "false") either a Boolean value.
- Specified by:
getItemRendered
in interfaceWidgetSelectOption
-
getTagConfigId
public String getTagConfigId()
Description copied from interface:WidgetSelectOption
Returns the unique identifier of this select option to be used in tag configuration.- Specified by:
getTagConfigId
in interfaceWidgetSelectOption
- See Also:
Layout.getTagConfigId()
-
clone
public WidgetSelectOption clone()
- Specified by:
clone
in interfaceWidgetSelectOption
- Overrides:
clone
in classObject
-
-