↓ Skip to main content
An embroidered sampler on pale linen with twelve small motifs in three rows of four: a circle, a square, a triangle, a cross, a star, a zigzag, a wave, a diamond, a ladder, a spiral, a ring and a chevron. Eleven motifs are teal, and the star is orange.

MAML Quick Reference

MAML has more than two hundred elements. The pages of our Components Explorer are built from about sixty of them, and this page lists the forty we reach for most, with the attributes that carry them. It is a reminder for people who know MAML, and a map for people who start. For an element in depth, follow the link of its family.

MAS 9.2 series cheatsheet

Every element, attribute and value on this page is in use on the pages of our Components Explorer. That app passes the strict mobile build of the MAS 9.2 series, so everything here is accepted by the build. One attribute is the exception: saved-query comes from IBM’s apps and from our guide on saved queries. The page makes no claim to list every attribute an element has.

The skeleton of a page
#

One of our pages, shortened to one of each part:

<page id="fs_d_load" controller="FsDataController" title="Data: when a datasource loads">
  <states id="fs_d_load_states">
    <state id="fs_d_load_last" name="last" type="string" value="no call yet"/>
    <state id="fs_d_load_go" name="go" type="boolean" value="false"/>
  </states>
  <maximo-datasource id="fs_d_load_bound" object-structure="mxapiwodetail"
      where="siteid=&quot;BEDFORD&quot;" order-by="wonum" page-size="3" selection-mode="none">
    <schema id="fs_d_load_bound_s">
      <attribute name="wonum" unique-id="true" id="fs_d_load_bound_a_wonum"/>
      <attribute name="description" id="fs_d_load_bound_a_description"/>
    </schema>
  </maximo-datasource>
  <header-template id="fs_d_load_hdr" title="Data: when a datasource loads"/>
  <box id="fs_d_load_body" direction="column" padding="1">
    <label id="fs_d_load_last_l" wrap="true" label="Last call: {page.state.last}"/>
    <button id="fs_d_load_bound_load" kind="secondary" label="load()" on-click="run"
        on-click-arg="{{ds: 'fs_d_load_bound', call: 'load'}}"/>
  </box>
</page>

A page has four kinds of children: its states, its datasources, a header, and the elements that draw. Every element carries an id, and an id exists once in the whole app. The build stops on a second use.

The guides for this section are MAML Basics, Understanding app.xml.

Bindings
#

You writeIt reads
{page.state.last}a state of the page
{app.state.ctlText}a state of the application
{fs_d_load_one.item.wonum}an attribute of the current record of a datasource
{fs_d_load_bound.state.itemCount}a state of a datasource
{item.wonum}an attribute of the row, inside a list or a card
label="Last call: {page.state.last}"text and a binding in one value
{page.state.touch ? '' : 'Data'}an expression
disabled="{page.state.busy}"a binding for an attribute that is true or false
on-click-arg="{{ds: 'fs_d_load_bound', call: 'load'}}"an object as the argument of a handler
on-click-arg="{item}"the record of the row as the argument

Quotes inside an attribute are written as &quot;, as in the where of the skeleton.

The guide for this section is Data Binding.

Structure and layout
#

ElementUseAttributes
pageone screencontroller, title
states, statethe values of a pagename, type (string, boolean, number), value
header-templatethe header of a pagetitle, hide-breadcrumb
boxputs its children in a row or a columndirection (column, row), padding, horizontal-align, vertical-align, background-color
border-layout with start, middle, endregions of a screenfill-parent
tabs, tabtabs, one child per tablabel on the tab
adaptive-row, adaptive-columncolumns that change with the width of the screensmall-width, medium-width, large-width, xlarge-width

The guides for this section are Layout with Containers, Responsive Design in Maximo Mobile.

Text and media
#

ElementUseAttributes
labela textlabel, wrap, theme (14-regular, 16-bold)
fielda value with its label, read onlylabel, value, hide-label, wrap
iconan iconicon, size (16, 20, 24, 32), fill
taga small coloured marklabel, type (red, green, gray, blue, teal, and more)
imagea picturesrc, title, width

The guide for this section is Icons and Images.

Actions
#

ElementUseAttributes
buttonruns a method, opens a page or a dialogkind (primary, secondary, tertiary, ghost, danger), label, icon, on-click, on-click-arg, page, dialog, disabled
button-groupholds buttons togetheralign (start, end)
menu-button, menu-itema button with a menukind and label on the button; label, icon, on-click, on-click-arg on the item

Some attributes of a button need no controller at all: page="fs_d_kinds" opens a page, and dialog opens a dialog of the page. The buttons guide lists the others.

The guide for this section is Buttons and Actions.

Inputs
#

ElementUseAttributes
text-inputone line of textlabel, value, placeholder, type (text, email, number, tel, url, password), readonly, max-length, on-change
text-areaseveral lineslabel, value, rows
number-inputa numberlabel, value, hide-step-buttons
date-inputa datelabel, value, type, min-date, max-date
togglea switchlabel, toggled, on-toggle, on-toggle-arg
checkboxa checklabel, checked, on-change, on-change-arg
dropdownone choice from a datasourcelabel, datasource, datasource-value-field, datasource-text-field, selected-item, on-change
smart-inputan input that takes its kind from the attributelabel, value, input-kind, required, readonly, lookup, enable-lookup-buttongroup, select-lookup-attribute

A value that binds to {datasource.item.attribute} writes into the record, and the datasource then has an unsaved change. Our inputs that belong to no record carry unbound="true".

The guide for this section is Forms and Input Fields in Maximo Mobile.

Lists
#

ElementUseAttributes
data-listthe rows of a datasourcedatasource, show-search, show-count, no-select-behavior, empty-set-string, on-item-click, on-item-click-arg
list-itemthe template of a rowlabel, sub-label, badge-label, badge-type, page, page-params; or children of its own
card-group, cardthe rows as cardsdatasource, card-click, card-click-arg on the group
<data-list id="fs_d_load_bound_list" datasource="fs_d_load_bound" no-select-behavior="true" show-search="false">
  <list-item id="fs_d_load_bound_list_item">
    <label id="fs_d_load_bound_list_item_t" wrap="true" label="{item.wonum} · {item.description}"/>
  </list-item>
</data-list>

The guide for this section is Lists and Data-Lists in Maximo Mobile.

Dialogs, drawers and lookups
#

ElementUseAttributes
dialoga window over the pagetitle, size (xs, sm, md, lg), primary-action-text, on-primary-action, secondary-action-text, on-secondary-action, controller
sliding-drawera panel that slides in from a sideheader-text, align (start, end)
lookupa list to pick a value fromdatasource, lookup-heading, lookup-attributes, show-search, show-count, on-item-click

Dialogs are children of the page, inside <dialogs>. A button opens one with dialog="its id", and a controller with this.page.showDialog('its id').

The guides for this section are Dialogs and Lookups Overview, the cookbook recipes Add a Dialog and Lookup Field.

Data
#

ElementUseAttributes
maximo-datasourcerows from Maximoobject-structure, where, saved-query, order-by, page-size, selection-mode, can-load, pre-load, controller
json-datasourcerows from a file of the appsrc, id-attribute, selection-mode, pre-load, search-attributes
schema, attributewhat a row holdsname, unique-id, searchable, sortable, title, type, sub-type, computed-function

The Datasource Cheatsheet has these in full, with what each one sends.

Events
#

AttributeOn
on-clickbutton, menu-item
on-changetext-input, checkbox, dropdown
on-toggletoggle
on-item-clickdata-list, list-item, lookup
card-clickcard-group
on-primary-action, on-secondary-actiondialog

Every event attribute has a partner with -arg at its end, which passes a value to the handler. A handler of on-click gets that value and then the click event. Without the -arg attribute, the click event is its first parameter. The handler of on-change on a text-input runs for each keystroke. The Controller Methods Cheatsheet lists which controller a handler is looked for in.

This page as a PDF, to print or to keep beside the keyboard.


IBM documents every element with all its attributes in the product itself. In the Application Configuration application, open the ? menu and choose Component Documentation.