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)
SelectModelFactorySelectModel 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 SelectModelFactoryobjects - objects to create model fromlabelProperty - property for the client-side valuepublic SelectModel create(List<?> objects)
SelectModelFactorySelectModel 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 SelectModelFactoryobjects - objects to create model from5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.