public class CmsJspTagHeadIncludes extends javax.servlet.jsp.tagext.BodyTagSupport implements I_CmsJspTagParamParent
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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_CSS
The include type CSS.
|
static java.lang.String |
TYPE_JAVASCRIPT
The include type java-script.
|
| Constructor and Description |
|---|
CmsJspTagHeadIncludes() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected void |
collectHeadIncludesForContainerElement(CmsObject cms,
javax.servlet.ServletRequest req,
CmsJspStandardContextBean standardContext,
CmsContainerPageBean containerPage,
java.lang.String includeType,
java.util.Set<java.lang.String> headincludes,
java.util.Map<java.lang.String,java.lang.String> inline)
Collects the head includes for a given container element.
|
int |
doEndTag() |
int |
doStartTag()
Returns
. |
java.lang.String |
getDefaults()
Returns the default include resources separated by '|'.
|
java.lang.String |
getDetailtype()
Returns the detail container type.
|
java.lang.String |
getDetailwidth()
Returns the detail container width.
|
protected static java.util.List<java.lang.String> |
getHeadIncludes(I_CmsFormatterBean formatter,
java.lang.String type)
Gets the head includes for the given formatter bean.
|
protected static java.lang.String |
getInlineData(I_CmsFormatterBean formatter,
java.lang.String type)
Gets the inline CSS/Javascrip for the given formatter bean.
|
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 |
setDetailtype(java.lang.String detailType)
Sets the detail container type.
|
void |
setDetailwidth(java.lang.String detailWidth)
Sets the detail container width.
|
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.http.HttpServletRequest req)
Action to include the CSS resources.
|
void |
tagJSAction(CmsObject cms,
javax.servlet.http.HttpServletRequest req)
Action to include the java-script resources.
|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValuepublic static final java.lang.String TYPE_CSS
public static final java.lang.String TYPE_JAVASCRIPT
public CmsJspTagHeadIncludes()
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)protected static java.util.List<java.lang.String> getHeadIncludes(I_CmsFormatterBean formatter, java.lang.String type)
formatter - the formatter beantype - the head include typeprotected static java.lang.String getInlineData(I_CmsFormatterBean formatter, java.lang.String type)
formatter - the formatter beantype - the type (CSS or Javascript)public void addParameter(java.lang.String name, java.lang.String value)
I_CmsJspTagParamParentaddParameter 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_PAGEjavax.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 getDetailtype()
public java.lang.String getDetailwidth()
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 setDetailtype(java.lang.String detailType)
detailType - the detail container type to setpublic void setDetailwidth(java.lang.String detailWidth)
detailWidth - the detail container width to setpublic void setType(java.lang.String type)
type - the type to setpublic boolean shouldCloseTags()
public void tagCssAction(CmsObject cms, javax.servlet.http.HttpServletRequest req) throws CmsException, java.io.IOException
cms - the current cms contextreq - the current requestCmsException - if something goes wrong reading the resourcesjava.io.IOException - if something goes wrong writing to the response outpublic void tagJSAction(CmsObject cms, javax.servlet.http.HttpServletRequest req) throws CmsException, java.io.IOException
cms - the current cms contextreq - the current requestCmsException - if something goes wrong reading the resourcesjava.io.IOException - if something goes wrong writing to the response outprotected void collectHeadIncludesForContainerElement(CmsObject cms, javax.servlet.ServletRequest req, CmsJspStandardContextBean standardContext, CmsContainerPageBean containerPage, java.lang.String includeType, java.util.Set<java.lang.String> headincludes, java.util.Map<java.lang.String,java.lang.String> inline)
cms - the current CMS contextreq - the current requeststandardContext - the current standard contextcontainerPage - the current container pageincludeType - the type of head includes (CSS or Javascript)headincludes - the set to which normal head includes should be addedinline - the map to which inline head includes should be added