Event Handlers

For every widget, custom Events can be defined. Various options are present, which are described in detail below:

Call Rest Api

To add an Event which calls some REST API on clicking it, use this option:

  1. Select a Widget to call REST API from.

  2. Select the Action as Call Rest Api

  3. Select the API ID to whatever API you want to be called.

  4. Confirm by pressing Done.

Go Back

If you want to configure custom navigation on your app, you can add this Event.

  1. Select a Widget to add navigation, and navigate to Default Properties -> Event Handlers.

  2. Select the Action as Go Back.

  3. Confirm by pressing Done.

  4. Now, users can press on the widget and navigate to the previous screen.

Open Url

If you want to open a URL from within your app:

  1. Select the Widget from which you want to open the URL.

  2. Select the Action as Open Url.

  3. Enter the URL, or fetch it from an API Call.

  4. Select the LaunchMode.

    1. Platform Default This option leaves the decision of how to launch the URL to the platform implementation.

    2. WebView This option loads the URL in an in-app web view (e.g., Android WebView).

    3. External Application This option passes the URL to the OS to be handled by another application.

    4. External (Non-Browser) This option passes the URL to the OS to be handled by another non-browser application.

Go to Page

If you want to configure custom navigation on your app, you can add this Event as follows:

  1. Select a Widget to add navigation, and navigate to Default Properties -> Event Handlers.

  2. Select the Action as Go to Page.

  3. Choose the page you want to navigate to from the Dropdown.

  4. Confirm by pressing Done.

  5. Now, users can press on the widget and navigate to the chosen screen.

Set Local Storage

If you want to save something on Local Storage, you can modify this Event:

  1. Select a Widget to Set Local Storage in.

  2. Select the Action as Set Local Storage.

  3. Choose the Method as Set or Clear.

  4. If you choose Set, you can enter the key and value you want to set.

  5. Confirm by pressing Done.

Rebuild Page

This Event can help in force rebuilding a Page:

  1. Select a Widget on clicking which the page will be rebuilt.

  2. Select the Action as Rebuild Page.

  3. Confirm by pressing Done.

Last updated