Class SelectModelFactoryImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.SelectModelFactoryImpl
-
- All Implemented Interfaces:
SelectModelFactory
public class SelectModelFactoryImpl extends Object implements SelectModelFactory
-
-
Constructor Summary
Constructors Constructor Description SelectModelFactoryImpl(PropertyAccess propertyAccess, ValueEncoderSource valueEncoderSource, ValueLabelProvider<Object> valueLabelProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectModel
create(List<?> objects)
Creates aSelectModel
from a list of objects of the same type.SelectModel
create(List<?> objects, String labelProperty)
Creates aSelectModel
from a list of objects of the same type and a label property name.
-
-
-
Constructor Detail
-
SelectModelFactoryImpl
public SelectModelFactoryImpl(PropertyAccess propertyAccess, ValueEncoderSource valueEncoderSource, ValueLabelProvider<Object> valueLabelProvider)
-
-
Method Detail
-
create
public SelectModel create(List<?> objects, String labelProperty)
Description copied from interface:SelectModelFactory
Creates aSelectModel
from 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 existingValueEncoder
for the object type. The value of the label property is used as user-presentable label for the option.- Specified by:
create
in interfaceSelectModelFactory
- Parameters:
objects
- objects to create model fromlabelProperty
- property for the client-side value- Returns:
- the model
-
create
public SelectModel create(List<?> objects)
Description copied from interface:SelectModelFactory
Creates aSelectModel
from a list of objects of the same type. The returned model creates for every object in the list a selectable option and relies on existingValueEncoder
for the object type.- Specified by:
create
in interfaceSelectModelFactory
- Parameters:
objects
- objects to create model from- Returns:
- the model
-
-