JSF-Spring

de.mindmatters.faces.lifecycle
Class LifecycleImpl

java.lang.Object
  extended by javax.faces.lifecycle.Lifecycle
      extended by de.mindmatters.faces.lifecycle.LifecycleImpl

public final class LifecycleImpl
extends Lifecycle

Lifecycle manages the processing of the entire lifecycle of a particular JavaServer Faces request. It is responsible for executing all of the phases that have been defined by the JavaServer Faces Specification, in the specified order, unless otherwise directed by activities that occurred during the execution of each phase.

This implemetation delegates the execution of each phase to an instance of Phase. At least a Lifecycle should execute phases as follows:

Phase default implementation
RESTORE_VIEW RestoreViewPhase
APPLY_REQUEST_VALUES ApplyRequestValuesPhase
PROCESS_VALIDATIONS ProcessValidationsPhase
UPDATE_MODEL_VALUES UpdateModelValuesPhase
INVOKE_APPLICATION InvokeApplicationPhase
RENDER_RESPONSE RenderResponsePhase

Author:
Andreas Kuhrwahl
See Also:
Phase, Phase.execute(FacesContext)

Field Summary
static java.lang.String JSF_SPRING_LIFECYCLE_ID
          The lifecycle-id of the Lifecycle which processes the entire lifecycle of a particular JavaServer Faces request mapped against the FacesDispatcherServlet (which integrates SpringMVC into JSF).
protected  org.apache.commons.logging.Log log
          For logging.
 
Constructor Summary
LifecycleImpl(Phase[] executionPhases, Phase renderResponsePhase)
          Creates a lifecycle with the given executionPhases and renderResponsePhase.
 
Method Summary
 void addPhaseListener(PhaseListener listener)
          
static Lifecycle createDefaultLifecycle()
          Factory method creating the default Lifecycle for a particular JavaServer Faces request.
 void execute(FacesContext context)
          
 PhaseListener[] getPhaseListeners()
          
 void removePhaseListener(PhaseListener listener)
          
 void render(FacesContext context)
          
 void setExecutionPhases(Phase[] executionPhases)
          Sets the phases to execute.
 void setRenderResponsePhase(Phase renderResponsePhase)
          Sets the render-response phase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSF_SPRING_LIFECYCLE_ID

public static final java.lang.String JSF_SPRING_LIFECYCLE_ID
The lifecycle-id of the Lifecycle which processes the entire lifecycle of a particular JavaServer Faces request mapped against the FacesDispatcherServlet (which integrates SpringMVC into JSF).

See Also:
Constant Field Values

log

protected final org.apache.commons.logging.Log log
For logging.

Constructor Detail

LifecycleImpl

public LifecycleImpl(Phase[] executionPhases,
                     Phase renderResponsePhase)
Creates a lifecycle with the given executionPhases and renderResponsePhase.

Parameters:
executionPhases - phases to execute
renderResponsePhase - for rendering
Method Detail

createDefaultLifecycle

public static Lifecycle createDefaultLifecycle()
Factory method creating the default Lifecycle for a particular JavaServer Faces request.

Returns:
the default Lifecycle
See Also:
LifecycleFactory.DEFAULT_LIFECYCLE

execute

public void execute(FacesContext context)

Specified by:
execute in class Lifecycle

render

public void render(FacesContext context)

Specified by:
render in class Lifecycle

addPhaseListener

public void addPhaseListener(PhaseListener listener)

Specified by:
addPhaseListener in class Lifecycle

getPhaseListeners

public PhaseListener[] getPhaseListeners()

Specified by:
getPhaseListeners in class Lifecycle

removePhaseListener

public void removePhaseListener(PhaseListener listener)

Specified by:
removePhaseListener in class Lifecycle

setExecutionPhases

public void setExecutionPhases(Phase[] executionPhases)
Sets the phases to execute.

Parameters:
executionPhases - phases to execute
See Also:
Lifecycle.execute(FacesContext)

setRenderResponsePhase

public void setRenderResponsePhase(Phase renderResponsePhase)
Sets the render-response phase.

Parameters:
renderResponsePhase - for rendering
See Also:
Lifecycle.render(FacesContext)

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG