org.omnifaces.cdi.param
Class ParamValue<V>

java.lang.Object
  extended by org.omnifaces.cdi.param.ParamValue<V>
Type Parameters:
V - The type of the actual value this class is wrapping.
All Implemented Interfaces:
java.io.Serializable

public class ParamValue<V>
extends java.lang.Object
implements java.io.Serializable

The type that's injected via the Param qualifier.

This acts as a wrapper for the actual value that is retrieved from the request and optionally converted.

Author:
Arjan Tijms
See Also:
Serialized Form

Constructor Summary
ParamValue(java.lang.String submittedValue, Param requestParameter, java.lang.Class<?> targetType, V value)
           
 
Method Summary
 java.lang.String getSubmittedValue()
           
 V getValue()
          Gets the converted version of the value that was retrieved from the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamValue

public ParamValue(java.lang.String submittedValue,
                  Param requestParameter,
                  java.lang.Class<?> targetType,
                  V value)
Method Detail

getValue

public V getValue()
Gets the converted version of the value that was retrieved from the request.

Note: if this instance was injected into a passivating scope and passivation has indeed taken place and the converted value was not serializable, this will attempt to reconvert the submitted value again. Conversion can only be done when in a JSF context!

Returns:
the converter value

getSubmittedValue

public java.lang.String getSubmittedValue()