public class FacesViewsViewHandler extends ViewHandlerWrapper
Implementation note: this is installed by ApplicationProcessor
during the PostConstructApplicationEvent
, in
which it's guaranteed that Faces initialization (typically done via a ServletContextListener
) has
been done. Setting a view handler programmatically requires the Faces Application
to be present
which isn't the case before Faces initialization has been done.
Additionally, the view handler needs to be set BEFORE the first faces request is processed. Putting
the view handler setting code in a Filter.init(javax.servlet.FilterConfig)
method only works
when all init methods are called during startup, OR when the filter filters every request.
For a guide on FacesViews, please see the package summary.
FacesViews
,
ApplicationProcessor
CHARACTER_ENCODING_KEY, DEFAULT_FACELETS_SUFFIX, DEFAULT_SUFFIX, DEFAULT_SUFFIX_PARAM_NAME, DISABLE_FACELET_JSF_VIEWHANDLER_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 and Description |
---|
FacesViewsViewHandler(ViewHandler wrapped) |
Modifier and Type | Method and Description |
---|---|
String |
deriveLogicalViewId(FacesContext context,
String viewId) |
String |
deriveViewId(FacesContext context,
String viewId) |
String |
getActionURL(FacesContext context,
String viewId) |
addProtectedView, calculateCharacterEncoding, calculateLocale, calculateRenderKitId, createView, getBookmarkableURL, getProtectedViewsUnmodifiable, getRedirectURL, getResourceURL, getViewDeclarationLanguage, getViews, getViews, getWebsocketURL, getWrapped, initView, removeProtectedView, renderView, restoreView, writeState
public FacesViewsViewHandler(ViewHandler wrapped)
public String deriveViewId(FacesContext context, String viewId)
deriveViewId
in class ViewHandlerWrapper
public String deriveLogicalViewId(FacesContext context, String viewId)
deriveLogicalViewId
in class ViewHandlerWrapper
public String getActionURL(FacesContext context, String viewId)
getActionURL
in class ViewHandlerWrapper
Copyright © 2012–2018 OmniFaces. All rights reserved.