Designer 10.7 | webMethods Mobile Development | Building the User Interface for a Mobile Application | Defining Dialogs
 
Defining Dialogs
You can define alert dialogs for a mobile application. A dialog is a pop-up window that displays over a view. An application can only have only one dialog open at a time.
To add a dialog, you add an AlertDialog object to the Dialogs container in the Outline Editor. When you add an AlertDialog object to the user interface, Mobile Development automatically adds an AlertDialogButton as a child object. An AlertDialog object requires at least one child AlertDialogButton object.
*To define a dialog for a mobile application
1. Ensure the mobile project is open in the Outline Editor. For instructions, see Displaying a Mobile Project in the Outline Editor.
2. In the Model section of the Outline Editor, expand the outline so that you view the Dialogs node.
3. Right-click the Dialogs node and select New Child > AlertDialog.
Mobile Development adds an AlertDialogButton child object as well.
4. Select the AlertDialog object, and in the Properties section of the Outline Editor set the properties for the dialog. For more information, see AlertDialog Properties.
Use the Text property to specify the text you want displayed in the dialog.
5. Select the AlertDialogButton object that Mobile Development added for you, and in the Properties section of the Outline Editor set the properties for the button. For more information, see DialogButton Properties.
6. If you want the dialog to contain an additional button, right-click the AlertDialog object and select New Child > AlertDialogButton to add the button. Then select the button and set the properties. Repeat this step for each additional button you want in the dialog.
7. To use the dialog in the user interface, you can do one or more of the following:
*To display the view in response to a user-initiated event, for example, when a user selects a check box, specify the dialog for a OpenDialog event action object. For more information, see Objects to Use for Event Actions, Responding to User-Initiated Events, and OpenDialog Properties.
*For information about how to add code to a dialog, see Logic for a Dialog.
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.
Related Topics