After routing configuration, we will now take a look at how to use the router with the configured routes.
Implementing the Carrier View
How do you implement a carrier view? Take a look.
Implementing the Flights Detail View
The Flights view displays master data for a flight
sap.m.ObjectHeader control. The data comes from a relative data binding that is set on the view level as we have seen in the controller before.
The Flights view implementation shows the details of the selected carrier and the list of flights for the selected carrier in a table. To provide the functionality for navigating back to the carrier view, we add the property showNavButton with the value, true, to the page object. To handle the back navigation, we assign an event handler for the navButtonPress event (1). The event handler is implemented inside the flights controller.
Implementation of the Back Button on the Flights Page
To enable the back navigation from the Flights view to the Carrier view, we have to add a corresponding event handler.
Let's take a look at the details involved in implementing the back button on the Flights page.