Class FacesPortlet

java.lang.Object
com.webmethods.caf.faces.portlet.FacesPortlet
All Implemented Interfaces:
javax.portlet.Portlet

public class FacesPortlet extends Object implements javax.portlet.Portlet
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    beforeWorkspaceLoad(FacesContext context, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, String navigationType)
    Portlet may override this method to process custom portlet initialization when a workspace is loaded that contains an instance of this portlet.
    void
    Release all resources acquired at startup time.
    getFacesContext(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response)
    Create a new CAF Faces context for the specified portlet request from portlet config or portlet context.
    Deprecated.
    Use PortletFacesContextFactory static methods.
    Deprecated.
    Use PortletFacesContextFactory static methods.
    javax.portlet.PortletConfig
    Returns the PortletConfig object.
    void
    init(javax.portlet.PortletConfig portletConfig)
    Acquire the factory instance we will require.
    void
    processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
    Perform the request processing lifecycle for the specified request, up to (but not including) the Render Response phase.
    void
    processJSFAction(FacesContext context, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
    Processes request action.
    void
    render(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
    Perform the Render Response phase of the request processing lifecycle for the specified request.
    void
    renderJSF(FacesContext context, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
    Renders request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FacesPortlet

      public FacesPortlet()
  • Method Details

    • destroy

      public void destroy()

      Release all resources acquired at startup time.

      Specified by:
      destroy in interface javax.portlet.Portlet
    • init

      public void init(javax.portlet.PortletConfig portletConfig) throws javax.portlet.PortletException

      Acquire the factory instance we will require.

      Specified by:
      init in interface javax.portlet.Portlet
      Throws:
      javax.portlet.PortletException - if, for any reason, the startp of this Faces application failed. This includes errors in the config file that is parsed before or during the processing of this init() method.
    • getFacesContextFactory

      public FacesContextFactory getFacesContextFactory() throws javax.portlet.PortletException
      Deprecated.
      Use PortletFacesContextFactory static methods.
      Throws:
      javax.portlet.PortletException
    • getLifecycle

      public Lifecycle getLifecycle() throws javax.portlet.PortletException
      Deprecated.
      Use PortletFacesContextFactory static methods.
      Throws:
      javax.portlet.PortletException
    • getPortletConfig

      public javax.portlet.PortletConfig getPortletConfig()
      Returns the PortletConfig object.
      Returns:
      PortletConfig
    • getFacesContext

      public FacesContext getFacesContext(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws javax.portlet.PortletException
      Create a new CAF Faces context for the specified portlet request from portlet config or portlet context.
      Parameters:
      request - PortletRequest
      response - PortletResponse
      Returns:
      a new FacesContext
      Throws:
      javax.portlet.PortletException - if context cannot be created
    • beforeWorkspaceLoad

      public void beforeWorkspaceLoad(FacesContext context, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, String navigationType)
      Portlet may override this method to process custom portlet initialization when a workspace is loaded that contains an instance of this portlet.
      Parameters:
      context - the JSF context
      request - The portlet request we are processing
      response - The portlet response we are processing
      navigationType - the type of navigation. usually 'mws_lhs' or 'mws_tab'
    • processJSFAction

      public void processJSFAction(FacesContext context, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws IOException, javax.portlet.PortletException
      Processes request action. That is the method which should be overriden instead of standard Portlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse) by custom JSR168 portlets implementations which extend FacesPortlet. To skip normal JSF action processing, call FacesContext.renderResponse() from this method.
      Parameters:
      request - The portlet request we are processing
      response - The portlet response we are processing
      Throws:
      IOException - if an input/output error occurs
      javax.portlet.PortletException - if a portlet processing error occurs
    • processAction

      public void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws IOException, javax.portlet.PortletException

      Perform the request processing lifecycle for the specified request, up to (but not including) the Render Response phase.

      Specified by:
      processAction in interface javax.portlet.Portlet
      Parameters:
      request - The portlet request we are processing
      response - The portlet response we are processing
      Throws:
      IOException - if an input/output error occurs
      javax.portlet.PortletException - if a portlet processing error occurs
    • renderJSF

      public void renderJSF(FacesContext context, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws IOException, javax.portlet.PortletException
      Renders request. That is the method which should be overriden instead of standard Portlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse) by custom JSR168 portlets implementations which extend FacesPortlet. To skip normal JSF rendering, call FacesContext.responseComplete() from this method.
      Parameters:
      request - The portlet request we are processing
      response - The portlet response we are processing
      Throws:
      IOException - if an input/output error occurs
      javax.portlet.PortletException - if a portlet processing error occurs
    • render

      public void render(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws IOException, javax.portlet.PortletException

      Perform the Render Response phase of the request processing lifecycle for the specified request.

      Specified by:
      render in interface javax.portlet.Portlet
      Parameters:
      request - The portlet request we are processing
      response - The portlet response we are processing
      Throws:
      IOException - if an input/output error occurs
      javax.portlet.PortletException - if a portlet processing error occurs