Package 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
-
-
Field Summary
Fields Modifier and Type Field Description static StringFORM_STATE_MARKER-
Fields inherited from class javax.faces.application.ViewHandler
CHARACTER_ENCODING_KEY, DEFAULT_FACELETS_SUFFIX, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME, FACELETS_BUFFER_SIZE_PARAM_NAME, FACELETS_DECORATORS_PARAM_NAME, FACELETS_LIBRARIES_PARAM_NAME, FACELETS_REFRESH_PERIOD_PARAM_NAME, FACELETS_SKIP_COMMENTS_PARAM_NAME, FACELETS_SUFFIX_PARAM_NAME, FACELETS_VIEW_MAPPINGS_PARAM_NAME
-
-
Constructor Summary
Constructors Constructor Description ViewHandlerImpl()
-
Method Summary
-
Methods inherited from class javax.faces.application.ViewHandler
calculateCharacterEncoding, getViews
-
-
-
-
Field Detail
-
FORM_STATE_MARKER
public static final String FORM_STATE_MARKER
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 rawViewId)
- Overrides:
deriveViewIdin classViewHandler
-
deriveLogicalViewId
public String deriveLogicalViewId(FacesContext context, String rawViewId)
- Overrides:
deriveLogicalViewIdin classViewHandler
-
getBookmarkableURL
public String getBookmarkableURL(FacesContext context, String viewId, Map<String,List<String>> parameters, boolean includeViewParams)
- Overrides:
getBookmarkableURLin classViewHandler
-
getRedirectURL
public String getRedirectURL(FacesContext context, String viewId, Map<String,List<String>> parameters, boolean includeViewParams)
- Overrides:
getRedirectURLin classViewHandler
-
getViewDeclarationLanguage
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId)
- Overrides:
getViewDeclarationLanguagein classViewHandler
-
initView
public void initView(FacesContext context) throws FacesException
- Overrides:
initViewin classViewHandler- 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:
calculateLocalein classViewHandler- Parameters:
facesContext-
-
calculateRenderKitId
public String calculateRenderKitId(FacesContext facesContext)
- Specified by:
calculateRenderKitIdin classViewHandler
-
createView
public UIViewRoot createView(FacesContext context, String viewId)
- Specified by:
createViewin classViewHandler
-
getActionURL
public String getActionURL(FacesContext context, String viewId)
- Specified by:
getActionURLin classViewHandler
-
getResourceURL
public String getResourceURL(FacesContext facesContext, String path)
- Specified by:
getResourceURLin classViewHandler
-
renderView
public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException
- Specified by:
renderViewin classViewHandler- Throws:
IOExceptionFacesException
-
restoreView
public UIViewRoot restoreView(FacesContext context, String viewId)
- Specified by:
restoreViewin classViewHandler
-
writeState
public void writeState(FacesContext context) throws IOException
- Specified by:
writeStatein classViewHandler- Throws:
IOException
-
addProtectedView
public void addProtectedView(String urlPattern)
- Overrides:
addProtectedViewin classViewHandler
-
removeProtectedView
public boolean removeProtectedView(String urlPattern)
- Overrides:
removeProtectedViewin classViewHandler
-
getProtectedViewsUnmodifiable
public Set<String> getProtectedViewsUnmodifiable()
- Overrides:
getProtectedViewsUnmodifiablein classViewHandler
-
setViewIdSupport
public void setViewIdSupport(ViewIdSupport viewIdSupport)
-
getViewIdSupport
protected ViewIdSupport getViewIdSupport(FacesContext context)
-
getViews
public Stream<String> getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options)
- Overrides:
getViewsin classViewHandler
-
getWebsocketURL
public String getWebsocketURL(FacesContext context, String channelAndToken)
- Specified by:
getWebsocketURLin classViewHandler
-
-