| org.itsnat.core.script.ScriptExpr
All known Subclasses: org.itsnat.impl.core.js.JScriptExprImpl,
ScriptExpr | public interface ScriptExpr (Code) | | Encapsulates a JavaScript expression used to generate JavaScript code to send the client.
If the expression have properties or methods this interface provides methods
to generate JavaScript code to access or call them.
See Also: ScriptUtil.createScriptExpr(Object) |
Method Summary | |
public String | getCallMethodCode(String methodName, Object[] params, boolean endSentence) Generates the JavaScript code to call the specified method of the result of this expression.
Parameters: methodName - method name. Parameters: params - the parameter list. | public String | getCallMethodCode(String methodName, Object[] params) Generates the JavaScript code to call the specified method of the result of this expression.
Parameters: methodName - method name. Parameters: params - the parameter list. | public String | getCode() Returns the JavaScript code of this expression. | public String | getGetPropertyCode(String propName, boolean endSentence) Generates the JavaScript code to get the value of the specified property of the result of this expression.
Parameters: propName - property name. Parameters: endSentence - if true adds a ; at the end. | public String | getGetPropertyCode(String propName) Generates the JavaScript code to get the value of the specified property of the result of this expression.
Parameters: propName - property name. | public String | getSetPropertyCode(String propName, Object value, boolean endSentence) Generates the JavaScript code to set a value to the specified property of the result of this expression.
Parameters: propName - property name. Parameters: value - the value to set. | public String | getSetPropertyCode(String propName, Object value) Generates the JavaScript code to set a value to the specified property of the result of this expression.
Parameters: propName - property name. Parameters: value - the value to set. |
getCode | public String getCode()(Code) | | Returns the JavaScript code of this expression.
The specified object is converted to JavaScript following the rules
of
ScriptUtil.toScript(Object) with an exception: if a String the
content is not converted to a JavaScript string literal.
the JavaScript code. |
getGetPropertyCode | public String getGetPropertyCode(String propName, boolean endSentence)(Code) | | Generates the JavaScript code to get the value of the specified property of the result of this expression.
Parameters: propName - property name. Parameters: endSentence - if true adds a ; at the end. the JavaScript code. See Also: ScriptUtil.getGetPropertyCode(ObjectStringboolean) |
|
|