public class SimpleParam extends Object implements ParamHolder
ParamHolder interface. Ultimately, this class
can be used as a simple key-value pair holder (parameter name-value) which uses an explicit/implicit JSF converter
to convert the object value to string.| Constructor and Description |
|---|
SimpleParam()
Default constructor.
|
SimpleParam(String name,
Object value)
Construct a simple param with name and value.
|
SimpleParam(String name,
Object value,
Converter converter)
Construct a simple param with name, value and converter.
|
| Modifier and Type | Method and Description |
|---|---|
Converter |
getConverter() |
Object |
getLocalValue()
Returns the original, unconverted value of the parameter.
|
String |
getName()
Returns the name of the parameter.
|
Object |
getValue()
Returns the converted value of the parameter.
|
void |
setConverter(Converter converter) |
void |
setName(String name)
Sets the parameter name.
|
void |
setValue(Object value) |
public SimpleParam()
public SimpleParam(String name, Object value)
name - The parameter name.value - The parameter value.public String getName()
ParamHoldergetName in interface ParamHolderpublic void setName(String name)
name - The parameter name.public Object getLocalValue()
ParamHoldergetLocalValue in interface ValueHoldergetLocalValue in interface ParamHolderpublic Object getValue()
ParamHolderApplication.createConverter(Class), passing the value's class, then return the result of
Converter.getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, Object),
otherwise return the original value of the parameter.getValue in interface ValueHoldergetValue in interface ParamHolderConverter.getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, Object)public void setValue(Object value)
setValue in interface ValueHolderpublic Converter getConverter()
getConverter in interface ValueHolderpublic void setConverter(Converter converter)
setConverter in interface ValueHolder