public final class Hacks extends Object
Modifier and Type | Method and Description |
---|---|
static long |
getDefaultResourceMaxAge()
Returns the default resource maximum age in milliseconds.
|
static javax.faces.component.StateHelper |
getStateHelper(javax.faces.component.UIComponent component)
Expose protected state helper into public.
|
static boolean |
isMyFacesUsed()
Returns true if MyFaces is used.
|
static boolean |
isNestedInPrimeFacesDialog(javax.faces.component.UIComponent... components)
Returns true if the given components are nested in (same) PrimeFaces dialog.
|
static boolean |
isPrimeFacesDynamicResourceRequest(javax.faces.context.FacesContext context)
Returns true if the current request is a PrimeFaces dynamic resource request.
|
static boolean |
isTomcatWebSocketBombed(javax.websocket.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 |
removeResourceDependencyState(javax.faces.context.FacesContext context)
Remove the resource dependency processing related attributes from the given faces context.
|
static void |
removeViewState(javax.faces.context.FacesContext context,
javax.faces.render.ResponseStateManager manager,
String viewId)
Remove server side JSF view state (and view scoped beans) associated with current request.
|
static void |
setComponentResourceUniqueId(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent resource)
Set the unique ID of the component resource, taking into account MyFaces-specific way of generating a
resource specific unique ID.
|
public static boolean isMyFacesUsed()
public static long getDefaultResourceMaxAge()
public static void removeResourceDependencyState(javax.faces.context.FacesContext context)
context
- The involved faces context.public static void setComponentResourceUniqueId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent resource)
context
- The involved faces context.resource
- The involved component resource.public static void removeViewState(javax.faces.context.FacesContext context, javax.faces.render.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 javax.faces.component.StateHelper getStateHelper(javax.faces.component.UIComponent component)
component
- The component to obtain state helper for.public static boolean isPrimeFacesDynamicResourceRequest(javax.faces.context.FacesContext context)
context
- The involved faces context.public static boolean isNestedInPrimeFacesDialog(javax.faces.component.UIComponent... components)
components
- The components to be checked.public static boolean isTomcatWebSocketBombed(javax.websocket.Session session, IllegalStateException illegalStateException)
session
- The WS session.illegalStateException
- The illegal state exception.Copyright © 2012–2017 OmniFaces. All rights reserved.