net.ezcontent.web
Class ObjectPropertySelectionModel
java.lang.Object
net.ezcontent.web.ObjectPropertySelectionModel
- All Implemented Interfaces:
- IPropertySelectionModel
- public class ObjectPropertySelectionModel
- extends Object
- implements IPropertySelectionModel
Modelo de seleccion con objetos genericos. Se le pone una ruta
para devolver los valores.
- Author:
- Enrique Zamudio
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
objetos
private List objetos
labelPath
private String labelPath
valuePath
private String valuePath
ObjectPropertySelectionModel
public ObjectPropertySelectionModel(List objects,
String ognlValuePath,
String ognlLabelPath)
- Crea un nuevo modelo de seleccion que utiliza objetos genericos.
- Parameters:
objects
- La lista de objetos a manejar.ognlValuePath
- La ruta OGNL para obtener el valor de un objeto. Debe ser no-nula.ognlLabelPath
- La ruta OGNL para obtener la etiqueta a desplegar de un objeto. Debe ser un String.
getOptionCount
public int getOptionCount()
- Specified by:
getOptionCount
in interface IPropertySelectionModel
getOption
public Object getOption(int index)
- Specified by:
getOption
in interface IPropertySelectionModel
getLabel
public String getLabel(int index)
- Specified by:
getLabel
in interface IPropertySelectionModel
getValue
public String getValue(int index)
- Specified by:
getValue
in interface IPropertySelectionModel
translateValue
public Object translateValue(String value)
- Specified by:
translateValue
in interface IPropertySelectionModel