|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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. |
|
StringPropertySelectionModel(String[] options,
boolean[] disabled)
Standard constructor. |
Method Summary | |
---|---|
String |
getLabel(int index)
Labels match options. |
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. |
String |
getValue(int index)
Values are indexes into the array of options. |
boolean |
isDisabled(int index)
Used to help rendering of options that should be marked with the html disabled
attribute. |
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)
public StringPropertySelectionModel(String[] options, boolean[] disabled)
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 boolean isDisabled(int index)
IPropertySelectionModel
disabled
attribute.
isDisabled
in interface IPropertySelectionModel
index
- The option to check.
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 |