|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPropertySelectionModel
Used by a PropertySelection
to provide labels for options.
The component requires three different representations of each option:
PropertySelection
.
The option is usually either an Enum
(see EnumPropertySelectionModel
)
or some kind of business object. The label is often a property of the
option object (for example, for a list of customers, it could be the customer name).
It should be easy to convert between the value and the option. It may simply be an index into an array. For business objects, it is often the primary key of the object, expressed as a String.
Method Summary | |
---|---|
String |
getLabel(int index)
Returns the label for an option. |
Object |
getOption(int index)
Returns one possible option. |
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>. |
Object |
translateValue(String value)
Returns the option corresponding to a value. |
Method Detail |
---|
int getOptionCount()
Object getOption(int index)
String getLabel(int index)
String getValue(int index)
Object translateValue(String value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |