use of com.haulmont.cuba.gui.screen.compatibility.ScreenEditorWrapper in project jmix by jmix-framework.
the class CubaScreens method openEditor.
@Override
public com.haulmont.cuba.gui.components.Window.Editor openEditor(WindowInfo windowInfo, Entity item, OpenType openType, Map<String, Object> params) {
Screen editor = createEditor(windowInfo, item, openType, params);
editor.show();
return editor instanceof com.haulmont.cuba.gui.components.Window.Editor ? (com.haulmont.cuba.gui.components.Window.Editor) editor : new ScreenEditorWrapper(editor);
}
use of com.haulmont.cuba.gui.screen.compatibility.ScreenEditorWrapper in project jmix by jmix-framework.
the class CubaScreens method openEditor.
@Override
public com.haulmont.cuba.gui.components.Window.Editor openEditor(WindowInfo windowInfo, Entity item, OpenType openType) {
Map<String, Object> params = createParametersMap(windowInfo, Collections.singletonMap(WindowParams.ITEM.name(), item));
MapScreenOptions options = new MapScreenOptions(params);
Screen screen = createScreen(windowInfo, openType.getOpenMode(), options);
applyOpenTypeParameters(screen.getWindow(), openType);
EditorScreen editorScreen = (EditorScreen) screen;
editorScreen.setEntityToEdit(item);
show(screen);
return screen instanceof com.haulmont.cuba.gui.components.Window.Editor ? (com.haulmont.cuba.gui.components.Window.Editor) screen : new ScreenEditorWrapper(screen);
}
use of com.haulmont.cuba.gui.screen.compatibility.ScreenEditorWrapper in project jmix by jmix-framework.
the class CubaScreens method openEditor.
@Override
public com.haulmont.cuba.gui.components.Window.Editor openEditor(WindowInfo windowInfo, Entity item, OpenType openType, Datasource parentDs) {
Map<String, Object> params = createParametersMap(windowInfo, Collections.singletonMap(WindowParams.ITEM.name(), item));
MapScreenOptions options = new MapScreenOptions(params);
Screen screen = createScreen(windowInfo, openType.getOpenMode(), options);
applyOpenTypeParameters(screen.getWindow(), openType);
EditorScreen editorScreen = (EditorScreen) screen;
if (editorScreen instanceof AbstractEditor) {
((AbstractEditor) editorScreen).setParentDs(parentDs);
}
editorScreen.setEntityToEdit(item);
show(screen);
return screen instanceof com.haulmont.cuba.gui.components.Window.Editor ? (com.haulmont.cuba.gui.components.Window.Editor) screen : new ScreenEditorWrapper(screen);
}
use of com.haulmont.cuba.gui.screen.compatibility.ScreenEditorWrapper in project jmix by jmix-framework.
the class CubaScreens method openEditor.
@Override
public com.haulmont.cuba.gui.components.Window.Editor openEditor(WindowInfo windowInfo, Entity item, OpenType openType, @Nullable Map<String, Object> params, Datasource parentDs) {
params = createParametersMap(windowInfo, params);
params.put(WindowParams.ITEM.name(), item);
MapScreenOptions options = new MapScreenOptions(params);
Screen screen = createScreen(windowInfo, openType.getOpenMode(), options);
applyOpenTypeParameters(screen.getWindow(), openType);
EditorScreen editorScreen = (EditorScreen) screen;
if (editorScreen instanceof AbstractEditor) {
((AbstractEditor) editorScreen).setParentDs(parentDs);
}
editorScreen.setEntityToEdit(item);
show(screen);
return screen instanceof com.haulmont.cuba.gui.components.Window.Editor ? (com.haulmont.cuba.gui.components.Window.Editor) screen : new ScreenEditorWrapper(screen);
}
Aggregations