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 SummaryFieldsFields inherited from class jakarta.faces.application.ViewHandlerCHARACTER_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 SummaryConstructors
- 
Method SummaryModifier 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.ViewHandlercalculateCharacterEncoding, getViews
- 
Field Details- 
FORM_STATE_MARKER- See Also:
 
 
- 
- 
Constructor Details- 
ViewHandlerImplpublic ViewHandlerImpl()
 
- 
- 
Method Details- 
getViewHandlerGets 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 class- ViewHandler
 
- 
deriveLogicalViewId- Overrides:
- deriveLogicalViewIdin class- ViewHandler
 
- 
getBookmarkableURLpublic String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) - Overrides:
- getBookmarkableURLin class- ViewHandler
 
- 
getRedirectURLpublic String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams) - Overrides:
- getRedirectURLin class- ViewHandler
 
- 
getViewDeclarationLanguage- Overrides:
- getViewDeclarationLanguagein class- ViewHandler
 
- 
initView- Overrides:
- initViewin class- ViewHandler
- Throws:
- FacesException
 
- 
calculateLocaleGet 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 class- ViewHandler
- Parameters:
- facesContext-
 
- 
calculateRenderKitId- Specified by:
- calculateRenderKitIdin class- ViewHandler
 
- 
createView- Specified by:
- createViewin class- ViewHandler
 
- 
getActionURL- Specified by:
- getActionURLin class- ViewHandler
 
- 
getResourceURL- Specified by:
- getResourceURLin class- ViewHandler
 
- 
renderViewpublic void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException - Specified by:
- renderViewin class- ViewHandler
- Throws:
- IOException
- FacesException
 
- 
restoreView- Specified by:
- restoreViewin class- ViewHandler
 
- 
writeState- Specified by:
- writeStatein class- ViewHandler
- Throws:
- IOException
 
- 
addProtectedView- Overrides:
- addProtectedViewin class- ViewHandler
 
- 
removeProtectedView- Overrides:
- removeProtectedViewin class- ViewHandler
 
- 
getProtectedViewsUnmodifiable- Overrides:
- getProtectedViewsUnmodifiablein class- ViewHandler
 
- 
setViewIdSupport
- 
getViewIdSupport
- 
getViewspublic Stream<String> getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) - Overrides:
- getViewsin class- ViewHandler
 
- 
getWebsocketURL- Specified by:
- getWebsocketURLin class- ViewHandler
 
 
-