Search in sources :

Example 1 with ScreenSettings

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

the class AbstractWindow method applyDataLoadingSettings.

@Override
public void applyDataLoadingSettings(Settings settings) {
    this.settings = settings;
    ScreenSettings screenSettings = (ScreenSettings) getApplicationContext().getBean(ScreenSettings.NAME);
    screenSettings.applyDataLoadingSettings(this, settings);
}
Also used : ScreenSettings(com.haulmont.cuba.gui.screen.ScreenSettings)

Example 2 with ScreenSettings

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

the class AbstractWindow method saveSettings.

/**
 * This method is called when the screen is closed to save the screen settings to the database.
 */
@Override
public void saveSettings() {
    if (settings != null) {
        ScreenSettings screenSettings = (ScreenSettings) getApplicationContext().getBean(ScreenSettings.NAME);
        screenSettings.saveSettings(this, settings);
    }
}
Also used : ScreenSettings(com.haulmont.cuba.gui.screen.ScreenSettings)

Example 3 with ScreenSettings

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

the class AbstractWindow method applySettings.

/**
 * This method is called when the screen is opened to restore settings saved in the database for the current user.
 * <p>You can override it to restore custom settings.
 * <p>For example:
 * <pre>
 * public void applySettings(Settings settings) {
 *     super.applySettings(settings);
 *     String visible = settings.get(hintBox.getId()).attributeValue("visible");
 *     if (visible != null)
 *         hintBox.setVisible(Boolean.valueOf(visible));
 * }
 * </pre>
 *
 * @param settings settings object loaded from the database for the current user
 */
@Override
public void applySettings(Settings settings) {
    this.settings = settings;
    ScreenSettings screenSettings = (ScreenSettings) getApplicationContext().getBean(ScreenSettings.NAME);
    screenSettings.applySettings(this, settings);
}
Also used : ScreenSettings(com.haulmont.cuba.gui.screen.ScreenSettings)

Aggregations

ScreenSettings (com.haulmont.cuba.gui.screen.ScreenSettings)3