Name

StateHolder

Synopsis

This interface contains all methods related to saving and restoring view state for a component or an instance attached to a component. All component classes must implement this interface.

Synopsis

Interface name:

javax.faces.component.StateHolder

Extends:

None

Implemented by:

javax.faces.component.UIComponent, javax.faces.convert.DateTimeConverter, javax.faces.convert.NumberConverter, javax.faces.validator.DoubleRangeValidator, javax.faces.validator.LengthValidator, javax.faces.validator.LongRangeValidator

Methods

public boolean isTransient()

Returns true if no state should be saved and restored for this instance.

public void restoreState(javax.faces.context.FacesContext context, Object state)

Restores the state for this instance from the provided value; an Object previously returned by the saveState() method.

public Object saveState(javax.faces.context.FacesContext context)

Returns the state for this instance as an Object to be passed to the restoreState() method when the instance is restored for the next request.

public void setTransient(boolean isTransient)

Sets the transient property value.

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.