-
- All Known Subinterfaces:
- TransientStateHelper
- All Known Implementing Classes:
- HtmlBody, HtmlColumn, HtmlCommandButton, HtmlCommandLink, HtmlDataTable, HtmlDoctype, HtmlForm, HtmlGraphicImage, HtmlHead, HtmlInputFile, HtmlInputHidden, HtmlInputSecret, HtmlInputText, HtmlInputTextarea, HtmlMessage, HtmlMessages, HtmlOutcomeTargetButton, HtmlOutcomeTargetLink, HtmlOutputFormat, HtmlOutputLabel, HtmlOutputLink, HtmlOutputText, HtmlPanelGrid, HtmlPanelGroup, HtmlSelectBooleanCheckbox, HtmlSelectManyCheckbox, HtmlSelectManyListbox, HtmlSelectManyMenu, HtmlSelectOneListbox, HtmlSelectOneMenu, HtmlSelectOneRadio, UIColumn, UICommand, UIComponent, UIComponentBase, UIData, UIForm, UIGraphic, UIInput, UIMessage, UIMessages, UINamingContainer, UIOutcomeTarget, UIOutput, UIPanel, UIParameter, UISelectBoolean, UISelectItem, UISelectItems, UISelectMany, UISelectOne, UIViewAction, UIViewParameter, UIViewRoot
public interface TransientStateHolder
This interface is implemented by classes that need to save state that is expected to be available only within the scope of the current request.
An implementor must implement both
saveTransientState(javax.faces.context.FacesContext)
andrestoreTransientState(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 thesaveTransientState(javax.faces.context.FacesContext)
andrestoreTransientState(javax.faces.context.FacesContext, java.lang.Object)
methods reside at different levels of the hierarchy.An example of transient state is the "submitted" property on forms.
- Since:
- 2.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description 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 isnull
clear any previous transient state if any and return.- Parameters:
context
-state
- the object containing transient values- Since:
- 2.1
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/faces/component/TransientStateHolder.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.