Package com.webmethods.caf.faces.portlet
Class FacesPortlet
java.lang.Object
com.webmethods.caf.faces.portlet.FacesPortlet
- All Implemented Interfaces:
javax.portlet.Portlet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
destroy()
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.Deprecated.UsePortletFacesContextFactory
static methods.javax.portlet.PortletConfig
Returns thePortletConfig
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.
-
Constructor Details
-
FacesPortlet
public FacesPortlet()
-
-
Method Details
-
destroy
public void destroy()Release all resources acquired at startup time.
- Specified by:
destroy
in interfacejavax.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 interfacejavax.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 thisinit()
method.
-
getFacesContextFactory
Deprecated.UsePortletFacesContextFactory
static methods.- Throws:
javax.portlet.PortletException
-
getLifecycle
Deprecated.UsePortletFacesContextFactory
static methods.- Throws:
javax.portlet.PortletException
-
getPortletConfig
public javax.portlet.PortletConfig getPortletConfig()Returns thePortletConfig
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 contextrequest
- The portlet request we are processingresponse
- The portlet response we are processingnavigationType
- 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 standardPortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
by custom JSR168 portlets implementations which extend FacesPortlet. To skip normal JSF action processing, callFacesContext.renderResponse()
from this method.- Parameters:
request
- The portlet request we are processingresponse
- The portlet response we are processing- Throws:
IOException
- if an input/output error occursjavax.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 interfacejavax.portlet.Portlet
- Parameters:
request
- The portlet request we are processingresponse
- The portlet response we are processing- Throws:
IOException
- if an input/output error occursjavax.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 standardPortlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
by custom JSR168 portlets implementations which extend FacesPortlet. To skip normal JSF rendering, callFacesContext.responseComplete()
from this method.- Parameters:
request
- The portlet request we are processingresponse
- The portlet response we are processing- Throws:
IOException
- if an input/output error occursjavax.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 interfacejavax.portlet.Portlet
- Parameters:
request
- The portlet request we are processingresponse
- The portlet response we are processing- Throws:
IOException
- if an input/output error occursjavax.portlet.PortletException
- if a portlet processing error occurs
-
PortletFacesContextFactory
static methods.