public final class Hacks extends Object
Modifier and Type | Method and Description |
---|---|
static long |
getDefaultResourceMaxAge()
Returns the default resource maximum age in milliseconds.
|
static PartialViewContext |
getRichFacesPartialViewContext()
RichFaces 4.0-4.3 ExtendedPartialViewContextImpl does not extend from PartialViewContextWrapper.
|
static Collection<String> |
getRichFacesRenderIds()
RichFaces PartialViewContext implementation does not have the getRenderIds() method properly implemented.
|
static Set<ResourceIdentifier> |
getRichFacesResourceLibraryResources(ResourceIdentifier id)
Returns an ordered set of all JSF resource identifiers for the given RichFaces resource library resources.
|
static PartialViewContext |
getRichFacesWrappedPartialViewContext()
RichFaces 4.0-4.3 ExtendedPartialViewContextImpl does not have any getWrapped() method to return the wrapped
PartialViewContext.
|
static StateHelper |
getStateHelper(UIComponent component)
Expose protected state helper into public.
|
static boolean |
isMyFacesUsed()
Returns true if MyFaces is used.
|
static boolean |
isPrimeFacesDynamicResourceRequest(FacesContext context)
Returns true if the current request is a PrimeFaces dynamic resource request.
|
static boolean |
isRichFacesInstalled()
Returns true if RichFaces 4.x is installed.
|
static boolean |
isRichFacesResourceLibraryRenderer(String rendererType)
Returns true if the given renderer type is recognizeable as RichFaces resource library renderer.
|
static boolean |
isScriptResourceRendered(FacesContext context,
ResourceIdentifier id)
Returns whether the given script resource is rendered.
|
static boolean |
isTomcatWebSocketBombed(Session session,
IllegalStateException illegalStateException)
Returns true if the given WS session is from Tomcat and given illegal state exception is caused by a push bomb
which Tomcat couldn't handle.
|
static void |
removeViewState(FacesContext context,
ResponseStateManager manager,
String viewId)
Remove server side JSF view state associated with current request.
|
static void |
setScriptResourceRendered(FacesContext context,
ResourceIdentifier id)
Set the given script resource as rendered.
|
static void |
setStylesheetResourceRendered(FacesContext context,
ResourceIdentifier id)
Set the given stylesheet resource as rendered.
|
public static boolean isRichFacesInstalled()
Note that RichFaces 4.4 doesn't exist.
public static PartialViewContext getRichFacesPartialViewContext()
FacesContext.getPartialViewContext()
.public static Collection<String> getRichFacesRenderIds()
public static PartialViewContext getRichFacesWrappedPartialViewContext()
public static boolean isRichFacesResourceLibraryRenderer(String rendererType)
rendererType
- The renderer type to be checked.public static Set<ResourceIdentifier> getRichFacesResourceLibraryResources(ResourceIdentifier id)
id
- The resource identifier of the RichFaces resource library (e.g. org.richfaces:ajax.reslib).public static boolean isMyFacesUsed()
public static void setScriptResourceRendered(FacesContext context, ResourceIdentifier id)
context
- The involved faces context.id
- The resource identifier.public static boolean isScriptResourceRendered(FacesContext context, ResourceIdentifier id)
context
- The involved faces context.id
- The resource identifier.public static void setStylesheetResourceRendered(FacesContext context, ResourceIdentifier id)
context
- The involved faces context.id
- The resource identifier.public static long getDefaultResourceMaxAge()
public static void removeViewState(FacesContext context, ResponseStateManager manager, String viewId)
context
- The involved faces context.manager
- The involved response state manager.viewId
- The view ID of the involved view.public static StateHelper getStateHelper(UIComponent component)
component
- The component to obtain state helper for.public static boolean isPrimeFacesDynamicResourceRequest(FacesContext context)
context
- The involved faces context.public static boolean isTomcatWebSocketBombed(Session session, IllegalStateException illegalStateException)
session
- The WS session.illegalStateException
- The illegal state exception.Copyright © 2012–2016 OmniFaces. All rights reserved.