org.apache.beehive.netui.tags.html
Class JavaScriptUtils

Object
  extended by JavaScriptUtils
All Implemented Interfaces:
Serializable

public class JavaScriptUtils
extends Object
implements Serializable

Provides tag specific support for the HTML tags so they can create JavaScript.

See Also:
Serialized Form

Constructor Summary
JavaScriptUtils()
           
 
Method Summary
static String getFocusScript(String formName, String fieldName)
          this will write out the form focus script block
static String getString(String aKey, Object[] args)
          Returns the string specified by aKey from the errors.properties bundle.
 String getTagIdMapping(String tagId, String value)
          This method will write out a tagId map entry for when there isn't a ScriptContainer defined.
 String writeAnchorFormSubmit(IScriptReporter scriptReporter)
           
 String writeAnchorFormSubmitAction(String action, String newAction)
           
 String writeIdMap(IScriptReporter scriptRepoter, String entries)
           
 String writeNetuiNameFunctions(IScriptReporter scriptReporter)
           
 String writeRollover(IScriptReporter scriptReporter)
           
static void writeScriptBlock(StringBuilder results, String script)
          This is a static method that will write a consistent look/feel to the tags and comment markup that appears around the JavaScript.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaScriptUtils

public JavaScriptUtils()
Method Detail

writeAnchorFormSubmit

public String writeAnchorFormSubmit(IScriptReporter scriptReporter)

writeAnchorFormSubmitAction

public String writeAnchorFormSubmitAction(String action,
                                          String newAction)

getFocusScript

public static String getFocusScript(String formName,
                                    String fieldName)
this will write out the form focus script block


getTagIdMapping

public String getTagIdMapping(String tagId,
                              String value)
This method will write out a tagId map entry for when there isn't a ScriptContainer defined.


writeRollover

public String writeRollover(IScriptReporter scriptReporter)

writeIdMap

public String writeIdMap(IScriptReporter scriptRepoter,
                         String entries)

writeNetuiNameFunctions

public String writeNetuiNameFunctions(IScriptReporter scriptReporter)

writeScriptBlock

public static void writeScriptBlock(StringBuilder results,
                                    String script)
This is a static method that will write a consistent look/feel to the tags and comment markup that appears around the JavaScript.

Parameters:
results - the StringBuilder that will have the <script> tag written into
script - the JavaScript block

getString

public static String getString(String aKey,
                               Object[] args)
Returns the string specified by aKey from the errors.properties bundle.

Parameters:
aKey - The key for the message pattern in the bundle.
args - The args to use in the message format.