Building Mobile Enterprise Applications : webMethods Mobile Development Help : Defining Resources for the Mobile Project : Adding static Web Resources
Adding static Web Resources
It is supported to add static Web Resources, such as HTML, JS, CSS files, to your Mobile Project. The UniversalResHandler is responsible for copying those files to the resulting native project or to the Phoney runtime. Therefore, all static web resources must be copied to <projectName>/resources/www. The files can be accessed at runtime after running the resource handler. For detailed information, see The Resource Handler.
You can access every file at runtime using the following code snippet:
<Java>
final String content =
AbstractApplicationController.getInstance().loadWWWResource("yourFile");
</Java>
For example, you can store a HTML file and load its content at runtime. Afterwards pass the files content to a Web View using the method nUIWebView#setHTMLText(String).
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback