|
PAJES 3.0.21 | ||||||||
| 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.Paje
public class Paje
Container to hold all the objects within the <HTML> and </HTML> tags.
PajeFactory,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.pajes.html.Tag |
|---|
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
|---|---|
Paje()
Create an empty document. |
|
Paje(PajeParser parser)
Create a document from an HTML source document. |
|
| Method Summary | |
|---|---|
Traversable |
add(HTML htmlObject)
Adds an HTML element to the document. |
Container |
add(java.lang.String code,
boolean suppressNewLine)
Adds a line of text to the document. |
java.lang.Object |
clone()
Allows a tag to be cloned. |
void |
destroy()
Loops through the container and retrieves each object contained within it and then invokes that objects destroy method. |
Body |
getBody()
Returns the instance of PajeBody in this document. |
DocType |
getDocType()
Returns the Document Type Declaration. |
java.lang.String |
getDocTypeHeader()
Returns the Document Type Declaration string. |
Head |
getHead()
Returns the instance of Head in this document. |
java.lang.String |
getXMLEncoding()
Returns the XML encoding. |
java.lang.String |
getXMLVersion()
Returns the XML version. |
boolean |
isFirstClone()
Determines if this instance is the first generated from an updated template. |
Container |
replace(Container container)
Deletes all the objects in this container, and replaces them with the cloned objects from another container. |
void |
setCached(boolean useCache)
Determines whether this document will be cached by the browser. |
void |
setDestroyAfterWrite(boolean destroy)
Determines if the destroy method will be called
after each contained object has been written. |
void |
setDocType(DocType type)
Sets the Document Type Declaration. |
void |
setDocType(java.lang.String type)
Sets the Document Type Declaration. |
void |
setOnLoadAlert(java.lang.String message)
Adds a JavaScript alert to the onLoad handler of the currently defined Body or Frameset instance. |
Paje |
setXHTMLCompliance(boolean compliant)
Sets whether this document is XHTML compliant or not. |
Paje |
setXMLEncoding(java.lang.String encoding)
Sets the XML encoding. |
Paje |
setXMLVersion(java.lang.String version)
Sets the XML version. |
java.lang.String |
toString()
Returns the HTML object as a string. |
Paje |
useCompression(boolean compress)
Specifies whether the document should be written back to the browser using compression, if the browser supports it. |
Paje |
usePersistentConnection(boolean keepAlive)
Specifies whether the document should be written back to the browser using a persistent ("keep-alive") connection. |
void |
write(Browser browser)
Prints the <HTML> tags and any contained objects to the browser |
void |
write(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Convenience method to automatically create a Browser instance and then invoke write(Browser). |
| Methods inherited from class org.pajes.html.Container |
|---|
add, add, addContent, clear, delete, delete, 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 |
| Methods inherited from interface org.pajes.html.Traversable |
|---|
isWritable |
| Methods inherited from interface org.pajes.html.HTML |
|---|
getContainer, getDocument, getId, getParent, getWritePermission, isChildOf, isChildOf, setContainer, setParent, setWritePermission |
| Constructor Detail |
|---|
public Paje()
public Paje(PajeParser parser)
throws java.io.IOException
parser - the parser that will read the source HTML file.
java.io.IOException - if an I/O exception occurs whilst generating the Paje.| Method Detail |
|---|
public Traversable add(HTML htmlObject)
add in interface Traversableadd in class ContainerhtmlObject - the object to add (eg. doc.add(new Body());)
public Container add(java.lang.String code,
boolean suppressNewLine)
add in class Containercode - the line of text.suppressNewLine - suppresses a new line after the text.
public java.lang.Object clone()
Container
clone in interface HTMLclone in class ContainerObject.clone()public void destroy()
Container
Sub-classes MUST call super.destroy(); if
over-riding this method!
destroy in interface HTMLdestroy in class ContainerHTML.destroy()public Body getBody()
public DocType getDocType()
public java.lang.String getDocTypeHeader()
public Head getHead()
public java.lang.String getXMLEncoding()
public java.lang.String getXMLVersion()
public boolean isFirstClone()
public Container replace(Container container)
replace in class Containercontainer - the Container from which objects are to be copied.
public void setCached(boolean useCache)
useCache - if true, the document will be cached by the
browser. The default is false.public void setDestroyAfterWrite(boolean destroy)
destroy method will be called
after each contained object has been written.
By default, Paje destruction is enabled. To disable it as the default,
the web application deployment descriptor must have a
<context-param> with a
<param-name> of
org.pajes.html.Paje.setDestroyAfterWrite, and a
<param-value> of false. For example:
<context-param>
<param-name>org.pajes.html.Paje.setDestroyAfterWrite</param-name>
<param-value>false</param-value>
</context-param>
destroy - true if the destroy method should be
called, or false if it should not. The default is true.public void setDocType(DocType type)
type - the Document Type Declaration.
public void setDocType(java.lang.String type)
throws java.text.ParseException
type - the Document Type Declaration.
java.text.ParseException - if the String containing the Document Type Declaration cannot
be parsed.
public void setOnLoadAlert(java.lang.String message)
throws java.io.IOException
message - the message to be displayed when the document is loaded.
java.io.IOException - if an I/O error occurs.public Paje setXHTMLCompliance(boolean compliant)
Head or one of either an Body or FrameSet have been defined.
compliant - true (the default) if the document is XHTML compliant, or
false if it is not.
public Paje setXMLEncoding(java.lang.String encoding)
encoding - the XML encoding.
public Paje setXMLVersion(java.lang.String version)
version - the XML version
public java.lang.String toString()
Tag
toString in class TagTag.toString()public Paje useCompression(boolean compress)
WARNING: The Paje setting will over-ride the setting in the
Browser class.
compress - if true, the document will be written to the browser using an
appropriate compression encoding, based on the
"Accept-Encoding" HTTP header.
public Paje usePersistentConnection(boolean keepAlive)
WARNING: The Paje setting will over-ride the setting in the
Browser class.
keepAlive - if true, (the default) the document will be written to the
browser using a keep-alive connection. If false, results are
written directly to the output stream.
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 I/O error occurs.Tag.setWriteEndTag(boolean),
Tag.writeContent(org.pajes.servlet.Browser)
public void write(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
write(Browser).
context - the servlet context.request - the servlet request object.response - the servlet response object.
java.io.IOException - if an I/O error occurs.
javax.servlet.ServletException - if an unrecoverable exception occurs.
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||