Package org.apache.myfaces.application
Class ViewHandlerImpl
- java.lang.Object
-
- jakarta.faces.application.ViewHandler
-
- org.apache.myfaces.application.ViewHandlerImpl
-
public class ViewHandlerImpl extends ViewHandler
Faces 2.0 ViewHandler implementation- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
FORM_STATE_MARKER
-
Fields 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 Constructor Description ViewHandlerImpl()
-
Method Summary
-
Methods inherited from class jakarta.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:
deriveViewId
in classViewHandler
-
deriveLogicalViewId
public String deriveLogicalViewId(FacesContext context, String rawViewId)
- 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
public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId)
- Overrides:
getViewDeclarationLanguage
in classViewHandler
-
initView
public void initView(FacesContext context) throws FacesException
- Overrides:
initView
in 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:
calculateLocale
in classViewHandler
- Parameters:
facesContext
-
-
calculateRenderKitId
public String calculateRenderKitId(FacesContext facesContext)
- Specified by:
calculateRenderKitId
in classViewHandler
-
createView
public UIViewRoot createView(FacesContext context, String viewId)
- Specified by:
createView
in classViewHandler
-
getActionURL
public String getActionURL(FacesContext context, String viewId)
- Specified by:
getActionURL
in classViewHandler
-
getResourceURL
public String getResourceURL(FacesContext facesContext, String path)
- 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
public UIViewRoot restoreView(FacesContext context, String viewId)
- Specified by:
restoreView
in classViewHandler
-
writeState
public void writeState(FacesContext context) throws IOException
- Specified by:
writeState
in classViewHandler
- Throws:
IOException
-
addProtectedView
public void addProtectedView(String urlPattern)
- Overrides:
addProtectedView
in classViewHandler
-
removeProtectedView
public boolean removeProtectedView(String urlPattern)
- Overrides:
removeProtectedView
in classViewHandler
-
getProtectedViewsUnmodifiable
public Set<String> getProtectedViewsUnmodifiable()
- Overrides:
getProtectedViewsUnmodifiable
in 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:
getViews
in classViewHandler
-
getWebsocketURL
public String getWebsocketURL(FacesContext context, String channelAndToken)
- Specified by:
getWebsocketURL
in classViewHandler
-
-