2.17.2: 2011-06-17

net.sf.basedb.clients.web.taglib
Class Page

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.sf.basedb.clients.web.taglib.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|frameset|include
                title=...
                menu=...
   >

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.
  • frameset: Use this for pages containing a frameset.
  • 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 standard 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.

Version:
2.0
Author:
Nicklas
See Also:
Serialized Form

Field Summary
private static String BASE_VERSION
          The version of BASE.
private static boolean initialized
           
private static String MAX_URL_LENGTH
           
private  String menu
          The name of the menu that should be displayed on the current page.
(package private) static int PAGE_TYPE_DEFAULT
          This is the default page type.
(package private) static int PAGE_TYPE_FRAMESET
          The page is a frameset.
(package private) static int PAGE_TYPE_INCLUDE
          This page is an included page.
(package private) static int PAGE_TYPE_POPUP
          The page is a popup dialouge.
private static String ROOT
          The path to the root directory of this webserver.
private  SessionControl sc
          The SessionControl object in use for this request.
private static long serialVersionUID
           
private static String SERVER_NAME
          The name of this webserver.
private  String title
          The title of the page.
private  int type
          The type of the current page.
 
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
Page()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 String getBaseVersion()
           
 String getMaxUrlLength()
           
 String getMenu()
           
 String getRoot()
           
 String getServerName()
           
 SessionControl getSessionControl()
           
 String getTitle()
           
 int getTypeCode()
           
private static void initStaticFields(PageContext pageContext)
          Initialize static fields.
 void setMenu(String menu)
           
 void setPageContext(PageContext pageContext)
           
 void setTitle(String title)
           
 void setType(String type)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

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_FRAMESET

static final int PAGE_TYPE_FRAMESET
The page is a frameset.

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

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


type

private int type
The type of the current page.


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.


MAX_URL_LENGTH

private static String MAX_URL_LENGTH

sc

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

Constructor Detail

Page

public Page()
Method Detail

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

setType

public void setType(String type)

getTypeCode

public int getTypeCode()

getRoot

public String getRoot()

getMaxUrlLength

public String getMaxUrlLength()
Since:
2.8

getServerName

public String getServerName()

getBaseVersion

public String getBaseVersion()

getSessionControl

public SessionControl getSessionControl()

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

2.17.2: 2011-06-17