Building Mobile Enterprise Applications : webMethods Mobile Development Help : Building the User Interface for a Mobile Application : Using Templates to Define Custom Objects for a Mobile Project : Using a Template in the Mobile Application User Interface
Using a Template in the Mobile Application User Interface
After you create a template to customize a user interface object, you can use the object in the user interface of your mobile application.
The following procedure describe how to use a template by using the TemplateReference object. You can also use templates to customize a ListView. For more information, see Programmatically Populating a ListView and Using a Content Provider to Populate a ListView.
To use a template in a mobile application user interface
1. Ensure the Mobile Project or specific window, view, or dialog to which you want to add the template is open in the Outline Editor. For instructions, see Displaying a Mobile Project in the Outline Editor or Displaying a Mobile Project in the Outline Editor.
2. In the Model section of the Outline Editor, expand the UserInterface part of the outline so that you view the location where you want to add the template.
3. Right-click the node in which you want to use the template and select New Child > TemplateReference.
Note:  
If TemplateReference is not listed in the right-click menu, it is not valid where you want to use the template.
4. Select the TemplateReference node.
5. In the Properties section of the Outline Editor, specify the following properties:
For this property...
Specify...
Name
Name for your own reference purpose. This name does not appear in the application’s user interface.
Template
Template that you want to use.
The list includes the templates that you have added to your project.
Tip:  
To update the Java classes that Mobile Development generates for the project so that your changes are represented in the generated sources, save the project and regenerate sources. For instructions, see Generating Sources for a Mobile Project.
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback