Package net.sf.basedb.clients.web.taglib
Class Head
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
net.sf.basedb.clients.web.taglib.Head
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
public class Head extends TagSupport
This tag defines the header section of a page. It must be located inside
a
<base:page>
ag.
Syntax:
<base:head styles=... scripts=... >
Attribute | Default value | Required | Description |
styles | - | no |
A comma-separated list of stylesheet filenames that is needed by the page.
The main.css are menu.css automatically included.
The stylesheets must be located in the /include/styles folder.
Do not include the folder names in the stylesheet filename.
|
scripts | - | no |
A comma-separated list of javascript filenames that is needed by the page.
The main.js are menu.js automatically included.
The scripts must be located in the /include/scripts folder.
Do not include the folder names in the scripts filename.
|
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private static String
globalVersion
private String
localVersion
private Page
page
The parent <base:page> tag.private static Pattern
PATH_MATCH
private String
scripts
A comma-separated list of JavaScript filenames.private static long
serialVersionUID
private String
styles
A comma-separated list of stylesheets filenames.private static Map<String,String>
xtVersions
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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
Constructors Constructor Description Head()
-
Method Summary
Modifier and Type Method Description private void
appendScripts(StringBuilder sb, JspContext jspContext)
private void
appendStyles(StringBuilder sb, String fontStyles, boolean hideLongTexts, JspContext jspContext)
int
doEndTag()
int
doStartTag()
String
getScripts()
String
getStyles()
static String
getVersionParameter(String absolutePath)
Get query parameter to the given absolute path (including root directory).static void
setExtensionVersion(String jarName, String version)
Register the version for an exteniosn JAR file.void
setPageContext(PageContext pageContext)
void
setScripts(String scripts)
void
setStyles(String styles)
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
xtVersions
-
PATH_MATCH
-
page
The parent <base:page> tag. -
styles
A comma-separated list of stylesheets filenames. -
scripts
A comma-separated list of JavaScript filenames. -
globalVersion
-
localVersion
-
-
Constructor Details
-
Head
public Head()
-
-
Method Details
-
setExtensionVersion
Register the version for an exteniosn JAR file. Used for appending a query parameter to all scripts and style sheets to prevent that browsers cache the old version.- Since:
- 3.3.2
- See Also:
getVersionParameter(String)
-
getVersionParameter
Get query parameter to the given absolute path (including root directory). If the path points to a file in the /base-root/extensions/ directory the version of the extension is used, otherwise the BASE version is used. The returned parameter is of the form v=<version>.- Parameters:
absolutePath
- An absolute path with or without the base-root directory- Since:
- 3.3.2
-
setStyles
-
getStyles
-
setScripts
-
getScripts
-
appendStyles
private void appendStyles(StringBuilder sb, String fontStyles, boolean hideLongTexts, JspContext jspContext) -
appendScripts
-
setPageContext
- Specified by:
setPageContext
in interfaceTag
- Overrides:
setPageContext
in classTagSupport
-
doStartTag
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-
doEndTag
- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Throws:
JspException
-