Building Mobile Enterprise Applications : webMethods Mobile Development Help : Creating Application Logic : Common Methods to Override in the Generated Code for a Template
Common Methods to Override in the Generated Code for a Template
When you generate sources for a Mobile Project, Mobile Development generates a Java class named template_name.java, where template_name is the class name you assigned to a template. The template_name.java file resides in the src.package_name.ui.template package, where package_name is the package name you specified for your Mobile Project.
Mobile Development provides a set of methods for the template. These methods are starting points for defining the custom business logic.
Method
Description
init()
This method is executed after the template has been initialized. It creates the contents of the template. If you want to override this method, you have to add a call to the super method.
onTemplateCreated()
This method is executed by init() after all contents have been created. You can add custom business logic to this method.
onAlertDialogButtonPressed()
This method is executed when a user presses a button, (an AlertDialogButton object) in an alert dialog (an AlertDialog) object. The method is passed the identifier that you specify in the AlertDialogButton object’s Id property so that your logic can determine the button the user selected. Add logic to this method to perform the actions you want to take when a user presses a button.
initBindings()
This method is about to be executed when the controller tries to update the modeled bindings. This method is executed after all parts of the template have been created. All user interface elements for the template will be created at execution time.
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback