Package net.sf.basedb.clients.web.taglib
Class Page
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- 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|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 Summary
Fields Modifier and Type Field Description private static String
BASE_VERSION
The version of BASE.private static String
DEFAULT_PAGE_TITLE
The default page title.private String
doctype
The <!private String
favicon
The 'favicon' to use.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.private boolean
noSkin
Set to TRUE to not use skin on the page.(package private) static int
PAGE_TYPE_DEFAULT
This is the default page type.(package private) static int
PAGE_TYPE_IFRAME
The page is in a separate iframe .(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 boolean
scHasBeenSet
private static long
serialVersionUID
private static String
SERVER_NAME
The name of this webserver.private List<SkinAction>
skinActions
private JspContext
skinContext
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
Constructors Constructor Description Page()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
int
doStartTag()
String
getBaseVersion()
String
getDoctype()
String
getFavicon()
String
getMaxUrlLength()
String
getMenu()
boolean
getNoSkin()
String
getRoot()
String
getServerName()
SessionControl
getSessionControl()
List<SkinAction>
getSkinActions()
Get all skin extension actions.JspContext
getSkinContext()
Get the JSP context used for invoking skin extensions.String
getTitle()
int
getTypeCode()
private static void
initStaticFields(PageContext pageContext)
Initialize static fields.static String
ROOT()
Static version ofgetRoot()
.void
setDoctype(String doctype)
void
setFavicon(String favicon)
void
setMenu(String menu)
void
setNoskin(boolean noSkin)
Set to TRUE to disable skins.void
setPageContext(PageContext pageContext)
void
setSc(SessionControl sc)
Set the session control to use in this request.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
-
-
-
-
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_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
-
skinActions
private transient List<SkinAction> skinActions
-
-
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()
-
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
-
getSessionControl
public SessionControl getSessionControl()
-
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
-
setPageContext
public void setPageContext(PageContext pageContext)
- Specified by:
setPageContext
in interfaceTag
- Overrides:
setPageContext
in classTagSupport
-
doStartTag
public int doStartTag() throws JspException
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-
doEndTag
public int doEndTag() throws JspException
- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Throws:
JspException
-
-