Using Events

Just like properties, all items added to a page will contain some sort of events.

Events are functions that are called when an object does something or you have to perform certain action. For example, when you click a button, the “Onclick” event for the button is triggered. When a document is first loaded, the “Onload” event is triggered. You can intercept these events before or after they occur, allowing you control over what the events does.

You can add, edit, or delete an event for a UI page.

Procedure

  1. On the properties section, click Events.
  2. Click . The Event Editor is displayed.
  3. Enter the JavaScript function for the event. For events that do not include default functions, empty functions are created where all parameters defined in the event are passed into the empty function as arguments. This provides as a starting point when you want to override certain events.
  4. Click Validate to validate that the JavaScript function is correct.
  5. Click OK. Any code listed in the Event Editor will be displayed in-line in the MDM UI Builder Events view. In case you have defined a default JavaScript function in the widget XML file, the default function is displayed in-line in the events view.
  6. Click to add new a new event.
  7. Select the event which you want to delete and click . The event is removed from the list of events.
    Note: Creation of events is not supported for root panel.