Search in sources :

Example 1 with ScreenLookupWrapper

use of com.haulmont.cuba.gui.screen.compatibility.ScreenLookupWrapper in project jmix by jmix-framework.

the class CubaScreens method openLookup.

@Override
public com.haulmont.cuba.gui.components.Window.Lookup openLookup(WindowInfo windowInfo, com.haulmont.cuba.gui.components.Window.Lookup.Handler handler, OpenType openType) {
    Map<String, Object> params = createParametersMap(windowInfo, Collections.emptyMap());
    MapScreenOptions options = new MapScreenOptions(params);
    Screen screen = createScreen(windowInfo, openType.getOpenMode(), options);
    applyOpenTypeParameters(screen.getWindow(), openType);
    ((LookupScreen) screen).setSelectHandler(new SelectHandlerAdapter(handler));
    show(screen);
    return screen instanceof com.haulmont.cuba.gui.components.Window.Lookup ? (com.haulmont.cuba.gui.components.Window.Lookup) screen : new ScreenLookupWrapper(screen);
}
Also used : LookupScreen(io.jmix.ui.screen.LookupScreen) LookupScreen(io.jmix.ui.screen.LookupScreen) EditorScreen(io.jmix.ui.screen.EditorScreen) Screen(io.jmix.ui.screen.Screen) ScreenLookupWrapper(com.haulmont.cuba.gui.screen.compatibility.ScreenLookupWrapper) MapScreenOptions(io.jmix.ui.screen.MapScreenOptions) SelectHandlerAdapter(com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)

Example 2 with ScreenLookupWrapper

use of com.haulmont.cuba.gui.screen.compatibility.ScreenLookupWrapper in project jmix by jmix-framework.

the class CubaScreens method openLookup.

@Override
public com.haulmont.cuba.gui.components.Window.Lookup openLookup(WindowInfo windowInfo, com.haulmont.cuba.gui.components.Window.Lookup.Handler handler, OpenType openType, Map<String, Object> params) {
    params = createParametersMap(windowInfo, params);
    MapScreenOptions options = new MapScreenOptions(params);
    Screen screen = createScreen(windowInfo, openType.getOpenMode(), options);
    applyOpenTypeParameters(screen.getWindow(), openType);
    ((LookupScreen) screen).setSelectHandler(new SelectHandlerAdapter(handler));
    show(screen);
    return screen instanceof com.haulmont.cuba.gui.components.Window.Lookup ? (com.haulmont.cuba.gui.components.Window.Lookup) screen : new ScreenLookupWrapper(screen);
}
Also used : LookupScreen(io.jmix.ui.screen.LookupScreen) LookupScreen(io.jmix.ui.screen.LookupScreen) EditorScreen(io.jmix.ui.screen.EditorScreen) Screen(io.jmix.ui.screen.Screen) ScreenLookupWrapper(com.haulmont.cuba.gui.screen.compatibility.ScreenLookupWrapper) MapScreenOptions(io.jmix.ui.screen.MapScreenOptions) SelectHandlerAdapter(com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)

Aggregations

SelectHandlerAdapter (com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)2 ScreenLookupWrapper (com.haulmont.cuba.gui.screen.compatibility.ScreenLookupWrapper)2 EditorScreen (io.jmix.ui.screen.EditorScreen)2 LookupScreen (io.jmix.ui.screen.LookupScreen)2 MapScreenOptions (io.jmix.ui.screen.MapScreenOptions)2 Screen (io.jmix.ui.screen.Screen)2