|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IScriptReporter
A ScriptReporter
acts as a container for JavaScript generated by children of
the tag. Usually a ScriptReporter
will gather up all of the JavaScript
generated by children into a single <script> element output into the HTML. A script container
will implement a map beteween the TagId and the real name
or id
attribute
written into the HTML.
Method Summary | |
---|---|
void |
addAnchorPostRewriter(String rewriter)
This method will add a method to be called which will handle state changes associated with an anchor post. |
void |
addInitMethod(String varClass)
This method will add a new method to the initialization code. |
void |
addScriptCode(String script)
This method will add Script as top level code that runs when the page is loaded. |
void |
addScriptFunction(String script)
This method will add Script as a function. |
void |
addTagId(String tagId,
String tagName)
Adds a tagID and tagName to the id to name map. |
boolean |
isInitScriptWritten()
Returns true if the writeInitScript method has been called. |
boolean |
isRunAtClient()
This method will indicate that the ScriptReporter is supporting runAtClient features |
boolean |
isScriptWritten()
This method indicates that the writeScript method has been called. |
void |
writeInitScript(StringBuilder sb)
This method will output all of the Script that appears inside the tag. |
void |
writeScript(StringBuilder sb)
This method will output all of the Script associated with the script reporter. |
Method Detail |
---|
void addScriptCode(String script)
script
- the text of the script. This value must not be null.void addScriptFunction(String script)
script
- the text of the function. This value must not be null.void addInitMethod(String varClass)
varClass
- the name of the variable containing the javascript featurevoid addAnchorPostRewriter(String rewriter)
rewriter
- the name of a method which will rewrite the anchor.void addTagId(String tagId, String tagName)
tagId
- - the id of a child tag.tagName
- - the name of a child tag.boolean isRunAtClient()
void writeScript(StringBuilder sb)
sb
- The script is written into the provided StringBuffer. This value must not be null.void writeInitScript(StringBuilder sb)
sb
- The script is written into the provided StringBuffer. This value must not be null.boolean isScriptWritten()
writeScript
method has been called.
boolean isInitScriptWritten()
writeInitScript
method has been called.
true
if the writeInitScript
method has been called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |