MAS 9.2 series framework 3.2.8xx
This is the overview. Building a dialog and wiring a lookup each have their own guide, named at the end.
The proportions come from the apps that IBM ships with a 9.2-series install, as Application Configuration shows them. The pictures come from our own Components Explorer app, a small Maximo Mobile app we built for these articles. IBM releases about once a month, so details move and the proportions hold.
A lookup is a dialog with a datasource#
Every <lookup> in the shipped apps carries a datasource attribute, with no exception anywhere. The attributes that lookups set fall into three groups:
- Every lookup sets
idanddatasource. - Almost every lookup sets
show-searchandlookup-heading. - Most lookups set
lookup-attributes, and many also setshow-count,tight,width,borderandheight.
That first pair of attributes carries the whole idea between them. A dialog is a container that shows whatever you put in it, while a lookup is the same container with a list of records bound to it. It adds a search box on top and a way to hand your selection back.
The attributes that follow say the same thing in more detail. lookup-heading names the column the user reads, lookup-attributes lists the fields to search across, and show-count puts the number of matches on screen. All three exist because the content is a query result.
In Maximo Mobile on a tablet, the lookup slides in from the start edge as a drawer. It shows the count, the search box and the records, and the page stays dimmed behind it. On a phone the same lookup fills the whole screen.

The markup behind it comes from our Components Explorer app. The button names the lookup, and the lookup names its datasource:
<button id="fs_d_lookup_open_both" kind="secondary"
label="show-search + show-count" lookup="fs_d_lookup_both"/>
<lookup id="fs_d_lookup_both" datasource="fs_d_lookup_ds"
lookup-heading="Pick an asset"
show-search="true" show-count="true"
lookup-attributes="{['assetnum', 'description']}"
on-item-click="pickRows" on-primary-action="pickRows"/>show-count writes “8 records” above the list, and show-search adds the search box. With both set
to false, the drawer shows the heading and the rows alone.
A dialog is mostly its action bar#
What a <dialog> sets is almost entirely about the buttons along the bottom:
- Every dialog sets
id, and nearly every dialog sets atitle. - Most dialogs set
primary-action-textandon-primary-action. - Many dialogs also set
secondary-action-textandon-secondary-action, and some seton-close-action. - A smaller group sets
size,on-primary-action-argandprimary-button-disabled.
Most of the attributes that dialogs set belong to the action bar, so a dialog in this framework is a titled box with one clear action. Many also carry a second action and a close.
The primary label and the primary handler do not always come as a pair. Some dialogs label a primary button and hand it no controller method, which means the button closes the dialog and nothing else happens. That is a legitimate confirm-and-dismiss pattern.
Here is such a dialog with both buttons. On a tablet it sits in the middle of the dimmed page. On a phone it fills the screen, and the action bar moves to the bottom edge.

<button id="fs_d_actions_open_two" kind="secondary"
label="+ secondary-action-text" dialog="fs_d_actions_two"/>
<dialog id="fs_d_actions_two" title="Two buttons"
primary-action-text="OK" on-primary-action="closeDialogs"
secondary-action-text="Cancel" on-secondary-action="closeDialogs">
<box id="fs_d_actions_two_c" direction="column">
<label id="fs_d_actions_two_t" wrap="true"
label="primary-action-text and secondary-action-text are set."/>
</box>
</dialog>Four attributes make the action bar. The two *-action-text attributes give the labels, and the two
on-*-action attributes name the controller methods that run on a tap.
Opened far more often than inspected#
The controller side is lopsided in a way that tells you how to think about a dialog in the first place. Three calls matter, from the most used to the least used:
showDialogopens a dialog by id.findDialoggets the dialog object.closeDialogcloses it.
Code opens dialogs clearly more often than it goes looking for one, and the lifecycle hooks are rarer still. dialogInitialized is implemented in some apps, while dialogOpened and dialogClosed appear only in a few.
Read that as guidance, because a dialog is usually a thing you open by id and let the framework manage. Reaching for the object itself is the exception, and it is worth asking why you need it.
The drawer, the flyout and the panel#
| Surface | What it is |
|---|---|
<dialog> | a titled box over the page, with an action bar |
<lookup> | a dialog with records bound to it |
<panel> | one view in a stack, swapping the page content in place |
<sliding-drawer> | slides in from the edge and leaves the page visible |
<flyout> | a small popover anchored to what you tapped |
The sliding drawer comes in from the edge and leaves the page visible behind it. It is a real option and a minority one, suiting a filter panel or a set of options the user adjusts while watching the list change.
The flyout is a small popover anchored to what you tapped. It is close to unused in the shipped apps, so treat it as available and unproven.
The panel sits in the page itself and overlays nothing. It sits in a stack, one showing at a time, and swaps the page content in place. It is more common than the lookup, and Layout with Containers covers it there as the container it really is.
This drawer comes in from the end edge. The page stays in view behind it, dimmed, and that is the reason to pick a drawer over a dialog.

<button id="fs_d_drawer_open_end" kind="secondary" label="align: end"
sliding-drawer="fs_d_drawer_end"/>
<sliding-drawer id="fs_d_drawer_end" header-text="Sliding drawer"
align="end">
<box id="fs_d_drawer_end_c" direction="column" background-color="ui-02">
<label id="fs_d_drawer_end_t1" wrap="true"
label="Drawer content. The grey box shows the space around it."/>
<button id="fs_d_drawer_end_close" kind="secondary" label="Close"
on-click="closeDialogs"/>
</box>
</sliding-drawer>align picks the edge: start is the left side in a left-to-right language, and end is the right side.
Choosing between them#
| The situation | The surface |
|---|---|
| Confirm, warn, or collect two or three fields | a dialog |
| Let the user pick a record from a list | a lookup |
| Filters or options the user tunes while watching the page | a sliding drawer |
| A second view of the same record, replacing the content | a panel |
| A small menu anchored to one control | a flyout, knowing almost nobody has used one |
The question that settles most cases is whether the user needs to see the page while they decide. If they do, use a drawer. If the decision replaces the page for a moment, use a dialog.
What to read next#
- Dialog Implementation and Lookup Implementation are the members-only guides that take these two apart, covering the action callbacks, the lifecycle, the selection return and the measurements behind this page.
- Buttons and Actions for the buttons that open a dialog with no controller at all.
- Layout with Containers for the panel and the stack it lives in.
