Class Index | File Index

Classes


Class wm.expression

Static API for handling data expressions. Data expressions are strings can contain valid JavaScript and special macros. Macros are expanded via preprocessing, and use this syntax:

${<id>}
<id> supports dot notation, e.g. ${address.name.lastName}.

Example:
"Half of " + ${editor1.dataValue} + " is " + ${editor1.dataValue}/2.

// Macros are replaced with quoted JSON and should not be inside of literal strings
"${lastName}, ${firstName}" // bad
${lastName} + ", " + ${firstName} // good

Defined in: expression.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
Static Method Summary
Method Attributes Method Name and Description
<static>  
wm.expression.getValue(inExpression, inRoot)
Evaluate expression with given namespace root.
Class Detail
wm.expression()
Report errata or suggestions for expression.
Method Detail
Static Method Detail
<static> wm.expression.getValue(inExpression, inRoot)
Evaluate expression with given namespace root.
Parameters:
{String} inExpression
Valid javascript that is evaluated in global scope. The expression can contain macros.
{String} inRoot
The root object under which id macros are evaluated.
Example:
var exp = '"Half of " + ${editor1.dataValue} + " is " + ${editor1.dataValue}/2.';
wm.expression.getValue(exp, app.main);
Report errata or suggestions for getValue.

Documentation generated by JsDoc Toolkit 2.0.1 on Wed Jun 03 2009 13:28:38 GMT-0700 (PDT)