javax.faces.component
Interface TransientStateHolder

All Known Subinterfaces:
TransientStateHelper
All Known Implementing Classes:
HtmlInputHidden, UIColumn, UICommand, UIComponent, UIComponentBase, UIData, UIForm, UIGraphic, UIInput, UINamingContainer, UIOutcomeTarget, UIOutput, UIPanel, UISelectBoolean, UISelectMany, UISelectOne, UIViewParameter, UIViewRoot

public interface TransientStateHolder

This interface is implemented by classes that need to save state that are expected to be available only on the current request.

An implementor must implement both saveTransientState(javax.faces.context.FacesContext) and restoreTransientState(javax.faces.context.FacesContext, java.lang.Object) methods in this class, since these two methods have a tightly coupled contract between themselves. In other words, if there is an inheritance hierarchy, it is not permissible to have the saveTransientState(javax.faces.context.FacesContext) and restoreTransientState(javax.faces.context.FacesContext, java.lang.Object) methods reside at different levels of the hierarchy.

Since:
2.1
Version:
$Revision: 1187701 $ $Date: 2011-10-22 07:21:54 -0500 (Sat, 22 Oct 2011) $
Author:
Leonardo Uribe (latest modification by $Author: bommel $)

Method Summary
 void restoreTransientState(FacesContext context, Object state)
          Restore the "transient state" using the object passed as state.
 Object saveTransientState(FacesContext context)
          Return the object containing related "transient states".
 

Method Detail

saveTransientState

Object saveTransientState(FacesContext context)

Return the object containing related "transient states". that could be used later to restore the "transient state".

Parameters:
context -
Returns:
object containing transient values
Since:
2.1

restoreTransientState

void restoreTransientState(FacesContext context,
                           Object state)

Restore the "transient state" using the object passed as state.

If the state argument is null clear any previous transient state if any and return.

Parameters:
context -
state - the object containing transient values
Since:
2.1


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.