Create Navigation Drawer in VBCS (Part3)
In this part we will write the code to navigate to different flows via the navigation bar
- Navigate to shell-drawer > navigation list > Create a custom Selection event.
- Add another variable updatedFrom in the Action and map the same to events updatedFrom value
- Now in action invoke the custom event navigateToItem, passing the selected value as parameter.
- We haven’t yet created an Event Listener for the navigateToItem event, lets create the same below.
- Navigate to shell page and create an Event listener for the event navigateToItem.
- Now Navigate to the created Action Chain and add a switch component with Item Parameter as the switch value.
- Now add multiple Navigate components to multiple branches of switch so the selection will navigate to corresponding flow.
- Now run the Application and check to see if the navigation is happening correctly or not.
- We can see that the navigation is happening correctly, now as a final step lets collapse the Navigation bar on component seletion.
- Go back to the Action Chain for Event navigateToItem and add a default flow to main and call the toggledrawer function.
- Now Run the application again to check if Navigation drawer navigated to corresponding flow and then closes the navigation bar.
Comments
Post a Comment