|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.orchestra.viewController.jsf.ViewControllerPhaseListener
public class ViewControllerPhaseListener
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.
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 |
---|
public ViewControllerPhaseListener()
Method Detail |
---|
public void beforePhase(javax.faces.event.PhaseEvent event)
beforePhase
in interface javax.faces.event.PhaseListener
public void afterPhase(javax.faces.event.PhaseEvent event)
afterPhase
in interface javax.faces.event.PhaseListener
public javax.faces.event.PhaseId getPhaseId()
getPhaseId
in interface javax.faces.event.PhaseListener
protected String getViewId(javax.faces.context.FacesContext facesContext)
protected void assertConversationState(javax.faces.context.FacesContext facesContext)
facesContext
- protected void preRenderResponse(javax.faces.context.FacesContext facesContext)
protected void executeInitView(javax.faces.context.FacesContext facesContext)
protected void postRestoreView(javax.faces.context.FacesContext facesContext)
executeInitView(javax.faces.context.FacesContext)
instead
protected ViewControllerPhaseListener.ViewControllerPhaseListenerState getState(javax.faces.context.FacesContext facesContext)
protected void preInvokeApplication(javax.faces.context.FacesContext facesContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |