|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.taskapi.portalui.TaskAPIUIJavascript
public class TaskAPIUIJavascript
Javascript related TaskAPI functions.
| Constructor Summary | |
|---|---|
TaskAPIUIJavascript()
|
|
| Method Summary | |
|---|---|
static HTMLScript |
AddSafeJSStringVariable(java.lang.String strName,
java.lang.String strValue)
Helper function to define a safe javascript variable. |
static HTMLScript |
AddSafeJSVariable(java.lang.String strName,
java.lang.String strValue)
Helper function to define a safe javascript variable. |
static java.lang.String |
EscapeJavaScriptString(java.lang.String strJSString)
Escapes a string to use with javascript. |
static HTMLElementCollection |
GenerateJSComponentInclude(java.lang.String strComponentName,
XPLocale locale,
AActivitySpace owner)
Generates javascript to include specified jscomponent onto the page. |
static JS1DArrayBuilder |
GetJS1DArrayBuilder()
Returns a new helper object to generate a String with javascript code to declare
a one-dimensional array. |
static JS2DArrayBuilder |
GetJS2DArrayBuilder(int nColumnCount)
Returns a new helper object to generate a String with javascript code to declare
a two-dimensional array. |
static JSFunctionCallBuilder |
GetJSFunctionCallBuilder(java.lang.String strFunctionName)
|
static java.lang.String |
GetSafeJSVariable(java.lang.String strName)
Helper function to retrieve a safe javascript variable. |
static java.lang.String |
GetSafeJSVariableWarn(java.lang.String strName)
Helper function to retrieve a safe javascript variable. |
static HTMLScript |
InitializeSafeJSVarElements()
Call this function to use SafeJSVars on a page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskAPIUIJavascript()
| Method Detail |
|---|
public static HTMLScript InitializeSafeJSVarElements()
public static HTMLScript AddSafeJSVariable(java.lang.String strName,
java.lang.String strValue)
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. For javascript string values, use the AddSafeJSStringVariable
method.
E.g.
strValue = new Object() - will assign a new object to the variable while
strValue = "new Object()" - will assign the string "new Object()"
strName - Name of the variable to create. Should be unqiue from other name on a page.strValue - Value of the variable. Either a number or a reference to another javascript variable.
AddSafeJSVariable, GetSafeJSVariable, GetSafeJSVariableWarn
public static HTMLScript AddSafeJSStringVariable(java.lang.String strName,
java.lang.String strValue)
GetSafeJSVariable or GetSafeJSVariableWarn
java helper * functions to generate the javascript calls.
Adds quotes around the provided String and escapes any quotes and whitespace in the string.
For example, passing in 'Text' (without quotes) will create a javascript string with the value Text.
strName - Name of the variable to create. Should be unqiue from other name on a page.strValue - String value of the variable.
public static java.lang.String GetSafeJSVariable(java.lang.String strName)
false if it is unable
to get the variable.
strName - Name of the variable to retrieve.
String should be added to a HTMLScript element.InitializeSafeJSVarElements, AddSafeJSVariable, GetSafeJSVariableWarnpublic static java.lang.String GetSafeJSVariableWarn(java.lang.String strName)
strName - Name of the variable to retrieve.
String should be added to a HTMLScript element.InitializeSafeJSVarElements, AddSafeJSVariable, GetSafeJSVariablepublic static JSFunctionCallBuilder GetJSFunctionCallBuilder(java.lang.String strFunctionName)
strFunctionName -
public static JS1DArrayBuilder GetJS1DArrayBuilder()
String with javascript code to declare
a one-dimensional array.
public static JS2DArrayBuilder GetJS2DArrayBuilder(int nColumnCount)
String with javascript code to declare
a two-dimensional array.
nColumnCount - Number of columns in the array.
public static java.lang.String EscapeJavaScriptString(java.lang.String strJSString)
strJSString - String to escape.
null.
public static HTMLElementCollection GenerateJSComponentInclude(java.lang.String strComponentName,
XPLocale locale,
AActivitySpace owner)
strComponentName - Name of the JSComponent. Constants for the JSComponents are defined in
ConfigHelper.locale - The locale to use in the jscomponent. Will affect language and date/time formats.owner - Current Activityspace.
HTMLElementCollection with a script element that includes the specified jscomponent.ConfigHelper
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||