Building Mobile Enterprise Applications : Using webMethods Mobile Designer : Setting Properties and Parameters for a Mobile Application Project : Setting Parameters in the Resource Handler Code
Setting Parameters in the Resource Handler Code
When you code the resource handler for your project, you can add application-specific parameters. Additionally, for each resource you add to the project and to which you assign an ID, an associated parameter is included in the Parameters.java class.
In your resource handler code, to define the parameters, you invoke methods that Mobile Designer provides. The methods are defined in the com.softwareag.mobile.reshandler.AntTaskResourceHandler class. For information about how to use the AntTaskResourceHandler methods in your resource handler, see Methods that Mobile Designer Provides for the Resource Handler.
The following table lists:
*The AntTaskResourceHandler method you use to define a parameter.
*The naming convention that Mobile Designer uses for the parameter names. In the naming conventions, name is the name assigned to the parameter and id is the identifier assigned to the parameter
Method
Naming convention for added parameter
Description
n/a
PARAM_MD_name
Parameters that Mobile Designer defines. These parameters are for internal use. The Mobile Designer run-time classes use these parameters. For a description of the run-time classes, see Mobile Designer-Provided Run-Time Classes.
setParam
PARAM_name
General application-specific parameters that you define.
setResBlockID
RESBLOCKID_name
Parameters that define the identifiers for resource blocks that you defined in your project. For more information about resource blocks, see Using Resource Blocks and Resource Packs.
setResID
RESID_name
Parameters that define the identifiers for resources (for example, audio files or image files, etc.) that you added to your project.
setTextID
TEXTID_name
Parameters that define the identifiers for lines of text that you added to your project.
setMenuID
MENUID_name
Parameters that define the identifiers for menus that you added to your project.
The following list examples:
*If you use the setParam method to add the application-specific parameter “DISPLAY_SPLASH_SCREEN”, Mobile Designer includes the parameter PARAM_DISPLAY_SPLASH_SCREEN in the Parameters.java class.
*If you use the setResID method to assign an audio file the identifier “BEEP”, Mobile Designer includes the parameter RESID_BEEP in the Parameters.java class.
*If you use the setResBlockID method to assign a resource block the identifier “AUDIO”, Mobile Designer includes the parameter RESBLOCKID_AUDIO in the Parameters.java class.
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback