Class BasePortletPageBean

All Implemented Interfaces:
IPageFlowScopeAdapter, Serializable, EventListener, PhaseListener, HttpSessionBindingListener
Direct Known Subclasses:
BasePageBean, BaseSearchBarPageBean, BaseSearchResultOptionsPageBean, BaseSearchResultPageBean, BaseTaskDetailsPageBean, BaseTaskStartPageBean

public class BasePortletPageBean extends BaseViewBean
Bean for representing a portlet page, used for navigation of the page.
See Also:
  • Constructor Details

    • BasePortletPageBean

      public BasePortletPageBean()
  • Method Details

    • getActivePreferencesBean

      protected BaseFacesPreferencesBean getActivePreferencesBean()
      Returns action preferences bean. May return null 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

      public void gotoPage(String pageURI, boolean redirect)
      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 class BaseViewBean
      Parameters:
      pageURI - the uri of the page, for example: /portlet1/mypage.view
      redirect - true to redirect to the page, false to just change the FacesContext view root
    • createRenderUrl

      protected IPortletURL createRenderUrl() throws Exception
      Creates render portletUrl for the current portlet.
      Returns:
      instance of IPortletURL
      Throws:
      Exception - if portlet url cannot be created
    • createActionUrl

      protected IPortletURL createActionUrl() throws Exception
      Creates action portletUrl for the current portlet
      Returns:
      instance of IPortletURL
      Throws:
      Exception - if portlet url cannot be created
    • getPreferences

      protected javax.portlet.PortletPreferences getPreferences() throws Exception
      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 class BaseViewBean
    • getRequestID

      public String 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'
    • clearNavigationState

      protected void clearNavigationState()
      Clear the portlet navigation state cache. This will restore the portlet mode, window state and current .view back to the original persisted values on the next render request. This can only be called while processing a portlet action request.