public class SelectModelFactoryImpl extends Object implements SelectModelFactory
Constructor and Description |
---|
SelectModelFactoryImpl(PropertyAccess propertyAccess,
ValueEncoderSource valueEncoderSource,
ValueLabelProvider<Object> valueLabelProvider) |
Modifier and Type | Method and Description |
---|---|
SelectModel |
create(List<?> objects)
Creates a
SelectModel from a list of objects of the same type. |
SelectModel |
create(List<?> objects,
String labelProperty)
Creates a
SelectModel from a list of objects of the same type and a label property name. |
public SelectModelFactoryImpl(PropertyAccess propertyAccess, ValueEncoderSource valueEncoderSource, ValueLabelProvider<Object> valueLabelProvider)
public SelectModel create(List<?> objects, String labelProperty)
SelectModelFactory
SelectModel
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 existing
ValueEncoder
for the object type. The value of the label property is used as user-presentable label for the option.create
in interface SelectModelFactory
objects
- objects to create model fromlabelProperty
- property for the client-side valuepublic SelectModel create(List<?> objects)
SelectModelFactory
SelectModel
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 existing
ValueEncoder
for the object type.create
in interface SelectModelFactory
objects
- objects to create model from${project.version} - Copyright © 2003-2015 The Apache Software Foundation.