|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.component.html.util.AddResource
This is a utility class to render link to resources used by custom components. Mostly used to avoid having to include in the head of the pages before using a component.
Field Summary | |
protected static org.apache.commons.logging.Log |
log
|
Method Summary | |
static void |
addInlineScriptToHeader(java.lang.String inlineScript,
javax.faces.context.FacesContext context)
Adds the given Script to the document Header. |
static void |
addInlineStyleToHeader(java.lang.String inlineStyle,
javax.faces.context.FacesContext context)
Adds the given Style Sheet to the document Header. |
static void |
addJavaScriptHere(java.lang.Class componentClass,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Adds the given Javascript resource to the document body, without passing UIComponent. |
static void |
addJavaScriptHere(java.lang.Class componentClass,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Adds the given Javascript resource to the document body. |
static void |
addJavaScriptHere(java.lang.String baseDirectory,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Adds the given Javascript resource to the document body, without passing UIComponent. |
static void |
addJavaScriptToHeader(java.lang.Class componentClass,
java.lang.String resourceFileName,
boolean defer,
javax.faces.context.FacesContext context)
Adds the given Javascript resource to the document Header. |
static void |
addJavaScriptToHeader(java.lang.Class componentClass,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Adds the given Javascript resource to the document Header. |
static void |
addJavaScriptToHeader(java.lang.String baseDirectory,
java.lang.String resourceFileName,
boolean defer,
javax.faces.context.FacesContext context)
Adds the given Javascript resource to the document Header. |
static void |
addJavaScriptToHeader(java.lang.String baseDirectory,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Adds the given Javascript resource to the document Header. |
static void |
addStyleSheet(java.lang.Class componentClass,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Adds the given Style Sheet to the document Header. |
static void |
addStyleSheet(java.lang.String baseDirectory,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Adds the given Style Sheet to the document Header. |
protected static java.lang.String |
getComponentName(java.lang.Class componentClass)
|
static java.lang.String |
getResourceBasePath(java.lang.Class componentClass,
javax.faces.context.FacesContext context)
|
static java.lang.String |
getResourceBasePath(java.lang.String baseDirectory)
|
static java.lang.String |
getResourceBasePath(java.lang.String componentName,
java.lang.String contextPath)
|
static java.lang.String |
getResourceMappedPath(java.lang.Class componentClass,
java.lang.String resourceFileName,
javax.faces.context.FacesContext context)
Get the Path used to retrieve an internal resource for a custom component. |
protected static java.lang.String |
getResourceMappedPath(java.lang.String componentName,
java.lang.String resourceFileName,
java.lang.String contextPath)
|
static boolean |
hasAdditionalHeaderInfoToRender(javax.servlet.http.HttpServletRequest request)
|
static boolean |
isResourceMappedPath(javax.servlet.http.HttpServletRequest request)
|
static void |
serveResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static void |
writeWithFullHeader(javax.servlet.http.HttpServletRequest request,
ExtensionsResponseWrapper responseWrapper,
javax.servlet.http.HttpServletResponse response)
Add the resources to the <head> of the page. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.commons.logging.Log log
Method Detail |
public static void addJavaScriptHere(java.lang.Class componentClass, java.lang.String resourceFileName, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
java.io.IOException
public static void addJavaScriptHere(java.lang.Class componentClass, java.lang.String resourceFileName, javax.faces.context.FacesContext context) throws java.io.IOException
java.io.IOException
public static void addJavaScriptHere(java.lang.String baseDirectory, java.lang.String resourceFileName, javax.faces.context.FacesContext context) throws java.io.IOException
java.io.IOException
public static void addJavaScriptToHeader(java.lang.Class componentClass, java.lang.String resourceFileName, javax.faces.context.FacesContext context)
public static void addJavaScriptToHeader(java.lang.Class componentClass, java.lang.String resourceFileName, boolean defer, javax.faces.context.FacesContext context)
public static void addJavaScriptToHeader(java.lang.String baseDirectory, java.lang.String resourceFileName, javax.faces.context.FacesContext context)
public static void addJavaScriptToHeader(java.lang.String baseDirectory, java.lang.String resourceFileName, boolean defer, javax.faces.context.FacesContext context)
public static void addStyleSheet(java.lang.Class componentClass, java.lang.String resourceFileName, javax.faces.context.FacesContext context)
public static void addStyleSheet(java.lang.String baseDirectory, java.lang.String resourceFileName, javax.faces.context.FacesContext context)
public static void addInlineStyleToHeader(java.lang.String inlineStyle, javax.faces.context.FacesContext context)
public static void addInlineScriptToHeader(java.lang.String inlineScript, javax.faces.context.FacesContext context)
public static java.lang.String getResourceMappedPath(java.lang.Class componentClass, java.lang.String resourceFileName, javax.faces.context.FacesContext context)
AddResource.addJavaScriptOncePerPage(HtmlCalendarRenderer.class, "popcalendar.js", facesContext,
"jscalendarSetImageDirectory("+AddResource.getResourceMappedPath(HtmlCalendarRenderer.class, "DB", facesContext)+")");
Note : set context to null if you want the path after the application context path.
public static java.lang.String getResourceBasePath(java.lang.String baseDirectory)
public static java.lang.String getResourceBasePath(java.lang.Class componentClass, javax.faces.context.FacesContext context)
public static java.lang.String getResourceBasePath(java.lang.String componentName, java.lang.String contextPath)
protected static java.lang.String getResourceMappedPath(java.lang.String componentName, java.lang.String resourceFileName, java.lang.String contextPath)
public static boolean isResourceMappedPath(javax.servlet.http.HttpServletRequest request)
protected static java.lang.String getComponentName(java.lang.Class componentClass)
public static void serveResource(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOException
public static boolean hasAdditionalHeaderInfoToRender(javax.servlet.http.HttpServletRequest request)
public static void writeWithFullHeader(javax.servlet.http.HttpServletRequest request, ExtensionsResponseWrapper responseWrapper, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |