|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.form.StringPropertySelectionModel
public class StringPropertySelectionModel
Implementation of 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 Summary | |
---|---|
StringPropertySelectionModel(String[] options)
Standard constructor. |
Method Summary | |
---|---|
String |
getLabel(int index)
Labels match options. |
Object |
getOption(int index)
Returns one possible option. |
int |
getOptionCount()
Returns the number of possible options. |
String |
getValue(int index)
Values are indexes into the array of options. |
Object |
translateValue(String value)
Returns the option corresponding to a value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringPropertySelectionModel(String[] options)
Method Detail |
---|
public int getOptionCount()
IPropertySelectionModel
getOptionCount
in interface IPropertySelectionModel
public Object getOption(int index)
IPropertySelectionModel
getOption
in interface IPropertySelectionModel
public String getLabel(int index)
getLabel
in interface IPropertySelectionModel
public String getValue(int index)
getValue
in interface IPropertySelectionModel
public Object translateValue(String value)
IPropertySelectionModel
translateValue
in interface IPropertySelectionModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |