public class FacesPortlet extends Object implements javax.portlet.Portlet
Constructor and Description |
---|
FacesPortlet() |
Modifier and Type | Method and 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 |
destroy()
Release all resources acquired at startup time.
|
FacesContext |
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.
|
FacesContextFactory |
getFacesContextFactory()
Deprecated.
Use
PortletFacesContextFactory static methods. |
Lifecycle |
getLifecycle()
Deprecated.
Use
PortletFacesContextFactory static methods. |
javax.portlet.PortletConfig |
getPortletConfig()
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.
|
public void destroy()
Release all resources acquired at startup time.
destroy
in interface javax.portlet.Portlet
public void init(javax.portlet.PortletConfig portletConfig) throws javax.portlet.PortletException
Acquire the factory instance we will require.
init
in interface javax.portlet.Portlet
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.public FacesContextFactory getFacesContextFactory() throws javax.portlet.PortletException
PortletFacesContextFactory
static methods.javax.portlet.PortletException
public Lifecycle getLifecycle() throws javax.portlet.PortletException
PortletFacesContextFactory
static methods.javax.portlet.PortletException
public javax.portlet.PortletConfig getPortletConfig()
PortletConfig
object.PortletConfig
public FacesContext getFacesContext(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws javax.portlet.PortletException
request
- PortletRequest
response
- PortletResponse
FacesContext
javax.portlet.PortletException
- if context cannot be createdpublic void beforeWorkspaceLoad(FacesContext context, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, String navigationType)
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'public void processJSFAction(FacesContext context, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws IOException, javax.portlet.PortletException
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.request
- The portlet request we are processingresponse
- The portlet response we are processingIOException
- if an input/output error occursjavax.portlet.PortletException
- if a portlet processing error occurspublic 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.
processAction
in interface javax.portlet.Portlet
request
- The portlet request we are processingresponse
- The portlet response we are processingIOException
- if an input/output error occursjavax.portlet.PortletException
- if a portlet processing error occurspublic void renderJSF(FacesContext context, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws IOException, javax.portlet.PortletException
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.request
- The portlet request we are processingresponse
- The portlet response we are processingIOException
- if an input/output error occursjavax.portlet.PortletException
- if a portlet processing error occurspublic 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.
render
in interface javax.portlet.Portlet
request
- The portlet request we are processingresponse
- The portlet response we are processingIOException
- if an input/output error occursjavax.portlet.PortletException
- if a portlet processing error occurs