|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISelectModel
Same as IPropertySelectionModel in Tapestry 4.x. Implementations of this interface are used to create html-presentable
ways to select one (or many) objects from a collection of objects. How this works:
First the ISelectModel is used to render a set of <option> tags. (pseudo code)
for (int i=0; i < selectModel.getOptioncount(); i++) { <option value="selectModel.getValue(i)">selectModel.getLabel(i)</option> }When a form is submitted with the value from the selected option tag, its then translated to the selected object with a call to translateValue(valueFromFormSubmit);
Method Summary | |
---|---|
java.lang.String |
getLabel(int index)
Returns the label to use in the html-presentation for a given index. |
java.util.Collection |
getObjects()
|
int |
getOptionCount()
Returns the total number of objects. |
java.lang.String |
getValue(int index)
Returns the String value that identifies the object in a html form. |
java.lang.Object |
translateValue(java.lang.String value)
Translates the given String value (from form submit) to the corresponding Object. |
Method Detail |
---|
int getOptionCount()
java.lang.String getLabel(int index)
index
-
java.lang.String getValue(int index)
index
-
java.lang.Object translateValue(java.lang.String value)
value
-
java.util.Collection getObjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |