Package com.webmethods.caf.faces.view
Class BaseViewHandler
java.lang.Object
javax.faces.application.ViewHandler
javax.faces.application.ViewHandlerWrapper
com.webmethods.caf.faces.view.BaseViewHandler
- All Implemented Interfaces:
FacesWrapper<ViewHandler>
- Direct Known Subclasses:
XMLViewHandler
Base faces ViewHandler.
Only handles views whose ID matches filter.
Optionally caches view builder apparatus.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
protected Map<String,
ViewBuilder> protected Pattern
protected ViewHandler
protected Boolean
protected static final int
static final String
static final String
static final String
Deprecated.Fields inherited from class javax.faces.application.ViewHandler
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears entire ViewBuilder cache.void
clearBuilderFromCache
(String viewId) Removes cached ViewBuilder for view ID.abstract ViewBuilder
createBuilder
(FacesContext ctx, String viewId) createView
(FacesContext ctx, String viewId) getBuilderFromCache
(String viewId) protected Pattern
getFilter
(FacesContext ctx) getResourceURL
(FacesContext ctx, String path) boolean
matchesFilter
(FacesContext ctx, String viewId) void
putBuilderIntoCache
(String viewId, ViewBuilder builder) Caches ViewBuilder for view ID.boolean
useCache()
True to use ViewBuilder cache.Methods inherited from class javax.faces.application.ViewHandlerWrapper
addProtectedView, calculateCharacterEncoding, calculateLocale, calculateRenderKitId, deriveLogicalViewId, deriveViewId, getActionURL, getBookmarkableURL, getProtectedViewsUnmodifiable, getRedirectURL, getViewDeclarationLanguage, getViews, getViews, getWebsocketURL, initView, removeProtectedView, renderView, restoreView, writeState
-
Field Details
-
INIT_PARAM_FILTER
- See Also:
-
INIT_PARAM_CACHE
- See Also:
-
VIEW_FRAGMENT
- See Also:
-
VIEW_FRAGMENT_CLIENT_ID
Deprecated.- See Also:
-
INJECT_STATE
- See Also:
-
NO_RENDER
- See Also:
-
MAX_VIEWS
protected static final int MAX_VIEWS- See Also:
-
FILTER_KEY
- See Also:
-
m_parent
-
m_builders
-
m_filter
-
m_useCache
-
-
Constructor Details
-
BaseViewHandler
Standard ViewHandler constructor.
-
-
Method Details
-
getWrapped
- Specified by:
getWrapped
in interfaceFacesWrapper<ViewHandler>
- Overrides:
getWrapped
in classViewHandlerWrapper
-
createView
- Overrides:
createView
in classViewHandlerWrapper
-
getResourceURL
- Overrides:
getResourceURL
in classViewHandlerWrapper
-
getBuilderFromCache
- Returns:
- Cached ViewBuilder for view ID or null.
-
putBuilderIntoCache
Caches ViewBuilder for view ID. -
clearBuilderFromCache
Removes cached ViewBuilder for view ID. Does nothing if not cached. -
clearBuilderCache
public void clearBuilderCache()Clears entire ViewBuilder cache. -
useCache
public boolean useCache()True to use ViewBuilder cache. -
createBuilder
- Returns:
- ViewBuilder for view ID.
-
matchesFilter
- Returns:
- True if the view ID matches this handler's filter.
-
getFilter
- Returns:
- Regexp that matches view IDs that this handler should handle.
-