Class SelectModelFactoryImpl
java.lang.Object
org.apache.tapestry5.internal.services.SelectModelFactoryImpl
- All Implemented Interfaces:
SelectModelFactory
-
Constructor Summary
ConstructorsConstructorDescriptionSelectModelFactoryImpl(PropertyAccess propertyAccess, ValueEncoderSource valueEncoderSource, ValueLabelProvider<Object> valueLabelProvider) -
Method Summary
Modifier and TypeMethodDescriptionCreates aSelectModelfrom a list of objects of the same type.Creates aSelectModelfrom a list of objects of the same type and a label property name.
-
Constructor Details
-
SelectModelFactoryImpl
public SelectModelFactoryImpl(PropertyAccess propertyAccess, ValueEncoderSource valueEncoderSource, ValueLabelProvider<Object> valueLabelProvider)
-
-
Method Details
-
create
Description copied from interface:SelectModelFactoryCreates 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.- Specified by:
createin interfaceSelectModelFactory- Parameters:
objects- objects to create model fromlabelProperty- property for the client-side value- Returns:
- the model
-
create
Description copied from interface:SelectModelFactoryCreates 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.- Specified by:
createin interfaceSelectModelFactory- Parameters:
objects- objects to create model from- Returns:
- the model
-