|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.form.EnumPropertySelectionModel
public class EnumPropertySelectionModel
Implementation of a property model that works off of native java enum types.
The enum label/values are all translated by calling Enum.toString() on your individual enum types, so it may be a good idea to provide a toString() method in your Enums if the types aren't what you would prefer to display.
| Constructor Summary | |
|---|---|
EnumPropertySelectionModel(Enum[] set)
|
|
| Method Summary | |
|---|---|
String |
getLabel(int index)
Returns the label for an option. |
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)
Returns a String used to represent the option in the HTML (as the value of an <option> or <input type=radio>. |
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 EnumPropertySelectionModel(Enum[] set)
| Method Detail |
|---|
public String getLabel(int index)
getLabel in interface IPropertySelectionModelpublic Object getOption(int index)
getOption in interface IPropertySelectionModelpublic int getOptionCount()
getOptionCount in interface IPropertySelectionModelpublic String getValue(int index)
getValue in interface IPropertySelectionModelpublic boolean isDisabled(int index)
IPropertySelectionModeldisabled
attribute.
isDisabled in interface IPropertySelectionModelindex - The option to check.
public Object translateValue(String value)
translateValue in interface IPropertySelectionModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||