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
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:
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private String
private Page
The parent <base:page> tag.private static final Pattern
private String
A comma-separated list of JavaScript filenames.private static final long
private String
A comma-separated list of stylesheets filenames.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
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
appendScripts
(StringBuilder sb, JspContext jspContext) private void
appendStyles
(StringBuilder sb, String fontStyles, boolean hideLongTexts, JspContext jspContext) int
doEndTag()
int
static final 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
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:
-
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
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
-