org.apache.myfaces.trinidad.bean
Class SillyStateHolder

java.lang.Object
  extended by org.apache.myfaces.trinidad.bean.SillyStateHolder
All Implemented Interfaces:
javax.faces.component.StateHolder

public class SillyStateHolder
extends Object
implements javax.faces.component.StateHolder

A silly StateHolder implementation that will increment itself by one when its state is saved, and one more when its state is restored. So, after a round trip, the original instance will be at 1, and the new instance at 2.


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

Constructor Detail

SillyStateHolder

public SillyStateHolder()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface javax.faces.component.StateHolder


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.