org.apache.beehive.netui.tags.javascript
Interface IScriptReporter

All Known Implementing Classes:
Html, ScriptContainer

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 addLegacyTagIdMappings(String tagId, String tagName)
          Adds a tagID and tagName to the id to name map.
 void addScriptFunction(ScriptPlacement placement, String script)
          This method will add Script as a function.
 void addTagIdMappings(String tagId, String realId, String realName)
           
 void writeScript(AbstractRenderAppender sb)
          This method will output all of the Script associated with the script reporter.
 

Method Detail

addScriptFunction

void addScriptFunction(ScriptPlacement placement,
                       String script)
This method will add Script as a function.

Parameters:
placement -
script - the text of the function. This value must not be null.

addLegacyTagIdMappings

void addLegacyTagIdMappings(String tagId,
                            String tagName)
Adds a tagID and tagName to the id to name map. A script container can maintain a mapping of user ids to actual ids generated by the tagId. This method will track these.

Parameters:
tagId - - the id of a child tag.
tagName - - the name of a child tag.

addTagIdMappings

void addTagIdMappings(String tagId,
                      String realId,
                      String realName)
Parameters:
tagId -
realId -
realName -

writeScript

void writeScript(AbstractRenderAppender sb)
This method will output all of the Script associated with the script reporter.

Parameters:
sb - The script is written into the provided StringBuilder. This value must not be null.