# com.bea.wlw.netui.tags
JavaScriptUtils Class

public class JavaScriptUtils
extends `Object`
implements `Serializable`

Hierarchy
  `Object`
  `JavaScriptUtils`

All Implemented Interfaces
  `Serializable`

## Constructor Summary

JavaScriptUtils()

## Method Summary

`public static `String`` | `getFocusScript`(`String` formName, `String` fieldName) this will write out the form focus script block
`public static `String`` | `getString`(`String` aKey, `Object`[] args) Returns the string specified by aKey from the errors.properties bundle.
`public `String`` | `getTagIdMapping`(`String` tagId, `String` value) This method will write out a tagId map entry for when there isn't a ScriptContainer defined.
`public `String`` | `writeAnchorFormSubmit`(`ScriptReporter` scriptReporter)
`public void` | `writeAnchorFormSubmitAction`(`UnsyncStringBuffer` results, `String` event, `String` action, `String` newAction)
`public `String`` | `writeIdMap`(`ScriptReporter` scriptRepoter, `String` entries)
`public `String`` | `writeNetuiNameFunctions`(`ScriptReporter` scriptReporter)
`public `String`` | `writeRollover`(`ScriptReporter` scriptReporter)
`public static void` | `writeScriptBlock`(`UnsyncStringBuffer` 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 from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Detail

### JavaScriptUtils

    public JavaScriptUtils()

## Method Detail

### getFocusScript(String, String) Method

    public static String getFocusScript(String formName,
                                        String fieldName)

this will write out the form focus script block

### getString(String, Object[]) Method

    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.

### getTagIdMapping(String, String) Method

    public String getTagIdMapping(String tagId,
                                  String value)

This method will write out a tagId map entry for when there isn't a ScriptContainer defined.

### writeAnchorFormSubmit(ScriptReporter) Method

    public String writeAnchorFormSubmit(ScriptReporter scriptReporter)

### writeAnchorFormSubmitAction(UnsyncStringBuffer, String, String, String) Method

    public void writeAnchorFormSubmitAction(UnsyncStringBuffer results,
                                            String event,
                                            String action,
                                            String newAction)

### writeIdMap(ScriptReporter, String) Method

    public String writeIdMap(ScriptReporter scriptRepoter,
                             String entries)

### writeNetuiNameFunctions(ScriptReporter) Method

    public String writeNetuiNameFunctions(ScriptReporter scriptReporter)

### writeRollover(ScriptReporter) Method

    public String writeRollover(ScriptReporter scriptReporter)

### writeScriptBlock(UnsyncStringBuffer, String) Method

    public static void writeScriptBlock(UnsyncStringBuffer 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 UnsyncStringBuffer that will have the <script> tag written into

script
  the JavaScript block