org.chorem.pollen.ui.data
Class GenericSelectModel<T>
java.lang.Object
org.apache.tapestry5.util.AbstractSelectModel
org.chorem.pollen.ui.data.GenericSelectModel<T>
- All Implemented Interfaces:
- org.apache.tapestry5.SelectModel, org.apache.tapestry5.ValueEncoder<T>
public class GenericSelectModel<T>
- extends org.apache.tapestry5.util.AbstractSelectModel
- implements org.apache.tapestry5.ValueEncoder<T>
Generic selection model for a list of Objects. Adadpted from
http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects
use:
@Inject
private PropertyAccess _access;
in your page to ge the PropertyAccess service.
!Notice: you must set the created instance both as model and encoder
parameter for the Select component.
|
Constructor Summary |
GenericSelectModel(java.util.List<T> list,
java.lang.Class<T> clazz,
java.lang.String labelField,
java.lang.String idField,
org.apache.tapestry5.ioc.services.PropertyAccess access)
|
| Methods inherited from class org.apache.tapestry5.util.AbstractSelectModel |
visit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericSelectModel
public GenericSelectModel(java.util.List<T> list,
java.lang.Class<T> clazz,
java.lang.String labelField,
java.lang.String idField,
org.apache.tapestry5.ioc.services.PropertyAccess access)
getOptionGroups
public java.util.List<org.apache.tapestry5.OptionGroupModel> getOptionGroups()
- Specified by:
getOptionGroups in interface org.apache.tapestry5.SelectModel
getOptions
public java.util.List<org.apache.tapestry5.OptionModel> getOptions()
- Specified by:
getOptions in interface org.apache.tapestry5.SelectModel
getList
public java.util.List<T> getList()
toClient
public java.lang.String toClient(T obj)
- Specified by:
toClient in interface org.apache.tapestry5.ValueEncoder<T>
toValue
public T toValue(java.lang.String string)
- Specified by:
toValue in interface org.apache.tapestry5.ValueEncoder<T>
Copyright © 2009 CodeLutin. All Rights Reserved.