Building Mobile Enterprise Applications : webMethods Mobile Designer Native User Interface Reference : Mobile Designer Native User Interface : JavaScript Bridge : Evaluating an Arbitrary Chunk of JavaScript Code
Evaluating an Arbitrary Chunk of JavaScript Code
With callJavaScript(), messages are passed from Java into an existing method hosted on the JavaScript side. Sometimes, this can be unsuitable for the application, and only a few simple lines of JavaScript need to be evaluated. For this, the method evaluateJavaScript() can be called.
As with callJavaScript(), there are two ways to call evaluateJavaScript(). One is to take a String containing the JavaScript code, run synchronously, and return a String result (if applicable). The other method will take an additional object conforming to com.softwareag.mobile.runtime.nui.IJSCallback, and run asynchronously, returning any result at a later time.
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback