Plumtree UI Infrastructure API  
 

JSHelper Members

JSHelper overview

Public Static Fields

ALIDOJO_OBJECT rob: Initialized in common-jsdojo build bea/dnd/dnd.js, probably should move to init.js *
SAFEJSVAR_CONTAINER_NAME Name of the safe javascript var container variable *

Public Static Methods

AddSafeJSVariable Helper function to define a safe javascript variable. The safe variable will be defined in its on javascript block, so it won't affect any other javascript if the assigned value is invalid. Reference it by using the javascript getSafeVariable or getSafeVariableWarn helper functions or GetSafeJSVariable or GetSafeJSVariableWarn java helper functions to generate the javascript calls. NOTE: The strValue is the string with the javascript value so don't surround it with quotes unless you want the value to be a string. E.g. strValue = "new Object()" - will assign a new object to the variable while strValue = "'new Object()'" - will assign the string 'new Object()'
escapeJS Escape JavaScript strings.
GetSafeJSVariable Helper function to retrieve a safe javascript variable. The javascript function will return false if it is unable to get the variable.
GetSafeJSVariableWarn Helper function to retrieve a safe javascript variable. The javascript function will show a javascript alert error with the name of the variable. Use for critical variables that absolutely need to be defined.
InitializeSafeJSVarElements Create the container to hold the safe variables. The container is just a javascript object and we but the vars on it as object properties.
JSEncodeString Escape single and double quotes, neccessary for javascript variable values.

Public Instance Constructors

JSHelper Constructor Initializes a new instance of the JSHelper class.

Public Instance Methods

Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

JSHelper Class | com.plumtree.uiinfrastructure.statichelpers Namespace