|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jsfcl.app.FacesBean
public abstract class FacesBean
FacesBean is the abstract base class for all page beans, session scope data beans, and application scope data beans that wish to participate in the request processing lifecycle. Concrete subclasses of this class will typically be registered as managed beans, so that they get created on demand (and added to the relevant scope's attributes).
Constructor Summary | |
---|---|
FacesBean()
|
Method Summary | |
---|---|
protected void |
afterApplyRequestValues()
|
protected void |
afterInvokeApplication()
|
void |
afterPhase(javax.faces.event.PhaseEvent phaseEvent)
Call through to the "after" lifecycle callback method for the current phase. |
protected void |
afterProcessValidations()
|
protected void |
afterRenderResponse()
|
protected void |
afterRestoreView()
|
protected void |
afterUpdateModelValues()
|
protected void |
beforeApplyRequestValues()
|
protected void |
beforeInvokeApplication()
|
void |
beforePhase(javax.faces.event.PhaseEvent phaseEvent)
Call through to the "before" lifecycle callback method for the current phase. |
protected void |
beforeProcessValidations()
|
protected void |
beforeRenderResponse()
|
protected void |
beforeRestoreView()
|
protected void |
beforeUpdateModelValues()
|
protected void |
erase()
Erase previously submitted values for all input components on this page. |
protected void |
error(java.lang.String summary)
Enqueue a global FacesMessage (not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_ERROR . |
protected void |
error(javax.faces.component.UIComponent component,
java.lang.String summary)
Enqueue a FacesMessage associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_ERROR . |
protected void |
fatal(java.lang.String summary)
Enqueue a global FacesMessage (not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_FATAL . |
protected void |
fatal(javax.faces.component.UIComponent component,
java.lang.String summary)
Enqueue a FacesMessage associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_FATAL . |
protected javax.faces.application.Application |
getApplication()
Return the Application instance for the current
web application. |
protected java.util.Map |
getApplicationMap()
Return a Map of the application scope attributes
for this web application. |
protected java.lang.Object |
getBean(java.lang.String name)
Return any attribute stored in request scope, session scope, or application scope under the specified name. |
protected javax.faces.context.FacesContext |
getContext()
Return the FacesContext instance for the current
request. |
protected javax.faces.context.ExternalContext |
getExternalContext()
Return the ExternalContext instance for the
current request. |
protected javax.faces.context.FacesContext |
getFacesContext()
Return the FacesContext instance for the current
request. |
protected javax.faces.lifecycle.Lifecycle |
getLifecycle()
Return the configured Lifecycle instance for the
current web application. |
javax.faces.event.PhaseId |
getPhaseId()
Return PhaseId.ANY_PHASE to indicate that we are
interested in all phases. |
protected java.util.Map |
getRequestMap()
Return a Map of the request scope attributes for
the current request. |
protected java.util.Map |
getSessionMap()
Return a Map of the session scope attributes for the
current user's session. |
protected java.lang.Object |
getValue(java.lang.String expr)
Evaluate the specified value binding expression, and return the value that it points at. |
protected void |
info(java.lang.String summary)
Enqueue a global FacesMessage (not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_INFO . |
protected void |
info(javax.faces.component.UIComponent component,
java.lang.String summary)
Enqueue a FacesMessage associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_INFO . |
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. |
protected void |
log(java.lang.String message)
Log the specified message to the container's log file. |
protected void |
log(java.lang.String message,
java.lang.Throwable throwable)
Log the specified message and exception to the container's log file. |
protected void |
renderResponse()
Skip any remaining request processing lifecycle phases for the current request, and go immediately to Render Response phase. |
protected void |
setBean(java.lang.String name,
java.lang.Object value)
Replace the value of any attribute stored in request scope, session scope, or application scope under the specified name. |
protected void |
setValue(java.lang.String expr,
java.lang.Object value)
Evaluate the specified value binding expression, and update the value that it points at. |
protected void |
warn(java.lang.String summary)
Enqueue a global FacesMessage (not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_WARN . |
protected void |
warn(javax.faces.component.UIComponent component,
java.lang.String summary)
Enqueue a FacesMessage associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_WARN . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FacesBean()
Method Detail |
---|
protected javax.faces.application.Application getApplication()
Return the Application
instance for the current
web application.
protected java.util.Map getApplicationMap()
Return a Map
of the application scope attributes
for this web application.
protected javax.faces.context.FacesContext getContext()
Return the FacesContext
instance for the current
request. This method has been restored for backwards compatibilty.
protected javax.faces.context.ExternalContext getExternalContext()
Return the ExternalContext
instance for the
current request.
protected javax.faces.context.FacesContext getFacesContext()
Return the FacesContext
instance for the current
request.
protected javax.faces.lifecycle.Lifecycle getLifecycle()
Return the configured Lifecycle
instance for the
current web application.
protected java.util.Map getRequestMap()
Return a Map
of the request scope attributes for
the current request.
protected java.util.Map getSessionMap()
Return a Map
of the session scope attributes for the
current user's session. Note that calling this method will cause a
session to be created if there is not already one associated with
this request.
protected java.lang.Object getBean(java.lang.String name)
Return any attribute stored in request scope, session scope, or
application scope under the specified name. If no such
attribute is found, and if this name is the registered name of a
managed bean, cause a new instance of this managed bean to be created
(and stored in an appropriate scope, if necessary) and returned.
If no attribute exists, and no managed bean was created, return
null
.
name
- Name of the attribute to be retrievedprotected void setBean(java.lang.String name, java.lang.Object value)
Replace the value of any attribute stored in request scope, session scope, or application scope under the specified name. If there is no such attribute, create a new request scope attribute under this name, and store the value there.
protected java.lang.Object getValue(java.lang.String expr)
Evaluate the specified value binding expression, and return the value that it points at.
expr
- Value binding expression (including delimiters)protected void setValue(java.lang.String expr, java.lang.Object value)
Evaluate the specified value binding expression, and update the value that it points at.
expr
- Value binding expression (including delimiters) that
must point at a writeable propertyvalue
- New value for the property pointed at by expr
public void beforePhase(javax.faces.event.PhaseEvent phaseEvent)
Call through to the "before" lifecycle callback method for the current phase.
beforePhase
in interface javax.faces.event.PhaseListener
phaseEvent
- PhaseEvent
to be processedpublic void afterPhase(javax.faces.event.PhaseEvent phaseEvent)
Call through to the "after" lifecycle callback method for the current phase.
afterPhase
in interface javax.faces.event.PhaseListener
phaseEvent
- PhaseEvent
to be processedpublic javax.faces.event.PhaseId getPhaseId()
Return PhaseId.ANY_PHASE
to indicate that we are
interested in all phases.
getPhaseId
in interface javax.faces.event.PhaseListener
protected 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 erase()
Erase previously submitted values for all input components on this
page. This method MUST be called if you have bound
input components to database columns, and then arbitrarily navigate
the underlying RowSet
to a different row in an event
handler method.
protected void log(java.lang.String message)
Log the specified message to the container's log file.
message
- Message to be loggedprotected void log(java.lang.String message, java.lang.Throwable throwable)
Log the specified message and exception to the container's log file.
message
- Message to be loggedthrowable
- Exception to be loggedprotected void info(java.lang.String summary)
Enqueue a global FacesMessage
(not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_INFO
.
summary
- Summary text for this messageprotected void info(javax.faces.component.UIComponent component, java.lang.String summary)
Enqueue a FacesMessage
associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_INFO
.
component
- Component with which this message is associatedsummary
- Summary text for this messageprotected void warn(java.lang.String summary)
Enqueue a global FacesMessage
(not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_WARN
.
summary
- Summary text for this messageprotected void warn(javax.faces.component.UIComponent component, java.lang.String summary)
Enqueue a FacesMessage
associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_WARN
.
component
- Component with which this message is associatedsummary
- Summary text for this messageprotected void error(java.lang.String summary)
Enqueue a global FacesMessage
(not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_ERROR
.
summary
- Summary text for this messageprotected void error(javax.faces.component.UIComponent component, java.lang.String summary)
Enqueue a FacesMessage
associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_ERROR
.
component
- Component with which this message is associatedsummary
- Summary text for this messageprotected void fatal(java.lang.String summary)
Enqueue a global FacesMessage
(not associated
with any particular componen) containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_FATAL
.
summary
- Summary text for this messageprotected void fatal(javax.faces.component.UIComponent component, java.lang.String summary)
Enqueue a FacesMessage
associated with the
specified component, containing the specified summary text
and a message severity level of FacesMessage.SEVERITY_FATAL
.
component
- Component with which this message is associatedsummary
- Summary text for this message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |