Search in sources :

Example 1 with CubaTableSettings

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;
}
Also used : CubaTableSettings(com.haulmont.cuba.settings.component.CubaTableSettings)

Example 2 with CubaTableSettings

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;
}
Also used : CubaTableSettings(com.haulmont.cuba.settings.component.CubaTableSettings)

Aggregations

CubaTableSettings (com.haulmont.cuba.settings.component.CubaTableSettings)2