net.ezcontent.web
Class ObjectPropertySelectionModel

java.lang.Object
  extended bynet.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

Field Summary
private  String labelPath
           
private static org.apache.commons.logging.Log log
           
private  List objetos
           
private  String valuePath
           
 
Constructor Summary
ObjectPropertySelectionModel(List objects, String ognlValuePath, String ognlLabelPath)
          Crea un nuevo modelo de seleccion que utiliza objetos genericos.
 
Method Summary
 String getLabel(int index)
           
 Object getOption(int index)
           
 int getOptionCount()
           
 String getValue(int index)
           
 Object translateValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

objetos

private List objetos

labelPath

private String labelPath

valuePath

private String valuePath
Constructor Detail

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.
Method Detail

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