public class ViewHandlerImpl
extends javax.faces.application.ViewHandler
Custom ViewHandler implementation that adds features
specific to the Struts-Faces Integration Library. It leverages the
"decorator pattern" customization strategy that JSF supports, by
delegating most processing to the ViewHandler instance
handed to our constructor.
| Constructor and Description |
|---|
ViewHandlerImpl(javax.faces.application.ViewHandler handler)
Construct a
ViewHandlerImpl decorating the
specified ViewHandler instance. |
| Modifier and Type | Method and Description |
|---|---|
Locale |
calculateLocale(javax.faces.context.FacesContext context) |
String |
calculateRenderKitId(javax.faces.context.FacesContext context) |
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
String viewId) |
String |
getActionURL(javax.faces.context.FacesContext context,
String viewId) |
javax.faces.application.ViewHandler |
getHandler()
Return the
ViewHandler instance we are decorating. |
String |
getResourceURL(javax.faces.context.FacesContext context,
String viewId) |
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view)
If the Struts application has set a
Locale, pass it
on to JSF prior to delegating the actual rendering. |
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
String viewId) |
void |
setHandler(javax.faces.application.ViewHandler handler)
Set the
ViewHandler instance we are decorating. |
void |
writeState(javax.faces.context.FacesContext context) |
public ViewHandlerImpl(javax.faces.application.ViewHandler handler)
Construct a ViewHandlerImpl decorating the
specified ViewHandler instance.
handler - ViewHandler to be decoratedpublic javax.faces.application.ViewHandler getHandler()
Return the ViewHandler instance we are decorating.
public void setHandler(javax.faces.application.ViewHandler handler)
Set the ViewHandler instance we are decorating.
handler - ViewHandler instance to decoratepublic void renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot view)
throws IOException,
javax.faces.FacesException
If the Struts application has set a Locale, pass it
on to JSF prior to delegating the actual rendering.
renderView in class javax.faces.application.ViewHandlercontext - FacesContext for the current requestview - UIViewRoot to be renderedIOExceptionjavax.faces.FacesExceptionpublic Locale calculateLocale(javax.faces.context.FacesContext context)
calculateLocale in class javax.faces.application.ViewHandlerpublic String calculateRenderKitId(javax.faces.context.FacesContext context)
calculateRenderKitId in class javax.faces.application.ViewHandlerpublic javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context,
String viewId)
createView in class javax.faces.application.ViewHandlerpublic String getActionURL(javax.faces.context.FacesContext context, String viewId)
getActionURL in class javax.faces.application.ViewHandlerpublic String getResourceURL(javax.faces.context.FacesContext context, String viewId)
getResourceURL in class javax.faces.application.ViewHandlerpublic javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
String viewId)
restoreView in class javax.faces.application.ViewHandlerpublic void writeState(javax.faces.context.FacesContext context)
throws IOException
writeState in class javax.faces.application.ViewHandlerIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.