Package org.apache.myfaces.application
Class ViewHandlerImpl
java.lang.Object
jakarta.faces.application.ViewHandler
org.apache.myfaces.application.ViewHandlerImpl
Faces 2.0 ViewHandler implementation
- Since:
- 2.0
-
Field Summary
FieldsFields inherited from class jakarta.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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProtectedView
(String urlPattern) 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.calculateRenderKitId
(FacesContext facesContext) createView
(FacesContext context, String viewId) deriveLogicalViewId
(FacesContext context, String rawViewId) deriveViewId
(FacesContext context, String rawViewId) getActionURL
(FacesContext context, String viewId) getBookmarkableURL
(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) getRedirectURL
(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) getResourceURL
(FacesContext facesContext, String path) getViewDeclarationLanguage
(FacesContext context, String viewId) static ViewHandler
getViewHandler
(FacesContext facesContext) Gets the current ViewHandler via FacesContext.getApplication().getViewHandler().protected ViewIdSupport
getViewIdSupport
(FacesContext context) getViews
(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) getWebsocketURL
(FacesContext context, String channelAndToken) void
initView
(FacesContext context) boolean
removeProtectedView
(String urlPattern) void
renderView
(FacesContext context, UIViewRoot viewToRender) restoreView
(FacesContext context, String viewId) void
setViewIdSupport
(ViewIdSupport viewIdSupport) void
writeState
(FacesContext context) Methods inherited from class jakarta.faces.application.ViewHandler
calculateCharacterEncoding, getViews
-
Field Details
-
FORM_STATE_MARKER
- See Also:
-
-
Constructor Details
-
ViewHandlerImpl
public ViewHandlerImpl()
-
-
Method Details
-
getViewHandler
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
- Overrides:
deriveViewId
in classViewHandler
-
deriveLogicalViewId
- Overrides:
deriveLogicalViewId
in classViewHandler
-
getBookmarkableURL
public String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) - Overrides:
getBookmarkableURL
in classViewHandler
-
getRedirectURL
public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) - Overrides:
getRedirectURL
in classViewHandler
-
getViewDeclarationLanguage
- Overrides:
getViewDeclarationLanguage
in classViewHandler
-
initView
- Overrides:
initView
in classViewHandler
- Throws:
FacesException
-
calculateLocale
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 classViewHandler
- Parameters:
facesContext
-
-
calculateRenderKitId
- Specified by:
calculateRenderKitId
in classViewHandler
-
createView
- Specified by:
createView
in classViewHandler
-
getActionURL
- Specified by:
getActionURL
in classViewHandler
-
getResourceURL
- Specified by:
getResourceURL
in classViewHandler
-
renderView
public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException - Specified by:
renderView
in classViewHandler
- Throws:
IOException
FacesException
-
restoreView
- Specified by:
restoreView
in classViewHandler
-
writeState
- Specified by:
writeState
in classViewHandler
- Throws:
IOException
-
addProtectedView
- Overrides:
addProtectedView
in classViewHandler
-
removeProtectedView
- Overrides:
removeProtectedView
in classViewHandler
-
getProtectedViewsUnmodifiable
- Overrides:
getProtectedViewsUnmodifiable
in classViewHandler
-
setViewIdSupport
-
getViewIdSupport
-
getViews
public Stream<String> getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) - Overrides:
getViews
in classViewHandler
-
getWebsocketURL
- Specified by:
getWebsocketURL
in classViewHandler
-