Documentation

Documentation versions (currently viewingVaadin 23)

You are viewing documentation for Vaadin 23. View latest documentation

Getting Registered Routes

To retrieve all registered Routes, use:

List<RouteData> routes = RouteConfiguration.forSessionScope().getAvailableRoutes();
  • The RouteData object contains all the relevant information about the defined route, such as the route template, parameters, and parent layouts.

Getting Registered Routes by Parent Layout

To retrieve all the routes defined by parent layout, use:

List<RouteData> routes = RouteConfiguration.forSessionScope().getAvailableRoutes();
List<RouteData> myRoutes = routes.stream()
        .filter(routeData -> MyParentLayout.class.equals((routeData.getParentLayout())))
        .collect(Collectors.toList());

B3B020DA-66FD-481A-8ED8-A94C99CBA9A6