- 02 Jun 2022
- 2 Minutes to read
- Updated on 02 Jun 2022
- 2 Minutes to read
Events fall under the following categories.
- App lifecycle events
- Page lifecycle events
- Component events
- Variable events
- Other events
- Custom events
Currently, events do not expose their schema to Composer fully, so while there's a definite schema to the data available in the
eventValue output of an event node, you need to manually utilize it via formulas, e.g. writing
outputs[:id].eventValue.params to access the parsed parameters of the App brought to foreground via URL event.
App lifecycle events
App lifecycle events have to deal with the running application as a whole.
Available on the global canvas. Executed when the app has started and is ready to start executing logic.
App brought to foreground via URL
Mobile-only. Executed when the app was brought to the foreground via a custom URL scheme link. For the default AppGyver Preview app, the URL scheme is
sapappgyver://. You can define a custom scheme for your app binary in the Build Service.
The examples below assume the app was brought to foreground via the URL
||Path part of the URL.|
||Object containing the parsed query parameters from the URL.|
||Full unparsed URL.|
Page lifecycle events
The following events happen in the context of a single page.
Executed once when the page is added to the navigation stack, either by being the root page or via the Open page flow function.
Refreshing a page in the browser or navigating directly to a route also causes the Page mounted event to be fired.
Executed when the page becomes focused, including the following conditions:
- The page is pushed to navigation stack with Open page
- The page is the topmost in the navigation stack of a tab the user switches back to
- A page above the page is popped from the navigation stack (via e.g. Navigate back or native back button)
Executed when the page becomes blurred, i.e. loses focus.
Page nav bar item clicked
Executed when an item in the navigation header bar is clicked. The event value contains the clicked button's index.
The following events happen in the context of a single component.
Executed when the component is tapped/clicked by the user.
If there are logic nodes attached to the tap event, a tap animation is played when the component is tapped.
This event is available for all view components.
Executed when the component's input value changes, e.g. the user finishes typing a new value in an Input field or a new option is selected in a dropdown.
Event value contains the new input value.
Executed when an input component becomes focused, e.g. the user selects an Input field.
Executed when an input component is blurred, i.e. loses focus.
Custom events for composite components
Composite components can define custom events.
Custom events should always map to actual primitive component events inside the composite, linked via the Trigger event node.
For example, a product card composite with Add to cart and Change variant buttons could have events Add to cart button tap and Change variant button tap, allowing whoever's using the composite to wire the desired logic correctly without having to edit the composite component itself.