use of com.haulmont.cuba.settings.component.CubaTableSettings in project jmix by jmix-framework.
the class CubaTableSettingsBinder method getSettings.
@Override
public TableSettings getSettings(Table table) {
CubaTableSettings settings = (CubaTableSettings) super.getSettings(table);
Object presentationId = table.getDefaultPresentationId();
if (presentationId != null) {
settings.setPresentationId(UuidProvider.fromString(String.valueOf(presentationId)));
}
return settings;
}
use of com.haulmont.cuba.settings.component.CubaTableSettings in project jmix by jmix-framework.
the class CubaTableSettingsBinder method saveSettings.
@Override
public boolean saveSettings(Table table, SettingsWrapper wrapper) {
boolean settingsChanged = super.saveSettings(table, wrapper);
if (settingsChanged) {
return true;
}
CubaTableSettings tableSettings = wrapper.getSettings();
if (!Objects.equals(tableSettings.getPresentationId(), table.getDefaultPresentationId())) {
tableSettings.setPresentationId((UUID) table.getDefaultPresentationId());
settingsChanged = true;
}
return settingsChanged;
}
Aggregations