Definitions of Events and Actions

Actions define how a control reacts to user interactions or internal events.

The framework currently supports these event types:
  • onClick (touch)
  • onLongClick (touch and hold)
  • onOrientationChange (on-phone orientation change)
  • onEnter (on Enter pressed)
  • onSearch (for MAFSearchBars)
  • onChange (for example, after text changes in TextViews)
  • onDataLoaded
  • onProgressCanceled
  • onContextChanged
  • onGlobalContextChanged
  • onLeftSwipe
  • onRightSwipe
  • onBottomSwipe
  • onTopSwipe
  • onBeforeAppear
  • onAfterAppear
  • onAfterCreate
  • onAfterDataLoad
These actions define what happens when an event is triggered:
  • navigate – navigates to another screen with a given target tile.
  • back – returns to the previous screen.
  • copy – copies attributes from the source object to the target object.
  • save – saves any changes that have been made to the current object.
  • delete – deletes the current object.
  • uiRefresh – refreshes the current tile’s views.
  • dataReload – reloads the data.
  • showModal – presents the tile modally.
  • dismissModal – closes a modal screen.
  • updateContext – updates the tile’s context.
  • clearContext – purges context.
  • updateGlobalContext – updates the global context cache with values that are provided as action parameters.
  • clearGlobalContext – cleans up the global contex.
  • pushUndoBuffer – starts an undo group; changes made in an undo group can be undone simultaneously.
  • popUndoBuffer – closes a previously opened undo group.
  • emptyUndoBuffer – reverts all BO changes.
  • showProgressView – shows an alert view; the alert view’s parameters are provided in the binding and the BindingRef.
  • showProgressIndicator – shows a progress indication in the header area.
  • dismissProgressView – closes the progress dialog or indicator previously opened via showProgressView or showProgressIndicator.
  • showAlterView - displays a new alert dialog.
  • phoneCall – starts a phone call.
  • showToast – shows a new toast message.
This example demonstrates how to define a button to react to touch events by navigating to the tile with the TimeAccountsScreen ID:
<UIElement type=”button”>
    <P pid="text" value="Time Accounts" visible="true" />
    <P pid="halign" value="left" />
    <P pid="width" value="49%" />
    <P pid="height" value="25pt" />
    <P pid="style" value="BlackButton" />
    <Event id="onClick">
        <Action id="navigate">
            <P pid="target" value="TimeAccountsScreen" />