Class ParamValue<V>

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

public class ParamValue<V> extends Object implements 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:
  • Method Details

    • 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 Faces context!

      Returns:
      The converted value.
    • getSubmittedValue

      public String getSubmittedValue()
      Returns the submitted value. If this is a multi-valued parameter, then this returns only the first one.
      Returns:
      The submitted value.
    • getSubmittedValues

      public String[] getSubmittedValues()
      Returns the submitted values. If this is a multi-valued parameter, then this returns all of them. Since 3.8, any modifications to the array do not anymore affect the original array.
      Returns:
      The submitted values.
    • getClientId

      public String getClientId(FacesContext context)
      Returns the param's client ID. In case Param.globalMessage() returns true then it returns null, else UIComponentBase.getClientId(FacesContext).
      Parameters:
      context - The involved faces context.
      Returns:
      The param's client ID.
      Since:
      4.5