|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.template.TemplatePageAttributes
Template context tool that will set various attributes of the HTML page. It is automatically placed in the Template context as '$page'. Here's an example of some uses:
$page.setBgColor("#ffffff");
$page.setBgColor("white");
$page.setBackground("/images/standardbg.jpeg");
$page.setTitle("This is the title!");
$page.setKeywords("turbine, cool, servlet framework");
$page.setStyleSheet("/style.css");
Constructor Summary | |
TemplatePageAttributes()
Deprecated. Default constructor. |
|
TemplatePageAttributes(RunData data)
Deprecated. Construct a new instance with the given RunData object. |
Method Summary | |
TemplatePageAttributes |
addAttribute(java.lang.String name,
java.lang.String value)
Deprecated. Adds an attribute to the BODY tag. |
java.lang.String |
getTitle()
Deprecated. Get the title in the page. |
void |
init(java.lang.Object data)
Deprecated. Initialise this instance with the given RunData object. |
void |
refresh()
Deprecated. Refresh method - does nothing |
TemplatePageAttributes |
setBackground(java.lang.String url)
Deprecated. Set the background image for the BODY tag. |
TemplatePageAttributes |
setBgColor(java.lang.String color)
Deprecated. Set the background color for the BODY tag. |
TemplatePageAttributes |
setDescription(java.lang.String description)
Deprecated. Add a description META tag to the HEAD of the page. |
TemplatePageAttributes |
setHttpEquiv(java.lang.String httpEquiv,
java.lang.String content)
Deprecated. Sets a HttpEquiv META tag in the HEAD of the page, usage: setHttpEquiv("refresh", "5; URL=http://localhost/nextpage.html")
setHttpEquiv("Expires", "Tue, 20 Aug 1996 14:25:27 GMT") |
TemplatePageAttributes |
setKeywords(java.lang.String keywords)
Deprecated. Set a keywords META tag in the HEAD of the page. |
TemplatePageAttributes |
setLinkColor(java.lang.String color)
Deprecated. Set the link color for the BODY tag. |
TemplatePageAttributes |
setScript(java.lang.String url)
Deprecated. Adds a LINK to a javascript file to the HEAD of the page. |
TemplatePageAttributes |
setStyle(java.lang.String styleText)
Deprecated. Adds a STYLE element to the HEAD of the page with the provided content. |
TemplatePageAttributes |
setStyleSheet(java.lang.String url)
Deprecated. Adds a LINK to a CSS styleshet to the HEAD of the page. |
TemplatePageAttributes |
setStyleSheet(java.lang.String url,
java.lang.String media)
Deprecated. Adds a LINK to a CSS stylesheet to the HEAD of the page, allowing the media type to be specified. |
TemplatePageAttributes |
setTextColor(java.lang.String color)
Deprecated. Set the text color for the BODY tag. |
TemplatePageAttributes |
setTitle(java.lang.String intitle)
Deprecated. Set the title in the page. |
TemplatePageAttributes |
setVlinkColor(java.lang.String color)
Deprecated. Set the visited link color for the BODY tag. |
java.lang.String |
toString()
Deprecated. A dummy toString method that returns an empty string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TemplatePageAttributes()
public TemplatePageAttributes(RunData data)
data
- a RunData instanceMethod Detail |
public void init(java.lang.Object data)
init
in interface ApplicationTool
data
- Assumed to be a RunData instancepublic void refresh()
refresh
in interface ApplicationTool
public TemplatePageAttributes setTitle(java.lang.String intitle)
intitle
- A String with the title.public java.lang.String getTitle()
public TemplatePageAttributes setStyleSheet(java.lang.String url)
url
- A String.
public TemplatePageAttributes setStyleSheet(java.lang.String url, java.lang.String media)
url
- The value for the href
attribute.media
- The value for the media
attribute.
TemplatePageAttributes
(self).public TemplatePageAttributes setStyle(java.lang.String styleText)
styleText
- The contents of the style
tag.
TemplatePageAttributes
(self).public TemplatePageAttributes setScript(java.lang.String url)
url
- A String.
public TemplatePageAttributes setKeywords(java.lang.String keywords)
keywords
- A String.
public TemplatePageAttributes setHttpEquiv(java.lang.String httpEquiv, java.lang.String content)
setHttpEquiv("refresh", "5; URL=http://localhost/nextpage.html")
setHttpEquiv("Expires", "Tue, 20 Aug 1996 14:25:27 GMT")
httpEquiv
- The value to use for the http-equiv attribute.content
- The text for the content attribute of the meta tag.
public TemplatePageAttributes setDescription(java.lang.String description)
description
- A String.
public TemplatePageAttributes setBackground(java.lang.String url)
url
- A String.
public TemplatePageAttributes setBgColor(java.lang.String color)
color
- A String.
public TemplatePageAttributes setTextColor(java.lang.String color)
color
- A String.
public TemplatePageAttributes setLinkColor(java.lang.String color)
color
- A String.
public TemplatePageAttributes setVlinkColor(java.lang.String color)
color
- A String.
public TemplatePageAttributes addAttribute(java.lang.String name, java.lang.String value)
name
- A String.value
- A String.
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |