| java.lang.Object com.sun.jsfcl.app.FacesBean com.sun.jsfcl.app.AbstractPageBean
AbstractPageBean | abstract public class AbstractPageBean extends FacesBean (Code) | | 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() - Called whenever you navigate to the
corresponding JSP page, either directly (via a URL) or indirectly
via page navigation from a different page. You can override this
method to acquire any resources that will always be needed by this
page.
- preprocess() - If this request is a postback (i.e.
your page is about to process an incoming form submit, this method
will be called after the original component tree has been restored,
but before any standard JavaServer Faces event processing is done
(i.e. this is called before Apply Request Values phase of
the request processing lifecycle). Override this method to acquire
any resources that will be needed by event handlers (such as action
methods, validator methods, or value change listener methods) that
will be executed while executing the request processing lifecycle.
- prerender() - If this page is the one that will be
rendering the response, this method is called after any event
processing, but before the actual rendering. Override this method to
acquire resources that are only needed when a page is being rendered.
- destroy() - Called unconditionally if
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).
|
Method Summary | |
public void | afterPhase(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. | public void | beforePhase(PhaseEvent event) | 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.
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. | 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.
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). |
AbstractPageBean | public AbstractPageBean()(Code) | | Register this bean as a PhaseListener so that it can
participate in the request processing lifecycle of each request.
|
afterPhase | public void afterPhase(PhaseEvent event)(Code) | | 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.
Parameters: event - PhaseEvent to be processed |
beforePhase | public void beforePhase(PhaseEvent event)(Code) | | 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.
Parameters: event - PhaseEvent to be processed |
destroy | protected void destroy()(Code) | | 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.
|
init | protected void init()(Code) | | 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.
|
preprocess | protected void preprocess()(Code) | | 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.
|
prerender | protected void prerender()(Code) | | 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.
|
|
|