org.apache.myfaces.application
Class ViewHandlerImpl
java.lang.Object
javax.faces.application.ViewHandler
org.apache.myfaces.application.ViewHandlerImpl
public class ViewHandlerImpl
- extends javax.faces.application.ViewHandler
JSF 2.0 ViewHandler implementation
- Since:
- 2.0
Fields inherited from class javax.faces.application.ViewHandler |
CHARACTER_ENCODING_KEY, DEFAULT_FACELETS_SUFFIX, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME, FACELETS_SUFFIX_PARAM_NAME, FACELETS_VIEW_MAPPINGS_PARAM_NAME |
Method Summary |
java.util.Locale |
calculateLocale(javax.faces.context.FacesContext facesContext)
Get the locales specified as acceptable by the original request, compare them to the
locales supported by this Application and return the best match. |
java.lang.String |
calculateRenderKitId(javax.faces.context.FacesContext facesContext)
|
javax.faces.component.UIViewRoot |
createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
java.lang.String |
deriveViewId(javax.faces.context.FacesContext context,
java.lang.String input)
|
java.lang.String |
getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
java.lang.String |
getBookmarkableURL(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
boolean includeViewParams)
|
java.lang.String |
getRedirectURL(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
boolean includeViewParams)
|
java.lang.String |
getResourceURL(javax.faces.context.FacesContext facesContext,
java.lang.String path)
|
javax.faces.view.ViewDeclarationLanguage |
getViewDeclarationLanguage(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
static javax.faces.application.ViewHandler |
getViewHandler(javax.faces.context.FacesContext facesContext)
Gets the current ViewHandler via FacesContext.getApplication().getViewHandler(). |
protected ViewHandlerSupport |
getViewHandlerSupport()
|
void |
initView(javax.faces.context.FacesContext context)
|
void |
renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
|
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
|
void |
setViewHandlerSupport(ViewHandlerSupport viewHandlerSupport)
|
void |
writeState(javax.faces.context.FacesContext context)
|
Methods inherited from class javax.faces.application.ViewHandler |
calculateCharacterEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORM_STATE_MARKER
public static final java.lang.String FORM_STATE_MARKER
- See Also:
- Constant Field Values
ViewHandlerImpl
public ViewHandlerImpl()
getViewHandler
public static javax.faces.application.ViewHandler getViewHandler(javax.faces.context.FacesContext facesContext)
- Gets the current ViewHandler via FacesContext.getApplication().getViewHandler().
We have to use this method to invoke any other specified ViewHandler-method
in the code, because direct access (this.method()) will cause problems if
the ViewHandler is wrapped.
- Parameters:
facesContext
-
- Returns:
deriveViewId
public java.lang.String deriveViewId(javax.faces.context.FacesContext context,
java.lang.String input)
- Overrides:
deriveViewId
in class javax.faces.application.ViewHandler
getBookmarkableURL
public java.lang.String getBookmarkableURL(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
boolean includeViewParams)
- Overrides:
getBookmarkableURL
in class javax.faces.application.ViewHandler
getRedirectURL
public java.lang.String getRedirectURL(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters,
boolean includeViewParams)
- Overrides:
getRedirectURL
in class javax.faces.application.ViewHandler
getViewDeclarationLanguage
public javax.faces.view.ViewDeclarationLanguage getViewDeclarationLanguage(javax.faces.context.FacesContext context,
java.lang.String viewId)
- Overrides:
getViewDeclarationLanguage
in class javax.faces.application.ViewHandler
initView
public void initView(javax.faces.context.FacesContext context)
throws javax.faces.FacesException
- Overrides:
initView
in class javax.faces.application.ViewHandler
- Throws:
javax.faces.FacesException
calculateLocale
public java.util.Locale calculateLocale(javax.faces.context.FacesContext facesContext)
- Get the locales specified as acceptable by the original request, compare them to the
locales supported by this Application and return the best match.
- Specified by:
calculateLocale
in class javax.faces.application.ViewHandler
calculateRenderKitId
public java.lang.String calculateRenderKitId(javax.faces.context.FacesContext facesContext)
- Specified by:
calculateRenderKitId
in class javax.faces.application.ViewHandler
createView
public javax.faces.component.UIViewRoot createView(javax.faces.context.FacesContext context,
java.lang.String viewId)
- Specified by:
createView
in class javax.faces.application.ViewHandler
getActionURL
public java.lang.String getActionURL(javax.faces.context.FacesContext context,
java.lang.String viewId)
- Specified by:
getActionURL
in class javax.faces.application.ViewHandler
getResourceURL
public java.lang.String getResourceURL(javax.faces.context.FacesContext facesContext,
java.lang.String path)
- Specified by:
getResourceURL
in class javax.faces.application.ViewHandler
renderView
public void renderView(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewToRender)
throws java.io.IOException,
javax.faces.FacesException
- Specified by:
renderView
in class javax.faces.application.ViewHandler
- Throws:
java.io.IOException
javax.faces.FacesException
restoreView
public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId)
- Specified by:
restoreView
in class javax.faces.application.ViewHandler
writeState
public void writeState(javax.faces.context.FacesContext context)
throws java.io.IOException
- Specified by:
writeState
in class javax.faces.application.ViewHandler
- Throws:
java.io.IOException
setViewHandlerSupport
public void setViewHandlerSupport(ViewHandlerSupport viewHandlerSupport)
getViewHandlerSupport
protected ViewHandlerSupport getViewHandlerSupport()
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.