Class 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:
    Serialized Form
    • Field Detail

      • 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 Detail

      • Head

        public Head()
    • Method Detail

      • 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(String)
      • 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()