JSF-Spring

de.mindmatters.faces.spring.context.servlet.lifecycle
Class RestoreViewPhase

java.lang.Object
  extended by de.mindmatters.faces.lifecycle.AbstractPhase
      extended by de.mindmatters.faces.lifecycle.RestoreViewPhase
          extended by de.mindmatters.faces.spring.context.servlet.lifecycle.RestoreViewPhase
All Implemented Interfaces:
Phase

public class RestoreViewPhase
extends RestoreViewPhase

Restore View Phase implementation used by the special JSF-Spring Lifecycle identified by LifecycleImpl.JSF_SPRING_LIFECYCLE_ID.

Checks whether the currently executing Spring MVC Handler implements RestoreViewPhaseListener or defines a method
public void beforeRestoreView(FacesContext context)
or
public void afterRestoreView(FacesContext context)
respectively and invokes the appropriate one at the beginning and the end of phase processing.

Author:
Andreas Kuhrwahl

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.mindmatters.faces.lifecycle.Phase
Phase.PhaseIdName
 
Constructor Summary
RestoreViewPhase()
           
 
Method Summary
protected  void afterPhase(FacesContext context)
          Template method.
protected  void appendActionSource(FacesContext context, UIViewRoot viewRoot, java.lang.Object handler)
          Appends an ActionSource to the given UIViewRoot viewRoot and queues an ActionEvent to the newly attached ActionSource.
protected  void beforePhase(FacesContext context)
          Template method.
protected  UIViewRoot createView(FacesContext context, ViewHandler viewHandler, java.lang.String viewId)
          Perform whatever actions are required to create the view associated with the specified FacesContext and viewId.
 
Methods inherited from class de.mindmatters.faces.lifecycle.RestoreViewPhase
buildView, doPerComponentActions, executePhase, getId, restoreView
 
Methods inherited from class de.mindmatters.faces.lifecycle.AbstractPhase
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestoreViewPhase

public RestoreViewPhase()
Method Detail

createView

protected final UIViewRoot createView(FacesContext context,
                                      ViewHandler viewHandler,
                                      java.lang.String viewId)
Perform whatever actions are required to create the view associated with the specified FacesContext and viewId. Default implementation delegates to ViewHandler.createView(FacesContext, String).

Overrides:
createView in class RestoreViewPhase
Parameters:
context - FacesContext for the current request
viewHandler - ViewHandler for the current request
viewId - the view identifier for the current request
Returns:
the built view

appendActionSource

protected void appendActionSource(FacesContext context,
                                  UIViewRoot viewRoot,
                                  java.lang.Object handler)
Appends an ActionSource to the given UIViewRoot viewRoot and queues an ActionEvent to the newly attached ActionSource. Necessary because the Invoke Application phase has to be executed.

Parameters:
context - FacesContext for the current request
viewRoot - the created UIViewRoot
handler - the current handler

afterPhase

protected void afterPhase(FacesContext context)
Template method. Subclasses can override this. This method will be invoked after the concrete phase is executed. Default implementation does nothing.

Overrides:
afterPhase in class AbstractPhase
Parameters:
context - FacesContext for the current request being processed

beforePhase

protected void beforePhase(FacesContext context)
Template method. Subclasses can override this. This method will be invoked before the concrete phase is executed. Default implementation does nothing.

Overrides:
beforePhase in class AbstractPhase
Parameters:
context - FacesContext for the current request being processed

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG