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 TypeMethodDescriptionvoidaddProtectedView(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 ViewHandlergetViewHandler(FacesContext facesContext) Gets the current ViewHandler via FacesContext.getApplication().getViewHandler().protected ViewIdSupportgetViewIdSupport(FacesContext context) getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) getWebsocketURL(FacesContext context, String channelAndToken) voidinitView(FacesContext context) booleanremoveProtectedView(String urlPattern) voidrenderView(FacesContext context, UIViewRoot viewToRender) restoreView(FacesContext context, String viewId) voidsetViewIdSupport(ViewIdSupport viewIdSupport) voidwriteState(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:
deriveViewIdin classViewHandler
-
deriveLogicalViewId
- 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
- Overrides:
getViewDeclarationLanguagein classViewHandler
-
initView
- Overrides:
initViewin 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:
calculateLocalein classViewHandler- Parameters:
facesContext-
-
calculateRenderKitId
- Specified by:
calculateRenderKitIdin classViewHandler
-
createView
- Specified by:
createViewin classViewHandler
-
getActionURL
- Specified by:
getActionURLin classViewHandler
-
getResourceURL
- Specified by:
getResourceURLin classViewHandler
-
renderView
public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException - Specified by:
renderViewin classViewHandler- Throws:
IOExceptionFacesException
-
restoreView
- Specified by:
restoreViewin classViewHandler
-
writeState
- Specified by:
writeStatein classViewHandler- Throws:
IOException
-
addProtectedView
- Overrides:
addProtectedViewin classViewHandler
-
removeProtectedView
- Overrides:
removeProtectedViewin classViewHandler
-
getProtectedViewsUnmodifiable
- Overrides:
getProtectedViewsUnmodifiablein classViewHandler
-
setViewIdSupport
-
getViewIdSupport
-
getViews
public Stream<String> getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) - Overrides:
getViewsin classViewHandler
-
getWebsocketURL
- Specified by:
getWebsocketURLin classViewHandler
-