Class StateManagerWrapper

    • Constructor Detail

      • StateManagerWrapper

        public StateManagerWrapper​(StateManager delegate)
    • Method Detail

      • getWrapped

        public StateManager getWrapped()
        Description copied from interface: FacesWrapper
        A class that implements this interface uses this method to return an instance of the class being wrapped.
        Specified by:
        getWrapped in interface FacesWrapper<StateManager>
        Returns:
        the instance of the class being wrapped
      • getViewState

        public String getViewState​(FacesContext context)
        Description copied from class: StateManager
        This method should be called from somewhere when ajax response is created to update the state saving param on client. The place where this method is called is an implementation detail, so there is no references about from where in the spec javadoc.
        Overrides:
        getViewState in class StateManager
        Returns:
      • writeState

        public void writeState​(FacesContext context,
                               Object state)
                        throws IOException
        Description copied from class: StateManager
        Associate the provided state object with the current response being generated.

        When client-side state is enabled, it is expected that method writes the data contained in the state parameter to the response somehow.

        When server-side state is enabled, at most a "token" is expected to be written.

        This method should be overridden by subclasses. It is not abstract because a default implementation is provided that forwards to the old writeState method; this allows subclasses of StateManager written using the Faces1.1 API to continue to work.

        Overrides:
        writeState in class StateManager
        Throws:
        IOException