Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.myfaces.orchestra.viewController.jsf
Class ViewControllerPhaseListener

    java.lang.Object
      org.apache.myfaces.orchestra.viewController.jsf.ViewControllerPhaseListener

All Implemented Interfaces:
  Serializable, EventListener, javax.faces.event.PhaseListener

    public class ViewControllerPhaseListener

extends Object
implements javax.faces.event.PhaseListener

Causes lifecycle methods to be invoked on backing beans that are associated with the current view.

For details about when initView callbacks occur, see the documentation for method initView on class ViewController.

See the javadoc for class ViewControllerManager on how to configure the ViewController behaviour.

Note that at the moment this does not support a ViewController bean for subviews (ie f:subView tags), which the Shale ViewController framework does provide. ViewController beans can only be associated with the main viewId, ie the "top level" view template file.

Note that some callbacks might not be invoked if exceptions are thrown by actionlisteners, etc (which again Shale guarantees). This is particularly important for an "endView" callback, where resources allocated on initView (such as database connections) might be released. Hopefully this will be implemented in some later Orchestra release.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `ViewControllerPhaseListener.ViewControllerPhaseListenerState`

Constructor Summary
`ViewControllerPhaseListener()`

Method Summary
`void` | `afterPhase(javax.faces.event.PhaseEvent event)`
`protected void` | `assertConversationState(javax.faces.context.FacesContext facesContext)` invoked multiple times during the lifecycle to ensure the conversation(s) to the associated viewController are running.
`void` | `beforePhase(javax.faces.event.PhaseEvent event)`
`protected void` | `executeInitView(javax.faces.context.FacesContext facesContext)` invokes the initView method on your view controller
`javax.faces.event.PhaseId` | `getPhaseId()`
`protected ViewControllerPhaseListener.ViewControllerPhaseListenerState` | `getState(javax.faces.context.FacesContext facesContext)`
`protected String` | `getViewId(javax.faces.context.FacesContext facesContext)`
`protected void` | `postRestoreView(javax.faces.context.FacesContext facesContext)` Deprecated. overload/use `executeInitView(javax.faces.context.FacesContext)` instead
`protected void` | `preInvokeApplication(javax.faces.context.FacesContext facesContext)` invokes the preProcess method on your view controller
`protected void` | `preRenderResponse(javax.faces.context.FacesContext facesContext)` invokes the preRenderView method on your view controller

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ViewControllerPhaseListener

    public ViewControllerPhaseListener()

Method Detail

### beforePhase

    public void beforePhase(javax.faces.event.PhaseEvent event)

  Specified by:
    `beforePhase` in interface `javax.faces.event.PhaseListener`

### afterPhase

    public void afterPhase(javax.faces.event.PhaseEvent event)

  Specified by:
    `afterPhase` in interface `javax.faces.event.PhaseListener`

### getPhaseId

    public javax.faces.event.PhaseId getPhaseId()

  Specified by:
    `getPhaseId` in interface `javax.faces.event.PhaseListener`

### getViewId

    protected String getViewId(javax.faces.context.FacesContext facesContext)

### assertConversationState

    protected void assertConversationState(javax.faces.context.FacesContext facesContext)

  invoked multiple times during the lifecycle to ensure the conversation(s) to the associated viewController are running.

  Parameters:
    `facesContext` -

### preRenderResponse

    protected void preRenderResponse(javax.faces.context.FacesContext facesContext)

  invokes the preRenderView method on your view controller

### executeInitView

    protected void executeInitView(javax.faces.context.FacesContext facesContext)

  invokes the initView method on your view controller

  Since:
    1.1

### postRestoreView

    protected void postRestoreView(javax.faces.context.FacesContext facesContext)

  Deprecated. overload/use `executeInitView(javax.faces.context.FacesContext)` instead

### getState

    protected ViewControllerPhaseListener.ViewControllerPhaseListenerState getState(javax.faces.context.FacesContext facesContext)

### preInvokeApplication

    protected void preInvokeApplication(javax.faces.context.FacesContext facesContext)

  invokes the preProcess method on your view controller

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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