org.apache.myfaces.application
Class ViewHandlerImpl
java.lang.Object
javax.faces.application.ViewHandler
org.apache.myfaces.application.ViewHandlerImpl
public class ViewHandlerImpl
- extends ViewHandler
JSF 2.0 ViewHandler implementation
- Since:
- 2.0
Method Summary |
Locale |
calculateLocale(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. |
String |
calculateRenderKitId(FacesContext facesContext)
|
UIViewRoot |
createView(FacesContext context,
String viewId)
|
String |
deriveViewId(FacesContext context,
String input)
|
String |
getActionURL(FacesContext context,
String viewId)
|
String |
getBookmarkableURL(FacesContext context,
String viewId,
Map<String,List<String>> parameters,
boolean includeViewParams)
|
String |
getRedirectURL(FacesContext context,
String viewId,
Map<String,List<String>> parameters,
boolean includeViewParams)
|
String |
getResourceURL(FacesContext facesContext,
String path)
|
ViewDeclarationLanguage |
getViewDeclarationLanguage(FacesContext context,
String viewId)
|
static ViewHandler |
getViewHandler(FacesContext facesContext)
Gets the current ViewHandler via FacesContext.getApplication().getViewHandler(). |
protected ViewHandlerSupport |
getViewHandlerSupport()
|
void |
initView(FacesContext context)
|
void |
renderView(FacesContext context,
UIViewRoot viewToRender)
|
UIViewRoot |
restoreView(FacesContext context,
String viewId)
|
void |
setViewHandlerSupport(ViewHandlerSupport viewHandlerSupport)
|
void |
writeState(FacesContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORM_STATE_MARKER
public static final String FORM_STATE_MARKER
- See Also:
- Constant Field Values
ViewHandlerImpl
public ViewHandlerImpl()
getViewHandler
public static ViewHandler getViewHandler(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 String deriveViewId(FacesContext context,
String input)
- Overrides:
deriveViewId
in class ViewHandler
getBookmarkableURL
public String getBookmarkableURL(FacesContext context,
String viewId,
Map<String,List<String>> parameters,
boolean includeViewParams)
- Overrides:
getBookmarkableURL
in class ViewHandler
getRedirectURL
public String getRedirectURL(FacesContext context,
String viewId,
Map<String,List<String>> parameters,
boolean includeViewParams)
- Overrides:
getRedirectURL
in class ViewHandler
getViewDeclarationLanguage
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context,
String viewId)
- Overrides:
getViewDeclarationLanguage
in class ViewHandler
initView
public void initView(FacesContext context)
throws FacesException
- Overrides:
initView
in class ViewHandler
- Throws:
FacesException
calculateLocale
public Locale calculateLocale(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 ViewHandler
calculateRenderKitId
public String calculateRenderKitId(FacesContext facesContext)
- Specified by:
calculateRenderKitId
in class ViewHandler
createView
public UIViewRoot createView(FacesContext context,
String viewId)
- Specified by:
createView
in class ViewHandler
getActionURL
public String getActionURL(FacesContext context,
String viewId)
- Specified by:
getActionURL
in class ViewHandler
getResourceURL
public String getResourceURL(FacesContext facesContext,
String path)
- Specified by:
getResourceURL
in class ViewHandler
renderView
public void renderView(FacesContext context,
UIViewRoot viewToRender)
throws IOException,
FacesException
- Specified by:
renderView
in class ViewHandler
- Throws:
IOException
FacesException
restoreView
public UIViewRoot restoreView(FacesContext context,
String viewId)
- Specified by:
restoreView
in class ViewHandler
writeState
public void writeState(FacesContext context)
throws IOException
- Specified by:
writeState
in class ViewHandler
- Throws:
IOException
setViewHandlerSupport
public void setViewHandlerSupport(ViewHandlerSupport viewHandlerSupport)
getViewHandlerSupport
protected ViewHandlerSupport getViewHandlerSupport()
Copyright © 2010 The Apache Software Foundation. All Rights Reserved.