|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pajes.html.Tag
org.pajes.html.TraversableElement
org.pajes.html.Container
org.pajes.html.Head
Generates the >HEAD< and >/HEAD< tags and hold all the HTML objects that appear between them.
| Nested Class Summary | |
class |
Head.Base
Inner class for the <base> tag which only ever appears in the header. |
class |
Head.Link
Inner class for the <link> tag which only ever appears in the header. |
class |
Head.Meta
Inner class for the <meta> tag. |
class |
Head.Title
Inner class for the <title> tag which only ever appears in the header. |
| Field Summary |
| Fields inherited from class org.pajes.html.Tag |
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
Head()
Builds the HTML header section of the page. |
|
Head(java.lang.String title)
Builds the HTML header section of the page. |
|
Head(java.lang.String title,
java.lang.String baseTarget)
Builds the HTML header section of the page. |
|
Head(java.lang.String title,
java.lang.String baseTarget,
java.lang.String clientSideJavaScript)
Builds the HTML header section of the page. |
|
| Method Summary | |
Container |
add(HTML htmlObject)
Over-rides add() in Container. |
Head |
addAutoRefresh(int seconds)
Adds an automatic refresh of the page. |
Head |
addAutoRefresh(int seconds,
java.lang.String destinationURL)
Adds an automatic refresh of the page, and redirects the browser to another URL. |
Head |
addBase(java.lang.String target)
Adds the BASE header tag. |
Head |
addBase(java.lang.String href,
java.lang.String target)
Adds the BASE header tag. |
Head |
addClientSideJavaScript(java.lang.String clientSideJavaScript)
Adds a line of JavaScript to the SCRIPT section in the page header |
Head |
addLink(java.lang.String relationship,
java.lang.String sourceURL,
java.lang.String type)
Adds the LINK header tag. |
Head |
addLink(java.lang.String relationship,
java.lang.String sourceURL,
java.lang.String type,
java.lang.String id)
Adds the LINK header tag. |
Head |
addMeta(java.lang.String name,
java.lang.String content)
Adds the META header tag. |
Head |
addMeta(java.lang.String name,
java.lang.String content,
java.lang.String httpEquivalent)
Adds the META header tag. |
Head |
addMeta(java.lang.String name,
java.lang.String content,
java.lang.String httpEquivalent,
java.lang.String id)
Adds the META header tag. |
Head |
addPageTitle(java.lang.String title)
Adds a page title. |
Head |
addStyleSheetLink(java.lang.String sourceURL)
Adds a new style sheet link. |
Container |
clear()
Empties the container. |
Head.Base |
getBaseTag()
Returns the >BASE< header tag. |
static java.lang.String |
getDefaultBaseHREF(javax.servlet.http.HttpServletRequest request)
Returns a concatenated string of the following request values: If getHeader("Host") returns null: getScheme() "://" getServerName() ":" getServerPort() getContextPath() '/' If getHeader("Host") returns a host: getScheme() "://" getHeader("Host") getContextPath() '/' |
Head.Link[] |
getLinkTags()
Returns an array of the >LINK< header tags. |
Head.Meta[] |
getMetaTags()
Returns an array of the >LINK< header tags. |
java.lang.String |
getPageTitle()
Returns the page title from the HTML header section of the page. |
Script |
getScript()
Returns the instance of >SCRIPT< in this header. |
Script[] |
getScripts()
Returns an array of the >SCRIPT< header tags. |
StyleSheet |
getStyleSheet()
Returns the instance of >STYLE< in this header. |
Container |
replace(Container container)
Deletes all the objects in this container, and replaces them with the cloned objects from another container. |
Head |
setPageTitle(java.lang.String title)
Sets the page title in the HTML header section of the page |
Head |
useDefaultBaseHREF(boolean on)
Determines whether the base tag href=
attribute will be automatically generated or not. |
void |
write(Browser browser)
Prints the <HEAD> tags and any contained objects to the browser. |
| Methods inherited from class org.pajes.html.Container |
add, add, add, addContent, clone, delete, delete, destroy, get, getContent, getContents, getPosition, insert, set, setContent, setContent, size, writeContent |
| Methods inherited from class org.pajes.html.TraversableElement |
dump, dump, getAll, getFieldByName, getFirstFieldByName, getFirstTagByAttribute, getFirstTagByClass, getFirstTagByID, getFirstTagByName, getTagByAttribute, getTagByClass, getTagByID, getTagByName, setWritable |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Head()
public Head(java.lang.String title)
title - the page title.
public Head(java.lang.String title,
java.lang.String baseTarget)
title - the page titlebaseTarget - is the default frame name into which URLs are to be loaded.
public Head(java.lang.String title,
java.lang.String baseTarget,
java.lang.String clientSideJavaScript)
title - the page titlebaseTarget - is the default frame name into which URLs are to be loaded.clientSideJavaScript - the file name of a file of JavaScript| Method Detail |
public Head.Base getBaseTag()
public static java.lang.String getDefaultBaseHREF(javax.servlet.http.HttpServletRequest request)
request - the object that contains the request the client made of the
servlet.
String specifying the base portion of the
request URL that indicates the scheme, server, port and context
of the request.public Head.Link[] getLinkTags()
public Head.Meta[] getMetaTags()
public Head setPageTitle(java.lang.String title)
title - The new title value
public java.lang.String getPageTitle()
public Script getScript()
public Script[] getScripts()
public StyleSheet getStyleSheet()
public Container add(HTML htmlObject)
add in class ContainerhtmlObject - -
the Object to add (eg. doc.add(new Body();)
public Head addAutoRefresh(int seconds)
seconds - the number of seconds to wait before automatically refreshing
the page.
public Head addAutoRefresh(int seconds,
java.lang.String destinationURL)
seconds - the number of seconds to wait before automatically refreshing
the page.destinationURL - the fully qualified absolute document URL which will be
displayed after the specifed time.
public Head addBase(java.lang.String target)
target - is the default frame name into which URLs are to be loaded.
public Head addBase(java.lang.String href,
java.lang.String target)
href - is used to define the absolute URL against which relative URLs
are based within the document.target - is the default frame name into which URLs are to be loaded.
public Head addClientSideJavaScript(java.lang.String clientSideJavaScript)
clientSideJavaScript - The feature to be added to the ClientSideJavaScript attribute
public Head addLink(java.lang.String relationship,
java.lang.String sourceURL,
java.lang.String type)
relationship - defines the relationship between the current element and the
destination of the linksourceURL - the URL of the destination linktype - the type of Link
public Head addLink(java.lang.String relationship,
java.lang.String sourceURL,
java.lang.String type,
java.lang.String id)
relationship - defines the relationship between the current element and the
destination of the linksourceURL - the URL of the destination linktype - the type of Linkid - the id attribute
public Head addMeta(java.lang.String name,
java.lang.String content)
name - the name of the name/value pair.content - the value of the name/value pair.
public Head addMeta(java.lang.String name,
java.lang.String content,
java.lang.String httpEquivalent)
name - the name of the name/value pair.content - the value of the name/value pair.httpEquivalent - supplies a name for the name/value pair and instructs the
server to include the name/value pair in the MIME document
header that is passed to the browser before sending the actual
document.
public Head addMeta(java.lang.String name,
java.lang.String content,
java.lang.String httpEquivalent,
java.lang.String id)
name - the name of the name/value pair.content - the value of the name/value pair.httpEquivalent - supplies a name for the name/value pair and instructs the
server to include the name/value pair in the MIME document
header that is passed to the browser before sending the actual
document.id - the id attribute
public Head addPageTitle(java.lang.String title)
title - The new title.
public Head addStyleSheetLink(java.lang.String sourceURL)
sourceURL - the URL of the style sheet.
public Container clear()
Container
clear in class ContainerContainer.clear()public Container replace(Container container)
replace in class Containercontainer - the Container from which objects are to be copied.
public Head useDefaultBaseHREF(boolean on)
base tag href=
attribute will be automatically generated or not.
on - if true (the default), the base
tag href= attribute will be automatically set
from HttpServletRequest.getContextPath(), even if the
href= attribute has already been explicityly
defined . Set to false to turn off this
behaviour and respect any defined href=
attributes.
public void write(Browser browser)
throws java.io.IOException
write in interface HTMLwrite in class Tagbrowser - the browser to which the results are to be output.
java.io.IOException - if an IO exception occursTag.setWriteEndTag(boolean),
Tag.writeContent(org.pajes.servlet.Browser)
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||