SourceForge.net Logo

de.mindmatters.faces.component
Class GenericStateHolder

java.lang.Object
  extended byde.mindmatters.faces.component.GenericStateHolder
All Implemented Interfaces:
StateHolder

public class GenericStateHolder
extends java.lang.Object
implements StateHolder

This class should be used as superclass for classes that need to save their state between requests.

A subclass must not override both saveState(javax.faces.context.FacesContext) and restoreState(javax.faces.context.FacesContext, java.lang.Object) methods in this class, since this class serializes/deserializes it's state in a generic way (by accessing the declared fields directly within a class hierarchy). Fields to serialize/deserialize must be non-transient and non-static.

Author:
Andreas Kuhrwahl
See Also:
StateHolderStateBuilder.saveState(FacesContext), StateHolderStateBuilder.restoreState(FacesContext, Object)

Constructor Summary
GenericStateHolder()
           
 
Method Summary
 boolean isTransient()
          
 void restoreState(FacesContext context, java.lang.Object state)
          
 java.lang.Object saveState(FacesContext context)
          
 void setTransient(boolean newTransientValue)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericStateHolder

public GenericStateHolder()
Method Detail

saveState

public final java.lang.Object saveState(FacesContext context)

Specified by:
saveState in interface StateHolder

restoreState

public final void restoreState(FacesContext context,
                               java.lang.Object state)

Specified by:
restoreState in interface StateHolder

isTransient

public final boolean isTransient()

Specified by:
isTransient in interface StateHolder

setTransient

public final void setTransient(boolean newTransientValue)

Specified by:
setTransient in interface StateHolder

SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG