Class Page

  • All Implemented Interfaces:
    Serializable, IterationTag, JspTag, Tag

    public class Page
    extends TagSupport
    This tag should be used together with the <base:head> and <base:body> tags on every JSP page in BASE.

    Example:

    <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
    <base:page type="default" title="Welcome to BASE">
    <base:head>
       <!-- scripts and other head things... -->
    </base:head>
    <base:body>
       Page contents go here....
    </base:body>
    </base:page>
    

    Syntax:

       <base:page
          type=default|popup|include
              title=...
              menu=...
              doctype=...
       >
    
    Tag attributes
    Attribute Default value Required Description
    type default no The type of the page. Three values are defined:
    • default: The default if no other value is specified.
    • popup: Use this value for a popup dialogue.
    • include: Use this for pages that are included as part of another page (skips generation of <html>, <body>, etc. tags).
    title - yes The title of the page.
    menu auto no The name of the menu to use on the page. This value is only used for pages with type=default. See the /include/menu.jsp file for defined menu names.
    doctype html no The doctype to use in the generated html page. The default is html which is the new HTML5 doctype. Use HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" to get the older HTML 4 doctype.
    favicon favicon.ico no The 'favicon' to use.
    Version:
    2.0
    Author:
    Nicklas
    See Also:
    Serialized Form
    • Field Detail

      • PAGE_TYPE_DEFAULT

        static final int PAGE_TYPE_DEFAULT
        This is the default page type.
        See Also:
        Constant Field Values
      • PAGE_TYPE_POPUP

        static final int PAGE_TYPE_POPUP
        The page is a popup dialouge.
        See Also:
        Constant Field Values
      • PAGE_TYPE_INCLUDE

        static final int PAGE_TYPE_INCLUDE
        This page is an included page.
        See Also:
        Constant Field Values
      • PAGE_TYPE_IFRAME

        static final int PAGE_TYPE_IFRAME
        The page is in a separate iframe .
        Since:
        3.1
        See Also:
        Constant Field Values
      • title

        private String title
        The title of the page.
      • menu

        private String menu
        The name of the menu that should be displayed on the current page. This setting is only used if the type is PAGE_TYPE_DEFAULT
      • noSkin

        private boolean noSkin
        Set to TRUE to not use skin on the page.
        Since:
        3.4
      • doctype

        private String doctype
        The <!doctype xxx> setting.
      • type

        private int type
        The type of the current page.
      • favicon

        private String favicon
        The 'favicon' to use.
      • initialized

        private static volatile boolean initialized
      • SERVER_NAME

        private static String SERVER_NAME
        The name of this webserver.
      • ROOT

        private static String ROOT
        The path to the root directory of this webserver.
      • BASE_VERSION

        private static String BASE_VERSION
        The version of BASE.
      • DEFAULT_PAGE_TITLE

        private static String DEFAULT_PAGE_TITLE
        The default page title.
        Since:
        3.12
      • MAX_URL_LENGTH

        private static String MAX_URL_LENGTH
      • sc

        private transient SessionControl sc
        The SessionControl object in use for this request.
      • scHasBeenSet

        private transient boolean scHasBeenSet
      • skinContext

        private transient JspContext skinContext
    • Constructor Detail

      • Page

        public Page()
    • Method Detail

      • ROOT

        public static String ROOT()
        Static version of getRoot().
        Since:
        3.5
      • initStaticFields

        private static void initStaticFields​(PageContext pageContext)
        Initialize static fields.
        Since:
        2.16
      • setMenu

        public void setMenu​(String menu)
      • getMenu

        public String getMenu()
      • setTitle

        public void setTitle​(String title)
      • getTitle

        public String getTitle()
      • setNoskin

        public void setNoskin​(boolean noSkin)
        Set to TRUE to disable skins.
        Since:
        3.4
      • getNoSkin

        public boolean getNoSkin()
      • setSc

        public void setSc​(SessionControl sc)
        Set the session control to use in this request.
        Since:
        3.10
      • setType

        public void setType​(String type)
      • getTypeCode

        public int getTypeCode()
      • setDoctype

        public void setDoctype​(String doctype)
      • getDoctype

        public String getDoctype()
      • setFavicon

        public void setFavicon​(String favicon)
        Since:
        3.3.1
      • getFavicon

        public String getFavicon()
      • getRoot

        public String getRoot()
      • getMaxUrlLength

        public String getMaxUrlLength()
        Since:
        2.8
      • getServerName

        public String getServerName()
      • getBaseVersion

        public String getBaseVersion()
      • getSkinContext

        public JspContext getSkinContext()
        Get the JSP context used for invoking skin extensions. Needed by HEAD taglib so that it can include required scripts and stylesheets.
        Since:
        3.4
      • getSkinActions

        public List<SkinAction> getSkinActions()
        Get all skin extension actions. Needed in BODY so that it can include data on the page.
        Since:
        3.4