Event Handlers
Last updated
Last updated
For every widget, custom Events can be defined. Various options are present, which are described in detail below:
To add an Event which calls some REST API on clicking it, use this option:
Select a Widget to call REST API from.
Select the Action as Call Rest Api
Select the API ID to whatever API you want to be called.
Confirm by pressing Done.
If you want to configure custom navigation on your app, you can add this Event.
Select a Widget to add navigation, and navigate to Default Properties -> Event Handlers.
Select the Action as Go Back.
Confirm by pressing Done.
Now, users can press on the widget and navigate to the previous screen.
If you want to open a URL from within your app:
Select the Widget from which you want to open the URL.
Select the Action as Open Url.
Enter the URL, or fetch it from an API Call.
Select the LaunchMode.
Platform Default This option leaves the decision of how to launch the URL to the platform implementation.
WebView This option loads the URL in an in-app web view (e.g., Android WebView).
External Application This option passes the URL to the OS to be handled by another application.
External (Non-Browser) This option passes the URL to the OS to be handled by another non-browser application.
If you want to configure custom navigation on your app, you can add this Event as follows:
Select a Widget to add navigation, and navigate to Default Properties -> Event Handlers.
Select the Action as Go to Page.
Choose the page you want to navigate to from the Dropdown.
Confirm by pressing Done.
Now, users can press on the widget and navigate to the chosen screen.
If you want to save something on Local Storage, you can modify this Event:
Select a Widget to Set Local Storage in.
Select the Action as Set Local Storage.
Choose the Method as Set or Clear.
If you choose Set, you can enter the key
and value
you want to set.
Confirm by pressing Done.
This Event can help in force rebuilding a Page:
Select a Widget on clicking which the page will be rebuilt.
Select the Action as Rebuild Page.
Confirm by pressing Done.