Class CdiConverter

    • Constructor Detail

      • CdiConverter

        public CdiConverter()
        Constructor.
      • CdiConverter

        public CdiConverter​(String converterId,
                            Class forClass,
                            Converter delegate)
        Constructor.
        Parameters:
        converterId - the converter id.
        forClass - the for class.
        delegate - the delegate.
    • Method Detail

      • getAsObject

        public Object getAsObject​(FacesContext facesContext,
                                  UIComponent component,
                                  String value)
        Get the object.
        Specified by:
        getAsObject in interface Converter
        Parameters:
        facesContext - the Faces context.
        component - the UI component.
        value - the value.
        Returns:
        the object.
      • getAsString

        public String getAsString​(FacesContext facesContext,
                                  UIComponent component,
                                  Object value)
        Get the string representation.
        Specified by:
        getAsString in interface Converter
        Parameters:
        facesContext - the Faces context.
        component - the UI component.
        value - the value.
        Returns:
        the string.
      • saveState

        public Object saveState​(FacesContext facesContext)
        Save the state.
        Specified by:
        saveState in interface StateHolder
        Parameters:
        facesContext - the Faces context.
        Returns:
        the saved object.
      • restoreState

        public void restoreState​(FacesContext facesContext,
                                 Object state)
        Restore the state.
        Specified by:
        restoreState in interface StateHolder
        Parameters:
        facesContext - the Faces context.
        state - the state.
      • isTransient

        public boolean isTransient()
        Is the converter transient.
        Specified by:
        isTransient in interface StateHolder
        Returns:
        false
      • setTransient

        public void setTransient​(boolean transientValue)
        Set the converter to transient.

        We ignore the call as our proxy is always non-transient.

        Specified by:
        setTransient in interface StateHolder
        Parameters:
        transientValue - whether converter should be set to transient