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()
ParamHolder
getName
in interface ParamHolder
public void setName(String name)
name
- The parameter name.public Object getLocalValue()
ParamHolder
getLocalValue
in interface ValueHolder
getLocalValue
in interface ParamHolder
public Object getValue()
ParamHolder
Application.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 ValueHolder
getValue
in interface ParamHolder
Converter.getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, Object)
public void setValue(Object value)
setValue
in interface ValueHolder
public Converter getConverter()
getConverter
in interface ValueHolder
public void setConverter(Converter converter)
setConverter
in interface ValueHolder
Copyright © 2012–2014 OmniFaces. All rights reserved.