|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opencms.jsp.CmsJspTagHeadIncludes
public class CmsJspTagHeadIncludes
This tag includes required CSS or JavaScript resources that are to be places in the HTML head.
Required resources can be configured in the resource type schema. Set attribute type to 'css' to include css resources or to 'javascript' to include JavaScript resources.
| Field Summary | |
|---|---|
static java.lang.String |
TYPE_CSS
The include type CSS. |
static java.lang.String |
TYPE_JAVASCRIPT
The include type java-script. |
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
|---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
|---|---|
CmsJspTagHeadIncludes()
|
|
| Method Summary | |
|---|---|
static void |
addParameter(java.util.Map<java.lang.String,java.lang.String[]> parameters,
java.lang.String name,
java.lang.String value,
boolean overwrite)
Adds parameters to a parameter Map that can be used for a http request. |
void |
addParameter(java.lang.String name,
java.lang.String value)
Add a parameter to this tag. |
int |
doEndTag()
|
int |
doStartTag()
Returns . |
static java.util.Set<java.lang.String> |
getCSSHeadIncludes(CmsObject cms,
CmsResource resource)
Returns the configured CSS head include resources. |
java.lang.String |
getDefaults()
Returns the default include resources separated by '|'. |
static java.util.Set<java.lang.String> |
getJSHeadIncludes(CmsObject cms,
CmsResource resource)
Returns the configured JavaScript head include resources. |
java.lang.String |
getType()
Returns the type. |
void |
setClosetags(java.lang.String closeTags)
Sets the value of the closetags attribute. |
void |
setDefaults(java.lang.String defaults)
Sets the default include resources separated by '|'. |
void |
setType(java.lang.String type)
Sets the type. |
boolean |
shouldCloseTags()
Returns true if the headincludes tag should be closed. |
void |
tagCssAction(CmsObject cms,
javax.servlet.ServletRequest req)
Action to include the CSS resources. |
void |
tagJSAction(CmsObject cms,
javax.servlet.ServletRequest req)
Action to include the java-script resources. |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
getParent, setPageContext, setParent |
| Field Detail |
|---|
public static final java.lang.String TYPE_CSS
public static final java.lang.String TYPE_JAVASCRIPT
| Constructor Detail |
|---|
public CmsJspTagHeadIncludes()
| Method Detail |
|---|
public static void addParameter(java.util.Map<java.lang.String,java.lang.String[]> parameters,
java.lang.String name,
java.lang.String value,
boolean overwrite)
parameters - the Map to add the parameters toname - the name to addvalue - the value to addoverwrite - if true, a parameter in the map will be overwritten by
a parameter with the same name, otherwise the request will have multiple parameters
with the same name (which is possible in http requests)
public static java.util.Set<java.lang.String> getCSSHeadIncludes(CmsObject cms,
CmsResource resource)
cms - the current cms contextresource - the resource
public static java.util.Set<java.lang.String> getJSHeadIncludes(CmsObject cms,
CmsResource resource)
throws CmsLoaderException
cms - the current cms contextresource - the resource
CmsLoaderException - if something goes wrong reading the resource type
public void addParameter(java.lang.String name,
java.lang.String value)
I_CmsJspTagParamParent
addParameter in interface I_CmsJspTagParamParentname - the name of the parametervalue - the value of the parameterI_CmsJspTagParamParent.addParameter(java.lang.String, java.lang.String)
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportEVAL_PAGE
javax.servlet.jsp.JspException - by interface defaultTag.doEndTag()public int doStartTag()
BodyTag.EVAL_BODY_BUFFERED.
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportBodyTag.EVAL_BODY_BUFFEREDTag.doStartTag()public java.lang.String getDefaults()
public java.lang.String getType()
public void setClosetags(java.lang.String closeTags)
closeTags - the value of the closetags attributepublic void setDefaults(java.lang.String defaults)
defaults - the default include resources to setpublic void setType(java.lang.String type)
type - the type to setpublic boolean shouldCloseTags()
public void tagCssAction(CmsObject cms,
javax.servlet.ServletRequest req)
throws CmsException,
java.io.IOException
cms - the current cms contextreq - the current request
CmsException - if something goes wrong reading the resources
java.io.IOException - if something goes wrong writing to the response out
public void tagJSAction(CmsObject cms,
javax.servlet.ServletRequest req)
throws CmsException,
java.io.IOException
cms - the current cms contextreq - the current request
CmsException - if something goes wrong reading the resources
java.io.IOException - if something goes wrong writing to the response out
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||