Package org.apache.tapestry5.services
Interface SelectModelFactory
-
- All Known Implementing Classes:
SelectModelFactoryImpl
public interface SelectModelFactory
Used to create anSelectModel.- Since:
- 5.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SelectModelcreate(java.util.List<?> objects)Creates aSelectModelfrom a list of objects of the same type.SelectModelcreate(java.util.List<?> objects, java.lang.String labelProperty)Creates aSelectModelfrom a list of objects of the same type and a label property name.
-
-
-
Method Detail
-
create
SelectModel create(java.util.List<?> objects, java.lang.String labelProperty)
Creates aSelectModelfrom a list of objects of the same type and a label property name. The returned model creates for every object in the list a selectable option and relies on existingValueEncoderfor the object type. The value of the label property is used as user-presentable label for the option.- Parameters:
objects- objects to create model fromlabelProperty- property for the client-side value- Returns:
- the model
-
create
SelectModel create(java.util.List<?> objects)
Creates aSelectModelfrom a list of objects of the same type. The returned model creates for every object in the list a selectable option and relies on existingValueEncoderfor the object type.- Parameters:
objects- objects to create model from- Returns:
- the model
- Since:
- 5.4
-
-