Search in sources :

Example 6 with ScreenOptions

use of io.jmix.ui.screen.ScreenOptions in project jmix by jmix-framework.

the class EditorBuilderProcessor method getOptionsForScreen.

@Override
protected <E> ScreenOptions getOptionsForScreen(String editorScreenId, E entity, EditorBuilder<E> builder) {
    ScreenOptions options = super.getOptionsForScreen(editorScreenId, entity, builder);
    WindowInfo windowInfo = windowConfig.getWindowInfo(editorScreenId);
    if (LegacyFrame.class.isAssignableFrom(windowInfo.getControllerClass()) && options == FrameOwner.NO_OPTIONS) {
        HashMap<String, Object> paramsMap = new HashMap<>();
        paramsMap.put(WindowParams.ITEM.name(), entity);
        options = new MapScreenOptions(paramsMap);
    }
    return options;
}
Also used : HashMap(java.util.HashMap) LegacyFrame(com.haulmont.cuba.gui.screen.compatibility.LegacyFrame) MapScreenOptions(io.jmix.ui.screen.MapScreenOptions) ScreenOptions(io.jmix.ui.screen.ScreenOptions) MapScreenOptions(io.jmix.ui.screen.MapScreenOptions) WindowInfo(io.jmix.ui.WindowInfo)

Example 7 with ScreenOptions

use of io.jmix.ui.screen.ScreenOptions in project jmix by jmix-framework.

the class ActionScreenInitializer method initBuilder.

public RelatedEntitiesBuilder initBuilder(RelatedEntitiesBuilder builder) {
    if (screenClass != null) {
        builder = builder.withScreenClass(screenClass);
    }
    if (screenId != null) {
        builder = builder.withScreenId(screenId);
    }
    if (screenOptionsSupplier != null) {
        ScreenOptions screenOptions = screenOptionsSupplier.get();
        builder = builder.withOptions(screenOptions);
    }
    if (openMode != null) {
        builder = builder.withOpenMode(openMode);
    }
    return builder;
}
Also used : ScreenOptions(io.jmix.ui.screen.ScreenOptions)

Aggregations

ScreenOptions (io.jmix.ui.screen.ScreenOptions)7 UiMonitoring.createScreenTimer (io.jmix.ui.monitoring.UiMonitoring.createScreenTimer)2 FragmentLoaderInjectTask (io.jmix.ui.sys.FragmentHelper.FragmentLoaderInjectTask)2 Timer (io.micrometer.core.instrument.Timer)2 LegacyFrame (com.haulmont.cuba.gui.screen.compatibility.LegacyFrame)1 GuiDevelopmentException (io.jmix.ui.GuiDevelopmentException)1 WindowInfo (io.jmix.ui.WindowInfo)1 Fragment (io.jmix.ui.component.Fragment)1 MapScreenOptions (io.jmix.ui.screen.MapScreenOptions)1 ScreenFragment (io.jmix.ui.screen.ScreenFragment)1 FragmentHelper (io.jmix.ui.sys.FragmentHelper)1 FragmentLoaderInitTask (io.jmix.ui.sys.FragmentHelper.FragmentLoaderInitTask)1 HashMap (java.util.HashMap)1