|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPageFlowManagedObject
FacesBackingBean
public abstract class FacesBackingBean
A JavaServer Faces backing bean. An instance of this class will be created whenever a corresponding JSF path is
requested (e.g., an instance of foo.MyPage will be created for the webapp-relative path "/foo/MyPage.faces"). The
instance will be released (removed from the user session) when a non-matching path is requested. A faces backing
bean can hold component references and event/command handlers, and it can raise actions with normal JSF command event
handlers that are annotated with @Jpf.CommandHandler
.
The bean instance can be bound to with a JSF-style expression like #{backing.myComponent}
.
JSF backing beans are configured using the
@Jpf.FacesBacking
annotation.
Constructor Summary | |
---|---|
FacesBackingBean()
|
Method Summary | |
---|---|
void |
ensureFailover(HttpServletRequest request)
Ensures that any changes to this object will be replicated in a cluster (for failover), even if the replication scheme uses a change-detection algorithm that relies on HttpSession.setAttribute to be aware of changes. |
String |
getDisplayName()
Get the display name for the bean. |
protected Object |
getPageInput(String pageInputName)
Get a page input that was passed from a Page Flow action as an "action output". |
Map |
getPageInputMap()
Get the map of all page inputs that was passed from a Page Flow action as "action outputs". |
protected void |
onRestore()
Callback that is invoked when this backing bean is restored as the page itself is restored through a @Jpf.Forward or
@Jpf.SimpleAction with
navigateTo =Jpf.NavigateTo.currentPage
or
navigateTo =Jpf.NavigateTo.previousPage . |
void |
persistInSession(HttpServletRequest request,
HttpServletResponse response)
Store this object in the user session, in the appropriate place. |
void |
reinitialize(HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Reinitialize the bean for a new request. |
void |
removeFromSession(HttpServletRequest request)
Remove this instance from the session. |
void |
restore(HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Restore this bean (set it as the current one from some dormant state). |
Methods inherited from class PageFlowManagedObject |
---|
create, fieldIsUninitialized, getCreateTime, getServletContext, initializeField, onCreate, onDestroy, valueBound, valueUnbound |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FacesBackingBean()
Method Detail |
---|
public void persistInSession(HttpServletRequest request, HttpServletResponse response)
persistInSession
in class PageFlowManagedObject
public void removeFromSession(HttpServletRequest request)
removeFromSession
in class PageFlowManagedObject
public void ensureFailover(HttpServletRequest request)
ensureFailover
in class PageFlowManagedObject
request
- the current HttpServletRequestpublic String getDisplayName()
getDisplayName
in class PageFlowManagedObject
public void reinitialize(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
reinitialize
in class PageFlowManagedObject
protected Object getPageInput(String pageInputName)
pageInputName
- the name of the page input. This is the same as the name of the "action output".
null
if the given one does not exist.public Map getPageInputMap()
protected void onRestore()
@Jpf.Forward
or
@Jpf.SimpleAction
with
navigateTo
=Jpf.NavigateTo.currentPage
or
navigateTo
=Jpf.NavigateTo.previousPage
.
public void restore(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
request
- the current HttpServletRequest.response
- the current HttpServletResponse.servletContext
- the current ServletContext.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |