public class StringPropertySelectionModel extends java.lang.Object implements IPropertySelectionModel
IPropertySelectionModel that allows one String from
an array of Strings to be selected as the property.
Uses a simple index number as the value (used to represent the selected String). This assumes that the possible values for the Strings will remain constant between request cycles.
| Constructor and Description |
|---|
StringPropertySelectionModel(java.lang.String[] options)
Standard constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLabel(int index)
Labels match options.
|
java.lang.Object |
getOption(int index)
Returns one possible option that will be assigned to the server-side property.
|
int |
getOptionCount()
Returns the number of possible options.
|
java.lang.String |
getValue(int index)
Values are indexes into the array of options.
|
java.lang.Object |
translateValue(java.lang.String value)
Returns the option corresponding to a value.
|
public StringPropertySelectionModel(java.lang.String[] options)
public int getOptionCount()
IPropertySelectionModelgetOptionCount in interface IPropertySelectionModelpublic java.lang.Object getOption(int index)
IPropertySelectionModelgetOption in interface IPropertySelectionModelpublic java.lang.String getLabel(int index)
getLabel in interface IPropertySelectionModelpublic java.lang.String getValue(int index)
getValue in interface IPropertySelectionModelpublic java.lang.Object translateValue(java.lang.String value)
IPropertySelectionModeltranslateValue in interface IPropertySelectionModel