public class ResourceHelper
extends java.lang.Object
ResourceServlet
.
The resource paths are cached so that a particular resource link is only rendered once per request.Modifier and Type | Method and Description |
---|---|
static void |
beginCombineStyles(javax.faces.context.FacesContext facesContext) |
static void |
beginScriptBlock(javax.faces.context.FacesContext facesContext) |
static void |
endCombineStyles(javax.faces.context.FacesContext facesContext) |
static void |
endScriptBlock(javax.faces.context.FacesContext facesContext) |
static void |
renderDojoInclude(javax.faces.context.FacesContext facesContext,
java.lang.String module)
Render a
tag for a given dojo include. |
static void |
renderResource(javax.faces.context.FacesContext facesContext,
java.lang.String resourcePath)
Renders either a script or style resource depending on the resourcePath
|
static void |
renderScriptLink(javax.faces.context.FacesContext facesContext,
java.lang.String scriptPath)
Render a
tag for a given script resource. |
static void |
renderScriptLink(javax.faces.context.FacesContext facesContext,
java.lang.String scriptPath,
java.util.Map attributes)
Render a
tag for a given script resource. |
static void |
renderStyleLink(javax.faces.context.FacesContext facesContext,
java.lang.String cssPath)
Render a
tag for a given stylesheet resource. |
public static void renderResource(javax.faces.context.FacesContext facesContext, java.lang.String resourcePath) throws java.io.IOException
facesContext
- resourcePath
- java.io.IOException
public static void renderScriptLink(javax.faces.context.FacesContext facesContext, java.lang.String scriptPath) throws java.io.IOException
tag for a given script resource.facesContext
- scriptPath
- java.io.IOException
public static void renderScriptLink(javax.faces.context.FacesContext facesContext, java.lang.String scriptPath, java.util.Map attributes) throws java.io.IOException
tag for a given script resource.facesContext
- scriptPath
- attributes
- - a map of additional attributes to render on the script tagjava.io.IOException
public static void renderStyleLink(javax.faces.context.FacesContext facesContext, java.lang.String cssPath) throws java.io.IOException
tag for a given stylesheet resource.facesContext
- cssPath
- java.io.IOException
public static void renderDojoInclude(javax.faces.context.FacesContext facesContext, java.lang.String module) throws java.io.IOException
tag for a given dojo include.facesContext
- module
- java.io.IOException
public static void beginCombineStyles(javax.faces.context.FacesContext facesContext)
public static void endCombineStyles(javax.faces.context.FacesContext facesContext) throws java.io.IOException
java.io.IOException
public static void beginScriptBlock(javax.faces.context.FacesContext facesContext) throws java.io.IOException
java.io.IOException
public static void endScriptBlock(javax.faces.context.FacesContext facesContext) throws java.io.IOException
java.io.IOException