Search in sources :

Example 1 with SelectHandlerAdapter

use of com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter in project cuba by cuba-platform.

the class WebScreens method openLookup.

@SuppressWarnings({ "deprecation", "IncorrectCreateGuiComponent", "unchecked" })
@Override
public Window.Lookup openLookup(WindowInfo windowInfo, 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 Window.Lookup ? (Window.Lookup) screen : new ScreenLookupWrapper(screen);
}
Also used : GuiDialogWindow(com.haulmont.cuba.web.gui.components.WebDialogWindow.GuiDialogWindow) WebWindow(com.haulmont.cuba.web.gui.WebWindow) WebTabWindow(com.haulmont.cuba.web.gui.components.WebTabWindow) Screen(com.haulmont.cuba.gui.screen.Screen) SelectHandlerAdapter(com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)

Example 2 with SelectHandlerAdapter

use of com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter in project cuba by cuba-platform.

the class WebScreens method openLookup.

@SuppressWarnings({ "deprecation", "IncorrectCreateGuiComponent", "unchecked" })
@Override
public Window.Lookup openLookup(WindowInfo windowInfo, 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 Window.Lookup ? (Window.Lookup) screen : new ScreenLookupWrapper(screen);
}
Also used : GuiDialogWindow(com.haulmont.cuba.web.gui.components.WebDialogWindow.GuiDialogWindow) WebWindow(com.haulmont.cuba.web.gui.WebWindow) WebTabWindow(com.haulmont.cuba.web.gui.components.WebTabWindow) Screen(com.haulmont.cuba.gui.screen.Screen) SelectHandlerAdapter(com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)

Aggregations

SelectHandlerAdapter (com.haulmont.cuba.gui.components.compatibility.SelectHandlerAdapter)2 Screen (com.haulmont.cuba.gui.screen.Screen)2 WebWindow (com.haulmont.cuba.web.gui.WebWindow)2 GuiDialogWindow (com.haulmont.cuba.web.gui.components.WebDialogWindow.GuiDialogWindow)2 WebTabWindow (com.haulmont.cuba.web.gui.components.WebTabWindow)2