Search in sources :

Example 1 with NotFoundScreen

use of io.jmix.ui.app.navigation.notfoundwindow.NotFoundScreen in project jmix by jmix-framework.

the class ScreenNavigationHandler method handle404.

protected void handle404(String route, AppUI ui) {
    MapScreenOptions options = new MapScreenOptions(ParamsMap.of("requestedRoute", route));
    NotFoundScreen notFoundScreen = ui.getScreens().create(NotFoundScreen.class, OpenMode.NEW_TAB, options);
    NavigationState state = new NavigationState(ui.getUrlRouting().getState().getRoot(), "", route, Collections.emptyMap());
    ((WindowImpl) notFoundScreen.getWindow()).setResolvedState(state);
    notFoundScreen.show();
}
Also used : WindowImpl(io.jmix.ui.component.impl.WindowImpl) NotFoundScreen(io.jmix.ui.app.navigation.notfoundwindow.NotFoundScreen)

Aggregations

NotFoundScreen (io.jmix.ui.app.navigation.notfoundwindow.NotFoundScreen)1 WindowImpl (io.jmix.ui.component.impl.WindowImpl)1