org.apache.tapestry5.internal.services
Class SelectModelFactoryImpl

java.lang.Object
  extended by org.apache.tapestry5.internal.services.SelectModelFactoryImpl
All Implemented Interfaces:
SelectModelFactory

public class SelectModelFactoryImpl
extends Object
implements SelectModelFactory


Constructor Summary
SelectModelFactoryImpl(PropertyAccess propertyAccess, ValueEncoderSource valueEncoderSource)
           
 
Method Summary
 SelectModel create(List<?> objects, String labelProperty)
          Creates a SelectModel from a list of objects of the same type and a label property name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectModelFactoryImpl

public SelectModelFactoryImpl(PropertyAccess propertyAccess,
                              ValueEncoderSource valueEncoderSource)
Method Detail

create

public SelectModel create(List<?> objects,
                          String labelProperty)
Description copied from interface: SelectModelFactory
Creates a 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.

Specified by:
create in interface SelectModelFactory
Parameters:
objects - objects to create model from
labelProperty - property for the client-side value
Returns:
the model


Copyright © 2003-2012 The Apache Software Foundation.