Package com.webmethods.caf.faces.bean
Class BasePortletPageBean
java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseFacesSessionBean
com.webmethods.caf.faces.bean.BaseViewBean
com.webmethods.caf.faces.bean.BasePortletPageBean
- All Implemented Interfaces:
IPageFlowScopeAdapter
,Serializable
,EventListener
,PhaseListener
,HttpSessionBindingListener
- Direct Known Subclasses:
BasePageBean
,BaseSearchBarPageBean
,BaseSearchResultOptionsPageBean
,BaseSearchResultPageBean
,BaseTaskDetailsPageBean
,BaseTaskStartPageBean
Bean for representing a portlet page, used for navigation of the page.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.webmethods.caf.faces.bean.BaseViewBean
BaseViewBean.ClientIdsContentProvider
-
Field Summary
Fields inherited from class com.webmethods.caf.faces.bean.BaseViewBean
clientIds, 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, EMPTY_RESOURCES, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeWorkspaceLoad
(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, String navigationType) Handle state initialization updates for a workspace load request.protected void
Initializes the bean if not already done.protected void
Clear the portlet navigation state cache.protected IPortletURL
Creates action portletUrl for the current portletprotected IPortletURL
Creates render portletUrl for the current portlet.protected BaseFacesPreferencesBean
Returns action preferences bean.protected javax.portlet.PortletPreferences
Obtains instance of the Portlet Preferences for the current portletReturns the request ID used to invoke reach this page.void
Switches to the specified view page.protected void
switchToPortletMode
(javax.portlet.PortletMode mode) Switches the current portlet mode to the requested mode.Methods inherited from class com.webmethods.caf.faces.bean.BaseViewBean
afterApplyRequestValues, afterInvokeApplication, afterPhase, afterProcessValidations, afterRenderResponse, afterRestoreView, afterUpdateModelValues, beforeApplyRequestValues, beforeInvokeApplication, beforePhase, beforeProcessValidations, beforeRenderResponse, beforeRestoreView, beforeUpdateModelValues, findComponent, findComponentInRoot, getApplicationScope, getClientIds, getPhaseId, getRealPath, getRequestParam, getRequestScope, getSessionScope, gotoPage, initialize, isAsyncRequest, preRenderResponse, release, resetPageFlowStorage, streamFileDataToResponse
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, createMethodExpression, createValueBinding, createValueExpression, createValueExpression, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
-
Constructor Details
-
BasePortletPageBean
public BasePortletPageBean()
-
-
Method Details
-
getActivePreferencesBean
Returns action preferences bean. May returnnull
for pages that are not associated with any portlet- Returns:
- actual preference bean references for this portlet page or null for application pages
-
switchToPortletMode
protected void switchToPortletMode(javax.portlet.PortletMode mode) throws javax.portlet.PortletModeException Switches the current portlet mode to the requested mode.- Parameters:
mode
- the portlet mode to switch to- Throws:
javax.portlet.PortletModeException
- if the requested portlet mode is not supported or allowed
-
gotoPage
Switches to the specified view page. If redirect is false it will simply change the faces context view root to the contents of the specified viewId. If redirect is true, it will redirect to the URL of the specified view. This method should be called inside an action method to set the page URI for the next rendering request.- Overrides:
gotoPage
in classBaseViewBean
- Parameters:
pageURI
- the uri of the page, for example: /portlet1/mypage.viewredirect
- true to redirect to the page, false to just change the FacesContext view root
-
createRenderUrl
Creates render portletUrl for the current portlet.- Returns:
- instance of
IPortletURL
- Throws:
Exception
- if portlet url cannot be created
-
createActionUrl
Creates action portletUrl for the current portlet- Returns:
- instance of
IPortletURL
- Throws:
Exception
- if portlet url cannot be created
-
getPreferences
Obtains instance of the Portlet Preferences for the current portlet- Returns:
- portlet preferences object
- Throws:
Exception
- if this is made outside of the PortletContext
-
callInitialize
protected void callInitialize()Description copied from class:BaseViewBean
Initializes the bean if not already done.- Overrides:
callInitialize
in classBaseViewBean
-
getRequestID
Returns the request ID used to invoke reach this page.- Returns:
String
request ID.
-
beforeWorkspaceLoad
public void beforeWorkspaceLoad(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, String navigationType) Handle state initialization updates for a workspace load request. If the 'MWS_CLEAR_NAV_STATE_BEFORE_WORKSPACE_LOAD' portlet INIT_PARAM == true, this will restore the portlet mode, window state and current .view back to the original persisted values.- Parameters:
navigationType
- the navigation type. usually 'mws_lhs' or 'mws_tab'
-