Search in sources :

Example 6 with MapScreenOptions

use of com.haulmont.cuba.gui.screen.MapScreenOptions in project cuba by cuba-platform.

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());
    ((WebWindow) notFoundScreen.getWindow()).setResolvedState(state);
    notFoundScreen.show();
}
Also used : NavigationState(com.haulmont.cuba.gui.navigation.NavigationState) MapScreenOptions(com.haulmont.cuba.gui.screen.MapScreenOptions) NotFoundScreen(com.haulmont.cuba.web.app.ui.navigation.notfoundwindow.NotFoundScreen) WebWindow(com.haulmont.cuba.web.gui.WebWindow)

Aggregations

MapScreenOptions (com.haulmont.cuba.gui.screen.MapScreenOptions)6 NotFoundScreen (com.haulmont.cuba.web.app.ui.navigation.notfoundwindow.NotFoundScreen)3 Screen (com.haulmont.cuba.gui.screen.Screen)2 MetaClass (com.haulmont.chile.core.model.MetaClass)1 Entity (com.haulmont.cuba.core.entity.Entity)1 Screens (com.haulmont.cuba.gui.Screens)1 LookupAction (com.haulmont.cuba.gui.actions.picker.LookupAction)1 RootWindow (com.haulmont.cuba.gui.components.RootWindow)1 EntityDataUnit (com.haulmont.cuba.gui.components.data.meta.EntityDataUnit)1 NavigationState (com.haulmont.cuba.gui.navigation.NavigationState)1 EditorScreen (com.haulmont.cuba.gui.screen.EditorScreen)1 OpenMode (com.haulmont.cuba.gui.screen.OpenMode)1 WebWindow (com.haulmont.cuba.web.gui.WebWindow)1 HashMap (java.util.HashMap)1 Set (java.util.Set)1