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);
}
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);
}
}
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);
}
Aggregations