|
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.Script
This class generates the tags to send JavaScript to the client.
| Field Summary |
| Fields inherited from class org.pajes.html.Tag |
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
Script()
Creates the <script> tags. |
|
Script(java.lang.String sourceFileURL)
Allows for a file containing the JavaScript to be specified in the constructor. |
|
| Method Summary | |
Container |
add(HTML plainText)
Over-rides Container.add(HTML) to prevent
anything except text being added to a script object. |
Container |
add(java.lang.String code,
boolean suppressNewLine)
Adds a line of code to the script. |
java.lang.String |
getSourceName()
Retreives the URL of the file containing the JavaScript source. |
boolean |
hasSourceFile()
Determines if this script draws its JavaScript source file from the server, rather than from lines of text contained between the script tags. |
Script |
setLanguage(java.lang.String language)
Sets the scripting language for the script statements. |
Script |
setSourceName(java.lang.String sourceFileURL)
Allows for a file containing the JavaScript to be specified. |
Script |
setType(java.lang.String contentType)
Sets the content type of the script statements. |
| Methods inherited from class org.pajes.html.Container |
add, add, addContent, clear, clone, delete, delete, destroy, get, getContent, getContents, getPosition, insert, replace, 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 Script()
public Script(java.lang.String sourceFileURL)
sourceFileURL - the URL of the file containing the JavaScript
source.| Method Detail |
public Script setLanguage(java.lang.String language)
language - the scripting language for the script statments.
public Script setSourceName(java.lang.String sourceFileURL)
sourceFileURL - the URL of the file containing the JavaScript
source.
TagException - if any script content has already been add(org.pajes.html.HTML)ed to this script.public java.lang.String getSourceName()
public Script setType(java.lang.String contentType)
contentType - the content type of the script statements.
public Container add(HTML plainText)
Container.add(HTML) to prevent
anything except text being added to a script object.
add in class ContainerplainText - the object to be added
TagException - if anything except PlainText is added to
the script.
public Container add(java.lang.String code,
boolean suppressNewLine)
add in class Containercode - the line of executable script code.suppressNewLine - suppresses a new line after the text.
TagException - if the SRC attribute has already been defined on this script.public boolean hasSourceFile()
|
PAJES 2.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||