Data Objects

Device Application Designer provides layers for wrapping data, such as styles, variables, and mobile business objects (MBOs).

Device Application Designer Data Object Types
Data Type Class Description

Variable

ControlVariable

Holds the variable attributes for controls. It includes type (USER for user-defined variables, SYSTEM for system-defined variables, TABLE for table context variables), key (variable key), and MBO id (for table context variables).

Variable Management

RIMVariables

Manages variables, including store/access variables.

Style

FontStyle

Holds the font information, including font face, font size, font size unit, font style, background color, foreground color, and gradient color.

Logical Type

LogicalType

Contains all the logical type information. Also contains personal information management (PIM) information if applicable.

MBO

CommonMBOModel

MBOModel

PKMBOModel

CommonMBOModel contains information about MBOs and their subclasses, including normal MBO, personalization MBO, and local business object.

CommonMBOModel provides methods for the MBO, including submitPendingOperations and syncPublication.

Other important classes in this package include:

  • ModelChangeEvent
  • MobileApplicationDataHandler
  • MobileApplicationDataPagingHandler
  • MBOModelSyncParameters

MBO Attribute

MBOAttribute

Contains information about MBO attribute ID, display name and datatype.

Client Profile

RIMClientProfile

Contains client profile information, including profile name, server name, server port, user name, password, package name, stream parameters, and so on.

Link Parameter

RIMLinkParamNode

Contains link parameter information.

MBO Application

RIMMBOMobileApplication

Represents the MBO in Device Application Designer styles.

Repository

RIMRepository

The central place for store or accessing the client profile, client settings, variables, MBO applications, and other settings.

Settings

RIMSettings

Contains various settings information, including the push settings, screen saver settings, log level settings.

Validation Object

RIMValidationObject

Manages validation information, including regular expressions and messages.

Example 1

These examples illustrate how to assign and read variables.
Adds a variable in BOBCUIdefinition:
addVariable(VARIABLE_HISVAR, "hisVarValue",
	VariableProperties.VARIABLE_TYPE_USER,
	MBOAttribute.SCHEMA_TYPE_STRING);
Use variables in controls:
case LABEL2:
Label locallabel2 = (Label) object;
locallabel2.setFontStyle(styleLabel_Style);
//locallabel2.setFooterField(null);
locallabel2.setFocusFontStyle(styleDefault_Style);
locallabel2.setWrapText(false);
locallabel2.setVariableLabel(new ControlVariable(
		BOBCUIDefinition.VARIABLE_HISVAR,
		VariableProperties.VARIABLE_TYPE_USER, null, null));
Use table variables:
localtextInput4.setVariableInput(new ControlVariable(
		"dept_head_id", VariableProperties.VARIABLE_TYPE_TABLE,
		BOBCUIDefinition.MBO_A_B_C_DEPARTMENT, null));
Context variables must be saved before table variables are used by context actions:
case MENU6:
MenuAction menu6 = (MenuAction) object;
//Create list of actions 
ActionList actionList13 = new ActionList();
IBOBAction connectionAction9 = new ScreenAction(UIDefinition
		.getScreen("screen4"), false, null);
menu6.setAction(actionList13);
IBOBAction contextAction4 = new SaveMobileDataContextAction(
		cellTable1);
actionList13.addAction(contextAction4);
actionList13.addAction(connectionAction9);
cellTable1.setDefaultAction(actionList13);