org.springframework.webflow.executor.jsf
Class FlowExecutionKeyStateHolder

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.springframework.webflow.executor.jsf.FlowExecutionKeyStateHolder
All Implemented Interfaces:
javax.faces.component.StateHolder

public class FlowExecutionKeyStateHolder
extends javax.faces.component.UIComponentBase

This UIComponent instance can be added to the UIViewRoot before rendering so that the FlowExecution can be properly saved and then restored during the next request's PhaseId.RESTORE_VIEW phase.

Author:
Jeremy Grelle, Keith Donald

Field Summary
static java.lang.String COMPONENT_ID
          Immutable id of the flow execution key component for easier lookup later.
protected  org.apache.commons.logging.Log logger
          Logger, usable by subclasses.
 
Constructor Summary
FlowExecutionKeyStateHolder()
           
 
Method Summary
 java.lang.String getClientId(javax.faces.context.FacesContext context)
           
 java.lang.String getFamily()
           
 java.lang.String getFlowExecutionKey()
          Returns the flow execution key.
 java.lang.String getId()
           
 javax.faces.render.Renderer getRenderer()
           
protected  void handleFlowExecutionAccessException(FlowExecutionAccessException e, javax.faces.context.FacesContext context)
          Hook method to handle a thrown flow execution access exception.
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Restore the FlowExecution from the stored FlowExecutionKey
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Save the just the current FlowExecutionKey value.
 void setFlowExecutionKey(java.lang.String flowExecutionKey)
          Sets the tracked flow execution key used to restore the current flow execution during restoreState(FacesContext, Object).
 void setId(java.lang.String id)
           
 void setTransient(boolean transientValue)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendered, setRendererType, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Logger, usable by subclasses.


COMPONENT_ID

public static final java.lang.String COMPONENT_ID
Immutable id of the flow execution key component for easier lookup later.

See Also:
Constant Field Values
Constructor Detail

FlowExecutionKeyStateHolder

public FlowExecutionKeyStateHolder()
Method Detail

getId

public java.lang.String getId()
Overrides:
getId in class javax.faces.component.UIComponentBase

setId

public void setId(java.lang.String id)
Overrides:
setId in class javax.faces.component.UIComponentBase

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

getRenderer

public javax.faces.render.Renderer getRenderer()

getFlowExecutionKey

public java.lang.String getFlowExecutionKey()
Returns the flow execution key.


setFlowExecutionKey

public void setFlowExecutionKey(java.lang.String flowExecutionKey)
Sets the tracked flow execution key used to restore the current flow execution during restoreState(FacesContext, Object).

Parameters:
flowExecutionKey - the flow execution key

isTransient

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

setTransient

public void setTransient(boolean transientValue)
Specified by:
setTransient in interface javax.faces.component.StateHolder
Overrides:
setTransient in class javax.faces.component.UIComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Restore the FlowExecution from the stored FlowExecutionKey

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

handleFlowExecutionAccessException

protected void handleFlowExecutionAccessException(FlowExecutionAccessException e,
                                                  javax.faces.context.FacesContext context)
Hook method to handle a thrown flow execution access exception. By default this implementation simply rethrows the exception. Subclasses may override this method to redirect to an error page or take some other action.

Parameters:
e - the flow execution access exception
context - the current faces context

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Save the just the current FlowExecutionKey value.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase

getClientId

public java.lang.String getClientId(javax.faces.context.FacesContext context)
Overrides:
getClientId in class javax.faces.component.UIComponentBase


Copyright © 2004-2007. All Rights Reserved.