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=...
   >
Tag attributes
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 Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • xtVersions

      private static final Map<String,String> xtVersions
    • PATH_MATCH

      private static final Pattern PATH_MATCH
    • page

      private Page page
      The parent <base:page> tag.
    • styles

      private String styles
      A comma-separated list of stylesheets filenames.
    • scripts

      private String scripts
      A comma-separated list of JavaScript filenames.
    • globalVersion

      private static final String globalVersion
    • localVersion

      private String localVersion
  • Constructor Details

    • Head

      public Head()
  • Method Details

    • setExtensionVersion

      public static void setExtensionVersion(String jarName, String version)
      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

      public static final String getVersionParameter(String absolutePath)
      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

      public void setStyles(String styles)
    • getStyles

      public String getStyles()
    • setScripts

      public void setScripts(String scripts)
    • getScripts

      public String getScripts()
    • appendStyles

      private void appendStyles(StringBuilder sb, String fontStyles, boolean hideLongTexts, JspContext jspContext)
    • appendScripts

      private void appendScripts(StringBuilder sb, JspContext jspContext)
    • setPageContext

      public void setPageContext(PageContext pageContext)
      Specified by:
      setPageContext in interface Tag
      Overrides:
      setPageContext in class TagSupport
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Throws:
      JspException
    • doEndTag

      public int doEndTag() throws JspException
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Throws:
      JspException