|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jsfcl.app.FacesBean
com.sun.jsfcl.app.AbstractPageBean
public abstract class AbstractPageBean
AbstractPageBean is the abstract base class for every
page bean associated with a JSP page containing JavaServer Faces
components. It extends FacesBean
, so it inherits all of the
default behavior found there.
In addition to event handler methods that you create while building your application, the runtime environment will also call the following lifecycle related methods at appropriate points during the execution of your application:
init()
was called, after completion of rendering by
whichever page was actually rendered. Override this method to release
any resources allocated in the init()
,
preprocess()
, or prerender()
methods (or in an event handler).
Constructor Summary | |
---|---|
AbstractPageBean()
Register this bean as a PhaseListener so that it can
participate in the request processing lifecycle of each request. |
Method Summary | |
---|---|
void |
afterPhase(javax.faces.event.PhaseEvent event)
If this event is for the request associated with this page bean, call through to the appropriate "after" lifecycle method for this page bean, and notify interested session bean and application bean instances as well. |
void |
beforePhase(javax.faces.event.PhaseEvent event)
If this event is for the request associated with this page bean, call through to the appropriate "before" lifecycle method for this page bean, and notify interested session bean and application bean instances as well. |
protected void |
destroy()
Callback method that is called after rendering is completed for this request, if init() was called, regardless of whether
or not this was the page that was actually rendered. |
protected void |
init()
Callback method that is called whenever a page is navigated to, either directly via a URL, or indirectly via page navigation. |
protected void |
preprocess()
Callback method that is called after the component tree has been restored, but before any event processing takes place. |
protected void |
prerender()
Callback method that is called just before rendering takes place. |
Methods inherited from class com.sun.jsfcl.app.FacesBean |
---|
afterApplyRequestValues, afterInvokeApplication, afterProcessValidations, afterRenderResponse, afterRestoreView, afterUpdateModelValues, beforeApplyRequestValues, beforeInvokeApplication, beforeProcessValidations, beforeRenderResponse, beforeRestoreView, beforeUpdateModelValues, erase, error, error, fatal, fatal, getApplication, getApplicationMap, getBean, getContext, getExternalContext, getFacesContext, getLifecycle, getPhaseId, getRequestMap, getSessionMap, getValue, info, info, isPostBack, log, log, renderResponse, setBean, setValue, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPageBean()
Register this bean as a PhaseListener
so that it can
participate in the request processing lifecycle of each request.
Method Detail |
---|
public void beforePhase(javax.faces.event.PhaseEvent event)
If this event is for the request associated with this page bean, call through to the appropriate "before" lifecycle method for this page bean, and notify interested session bean and application bean instances as well.
beforePhase
in interface javax.faces.event.PhaseListener
beforePhase
in class FacesBean
event
- PhaseEvent
to be processedpublic void afterPhase(javax.faces.event.PhaseEvent event)
If this event is for the request associated with this page bean, call through to the appropriate "after" lifecycle method for this page bean, and notify interested session bean and application bean instances as well. Then, if this is Render Response phase, deregister ourselves as a listener.
afterPhase
in interface javax.faces.event.PhaseListener
afterPhase
in class FacesBean
event
- PhaseEvent
to be processedprotected void init()
Callback method that is called whenever a page is navigated to, either directly via a URL, or indirectly via page navigation. Override this method to acquire resources that will be needed for event handlers and lifecycle methods, whether or not this page is performing post back processing. Note that this method is called before the component tree has been restored, so you do not have access to any information from the JavaServer Faces components on this page.
The default implementation does nothing.
protected void preprocess()
Callback method that is called after the component tree has been restored, but before any event processing takes place. This method will only be called on a "post back" request that is processing a form submit. Override this method to allocate resources that will be required in your event handlers.
The default implementation does nothing.
protected void prerender()
Callback method that is called just before rendering takes place. This method will only be called for the page that will actually be rendered (and not, for example, on a page that handled a post back and then navigated to a different page). Override this method to allocate resources that will be required for rendering this page.
The default implementation does nothing.
protected void destroy()
Callback method that is called after rendering is completed for
this request, if init()
was called, regardless of whether
or not this was the page that was actually rendered. Override this
method to release resources acquired in the init()
,
preprocess()
, or prerender()
methods (or
acquired during execution of an event handler).
The default implementation does nothing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |