Class CmsBuiltinPreference.SelectOptions
- java.lang.Object
-
- org.opencms.configuration.preferences.CmsBuiltinPreference.SelectOptions
-
- Enclosing class:
- CmsBuiltinPreference
public static class CmsBuiltinPreference.SelectOptions extends java.lang.Object
A bean representing a set of select options.
-
-
Constructor Summary
Constructors Constructor Description SelectOptions(java.util.List<java.lang.String> options, java.util.List<java.lang.String> values, int selectedIndex)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getOptions()
Gets the select option labels.int
getSelectedIndex()
Gets the selected index.java.util.List<java.lang.String>
getValues()
Gets the select widget values.java.lang.String
toClientSelectWidgetConfiguration()
Creates a configuration string for client-side select widgets from the options.
-
-
-
Constructor Detail
-
SelectOptions
public SelectOptions(java.util.List<java.lang.String> options, java.util.List<java.lang.String> values, int selectedIndex)
Creates a new instance.- Parameters:
options
- the option labelsvalues
- the option valuesselectedIndex
- the currently selected index
-
-
Method Detail
-
getOptions
public java.util.List<java.lang.String> getOptions()
Gets the select option labels.- Returns:
- the select option labels
-
getSelectedIndex
public int getSelectedIndex()
Gets the selected index.- Returns:
- the selected index
-
getValues
public java.util.List<java.lang.String> getValues()
Gets the select widget values.- Returns:
- the select widget values
-
toClientSelectWidgetConfiguration
public java.lang.String toClientSelectWidgetConfiguration()
Creates a configuration string for client-side select widgets from the options.- Returns:
- the widget configuration string
-
-