|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.bean.BaseViewBean
public class BaseViewBean
Base class implementation for view page managed beans. Clients should subclass this base class for each .view file in the web or portlet application.
Nested Class Summary | |
---|---|
protected class |
BaseViewBean.ClientIdsContentProvider
Providers that maps raw control ids to client-side element ids. |
Field Summary | |
---|---|
protected IContentProvider |
clientIds
IContentProvider to map raw control ids to client-side element ids. |
protected boolean |
initialized
boolean to check if the Bean is initialized. |
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean |
---|
fExpireWithPageFlow |
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean |
---|
DATA_BINDING_CLIENTS, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders |
Constructor Summary | |
---|---|
BaseViewBean()
Default constructor |
Method Summary | |
---|---|
protected void |
afterApplyRequestValues()
Clients should overwrite this method to perform custom actions after request parameters are applied to the controls. |
protected void |
afterInvokeApplication()
Clients should overwrite this method to perform custom actions after an action method is invoked. |
void |
afterPhase(PhaseEvent event)
Implementation method of the JSF phase listener. |
protected void |
afterProcessValidations()
Clients should overwrite this method to perform custom actions after validation is performed. |
protected void |
afterRenderResponse()
Clients should overwrite this method to perform custom actions after the view got rendered. |
protected void |
afterRestoreView()
Clients should overwrite this method to perform custom actions after the view got restored from the postback render request. |
protected void |
afterUpdateModelValues()
Clients should overwrite this method to perform custom actions after controls updated data model using submitted values. |
protected void |
beforeApplyRequestValues()
Clients should overwrite this method to perform custom actions before request parameters are applied to the controls. |
protected void |
beforeInvokeApplication()
Clients should overwrite this method to perform custom actions before an action method is invoked. |
void |
beforePhase(PhaseEvent event)
Implementation method of the JSF phase listener. |
protected void |
beforeProcessValidations()
Clients should overwrite this method to perform custom actions before validation is performed. |
protected void |
beforeRenderResponse()
Clients should overwrite this method to perform custom actions before the view gets rendered. |
protected void |
beforeRestoreView()
Clients should overwrite this method to perform custom actions before the view gets restored from the postback render request. |
protected void |
beforeUpdateModelValues()
Clients should overwrite this method to perform custom actions before controls update data model using submitted values. |
protected void |
callInitialize()
Initializes the bean if not already done. |
UIComponent |
findComponent(UIComponent base,
String id)
Return the UIComponent (if any) with the specified
id , searching recursively starting at the specified
base , and examining the base component itself, followed by
examining all the base component's facets and children. |
UIComponent |
findComponentInRoot(String id)
Finds components by its id in the root of the component
tree. |
protected Map |
getApplicationScope()
Returns writable map of application scoped attributes |
IContentProvider |
getClientIds()
Maps raw control ids to client-side element ids. |
PhaseId |
getPhaseId()
Returns PhaseId#ANY_PHASE which indicates all standard phases. |
protected static String |
getRealPath(String relPath)
Returns a full system path for a resource path given relative to the web application root. |
protected Map |
getRequestParam()
Returns read-only map of request parameters |
protected Map |
getRequestScope()
Returns writable map of request scoped attributes |
protected Map |
getSessionScope()
Returns writable map of session scoped attributes. |
void |
gotoPage(String pageURI)
Deprecated. use BaseViewBean.gotoPage(String, boolean) instead. |
void |
gotoPage(String pageURI,
boolean redirect)
Switches to the specified view page. |
protected String |
initialize()
This gets overwritten in the page bean classes to be a public dataflow method implementation |
boolean |
isAsyncRequest()
Returns true if current request is an async request. |
protected void |
release()
Override this method to release any resources associated with this session. |
protected void |
resetPageFlowStorage()
Reset the storage used for Page Flow. |
protected void |
streamFileDataToResponse(IFileExportBean exportBean)
Helper method that can be called to stream an exported file back to the response. |
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean |
---|
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound |
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean |
---|
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient IContentProvider clientIds
IContentProvider
to map raw control ids to client-side element ids.
protected transient boolean initialized
boolean
to check if the Bean
is initialized.
Constructor Detail |
---|
public BaseViewBean()
Method Detail |
---|
protected void release()
BaseFacesSessionBean
release
in class BaseFacesSessionBean
protected void streamFileDataToResponse(IFileExportBean exportBean)
exportBean
- the bean describing the file to exportpublic void beforePhase(PhaseEvent event)
event
- JSF phase evenprotected void callInitialize()
protected String initialize()
OUTCOME_OK
for success and
OUTCOME_ERROR
otherwisepublic void afterPhase(PhaseEvent event)
event
- JSF PhaseEvent
public PhaseId getPhaseId()
PhaseId#ANY_PHASE
which indicates all standard phases.
PhaseListener
public void gotoPage(String pageURI)
BaseViewBean.gotoPage(String, boolean)
instead.
pageURI
- the uri of the page, for example: /portlet1/mypage.viewpublic void gotoPage(String pageURI, boolean redirect)
pageURI
- the uri of the page, for example: /portlet1/mypage.viewredirect
- true to redirect to the page, false to just change the
FacesContext view rootpublic UIComponent findComponent(UIComponent base, String id)
Return the UIComponent
(if any) with the specified
id
, searching recursively starting at the specified
base
, and examining the base component itself, followed by
examining all the base component's facets and children. Unlike
findComponent method of UIComponentBase
, which skips recursive
scan each time it finds a NamingContainer
, this method examines
all components, regardless of their namespace (assuming IDs are unique).
base
- Base UIComponent
from which to searchid
- Component identifier to be matched
public UIComponent findComponentInRoot(String id)
id
in the root of the component
tree.
id
- the component id
UIComponent
or null if not foundpublic IContentProvider getClientIds()
Maps raw control ids to client-side element ids.
For example, #{myPageBean.clientIds.myControlId} returns the client-side id (ie "wmp1234:zID3:myControlId") for the control with an id of 'myControlId'.
IContentProvider
for ID mapping.public boolean isAsyncRequest()
true
if current request is an async request.
true
for async requestprotected static String getRealPath(String relPath)
relPath
- relative path of the web resource
String
for full system path of this resource, or null if it cannot be
calculatedprotected Map getApplicationScope()
Map <String, Object>
of attributesprotected Map getRequestParam()
Map <String, Object>
of parametersprotected Map getRequestScope()
Map <String, Object>
of attributesprotected Map getSessionScope()
Map <String, Object>
of attributesprotected 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 void resetPageFlowStorage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |