!--a11y-->
Model a Tile for a CompanionThis process describes the steps required to create and design a tile that need to be used in a mobile client companion using Mobile Application Studio.

We recommend that you create a tile for a companion, instead of reusing a tile that you have modeled for a mobile client application. This is required because:
§ The screen area of a PDA device is smaller than the screen area of a laptop.
§ The number of fields that can be displayed in a PDA screen area are fewer.
§ Not all controls and events used in a mobile client application are supported in a companion.
You have identified the required data source(s) to be associated with the tile.
...
1.
MAS users create a
tile of a specific type. The tile types that are supported in a companion are
Detail, List and Extended List. For more information, see
Creating a
Tile.
2. MAS users add the required bound and unbound controls using properties of the data source(s) and UI Toolbox controls. The unbound controls that are supported for each tile type are indicated in the table below.
Tile Type |
Control Name |
Detail |
Static-Text control |
Input control |
|
Button control |
|
Checkbox control |
|
Multi-Line Input control |
|
Combo-Input control |
|
Date-Time control |
|
Blue-box control (use this control to model a signature control only) |
|
List |
Grid control |
Extended List |
Grid control |
Button control |
|
Static-Text control |
For more
information, see
Adding Controls to a
Tile.

§ In the List and Extended List tile types, only one business anchor is supported.
§ In the Detail tile type, multiple business anchors (one main root anchor and the remaining child anchors) are supported. In this case, you must drag and drop the child anchors under the main root anchor. However, you must ensure that the number of child anchors is less than four. (A maximum of three child anchors is recommended.) This is recommended because a larger number of child anchors decreases performance of displaying data in the tile during runtime.
3. MAS users define the behavior of the tile by writing methods and event handlers for the supported events.

The custom events, custom properties and free scripts are not supported.
The events that are supported for the tile and controls are indicated in the following table.
Tile/Control |
Event Name |
Tile |
onInitialize() |
beforeSave(ByRef cancel As Boolean) |
|
afterSave(ByVal success As Boolean) |
|
beforeDelete(ByRef cancel As Boolean) |
|
afterDelete(ByRef cancel As Boolean) |
|
afterMove(ByVal success As Boolean) |
|
afterNew(ByVal success As Boolean) |
|
Unbound control (Button control) |
onClicked() |
Unbound control (Static Text control) |
onClicked() |
For more
information, see Mobile Client
Companion Framework API and
Writing Scripts for an
Interaction Component.
4.
MAS users create
hyperlink sources for the required bound controls of the tile, if required. In
a companion, only the Internal type of hyperlink
sources are supported. These hyperlink sources allow the application user to
navigate to the required tile sets during runtime. For more information, see
Creating a
Hyperlink Source.

If you create a hyperlink source to a grid control, the framework generates the corresponding grid control event.
If you want the application user to navigate to a tile set via a button (unbound control), then you must use the following methods:
§ To navigate from the button existing in an Extended List tile, use the method ListManager.jumpUsingTarget (hyperlinkname as String, addToHistory as Boolean, createNewRecord as Boolean)
§ To navigate from the button existing in a Detail tile, use the method DetailManager.jumpUsingTarget (mTileinfo, hyperlinkname as String, addToHistory as Boolean)
The tile that need to be used in a companion is modeled. This tile can be included in a tile set. If a hyperlink source for a bound control is created, a hyperlink must be created at the application level. This hyperlink maps the hyperlink source with a hyperlink target.