|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.rave.web.ui.appbase.FacesBean com.sun.rave.web.ui.appbase.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 integration 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).For advanced users, and as a carry forward from previous versions of
Sun Java Studio Creator, page bean instances are also registered
automatically as a JavaServer Faces PhaseListener
. For each
lifecycle phase, there is an appropriate "before" and "after" event method,
which you can override to provide phase-specific behavior. For example,
if you wanted to provide some special logic that happened before or after
the Update Model Values phase, you would override one of the methods:
public void beforeUpdateModelValues(); public void afterUpdateModelValues();
Constructor Summary | |
AbstractPageBean()
Construct a new instance of this bean. |
Method Summary | |
protected void |
afterApplyRequestValues()
|
protected void |
afterInvokeApplication()
|
void |
afterPhase(javax.faces.event.PhaseEvent event)
Call through to the appropriate "after event" method, depending upon the PhaseId in this event. |
protected void |
afterProcessValidations()
|
protected void |
afterRenderResponse()
|
protected void |
afterRestoreView()
|
protected void |
afterUpdateModelValues()
|
protected void |
beforeApplyRequestValues()
|
protected void |
beforeInvokeApplication()
|
void |
beforePhase(javax.faces.event.PhaseEvent event)
Call through to the appropriate "before event" method, depending upon the PhaseId in this event. |
protected void |
beforeProcessValidations()
|
protected void |
beforeRenderResponse()
|
protected void |
beforeRestoreView()
|
protected void |
beforeUpdateModelValues()
|
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. |
void |
init()
Callback method that is called whenever a page is navigated to, either directly via a URL, or indirectly via page navigation. |
protected boolean |
isPostBack()
Return true if the current request was a post back
for an existing view, rather than the creation of a new view. |
void |
preprocess()
Callback method that is called after the component tree has been restored, but before any event processing takes place. |
void |
prerender()
Callback method that is called just before rendering takes place. |
protected void |
renderResponse()
Skip any remaining request processing lifecycle phases for the current request, and go immediately to Render Response phase. |
protected void |
responseComplete()
Skip any remaining request processing lifecycle phases for the current request, including Render Response phase. |
Methods inherited from class com.sun.rave.web.ui.appbase.FacesBean |
erase, error, error, fatal, fatal, getApplication, getApplicationMap, getBean, getCachedExceptions, getContext, getExternalContext, getFacesContext, getLifecycle, getRequestMap, getSessionMap, getValue, info, info, log, log, 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()
Construct a new instance of this bean.
Method Detail |
public void beforePhase(javax.faces.event.PhaseEvent event)
Call through to the appropriate "before event" method,
depending upon the PhaseId
in this event.
event
- PhaseEvent
to be processedpublic void afterPhase(javax.faces.event.PhaseEvent event)
Call through to the appropriate "after event" method,
depending upon the PhaseId
in this event.
event
- PhaseEvent
to be processedprotected void beforeRestoreView()
protected void afterRestoreView()
protected void beforeApplyRequestValues()
protected void afterApplyRequestValues()
protected void beforeProcessValidations()
protected void afterProcessValidations()
protected void beforeUpdateModelValues()
protected void afterUpdateModelValues()
protected void beforeInvokeApplication()
protected void afterInvokeApplication()
protected void beforeRenderResponse()
protected void afterRenderResponse()
protected boolean isPostBack()
Return true
if the current request was a post back
for an existing view, rather than the creation of a new view. The
result of this method may be used to conditionally execute one time
setup that is only required when a page is first displayed.
protected void renderResponse()
Skip any remaining request processing lifecycle phases for the current request, and go immediately to Render Response phase. This method is typically invoked when you want to throw away input values provided by the user, instead of processing them.
protected void responseComplete()
Skip any remaining request processing lifecycle phases for the current request, including Render Response phase. This is appropriate if you have completed the response through some means other than JavaServer Faces rendering.
public 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.
The default implementation does nothing.
public 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.
public 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.
public 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 |