In this section, we will see Events and Event Listeners in VBCS.
What are Events?
Event occurs when something happens in application.
Example- Page Load, button click etc.
Event Listener listens to events and then starts one or more action chains. So, every event is associated with event listener and one or more action chains.
Types of Events:
VBCS is having 4 types of events:
Event Type | Event Name | Purpose |
Lifecycle events: These events are automatically triggered during page’s lifecycle | vbEnter | This is triggered when all flows or page variables have been initialized |
vbBeforeEnter | This is triggered before navigating to a page | |
VbBeforeExit | This is triggered before leaving a page. | |
vbExit | This is triggered before leaving a flow or page | |
vbAfterNavigate | This is triggered when navigation to the page is complete | |
Component events: These events are associated with UI components in VBCS page like button, combo box etc. | ojAction | |
Variable events: These events are associated with variable when a value stored in variable is changes. | onValueChanged | |
Custom events: These are user-defined event to start an action chain. It can be triggered by a fire Event method in action chain or by using fireCustomEvent () method in a module JavaScript function. |
Let us create sample page and define Lifecycle events with vbEnter to display Welcome message.
Create new VBCS app with name as “VBCSEventsApp” as shown below:

Click on Create.
Let us define new Event Listener to listen to page load event as shown below:


Select vbEnter event here and click on Next.

Click on Create Page Action Chain and click on Finish.

This will create new action chain. Click on “Go to Action Chain” to add logic.

Now let us add notification components to display Welcome message.

Click on expression editor for Summary and Message.

Click on Save.

Run this application.
