Search in sources :

Example 1 with ConfigurationClientImpl

use of com.haulmont.cuba.client.sys.ConfigurationClientImpl in project cuba by cuba-platform.

the class AppPropertiesEdit method ok.

public void ok() {
    AppPropertyEntity appPropertyEntity = appPropertyDs.getItem();
    // Save property through the client-side cache to ensure it is updated in the cache immediately
    Configuration configuration = AppBeans.get(Configuration.class);
    ConfigStorageService configStorageService = ((ConfigurationClientImpl) configuration).getConfigStorageService();
    configStorageService.setDbProperty(appPropertyEntity.getName(), appPropertyEntity.getCurrentValue());
    close(COMMIT_ACTION_ID);
}
Also used : AppPropertyEntity(com.haulmont.cuba.core.config.AppPropertyEntity) Configuration(com.haulmont.cuba.core.global.Configuration) ConfigurationClientImpl(com.haulmont.cuba.client.sys.ConfigurationClientImpl) ConfigStorageService(com.haulmont.cuba.core.app.ConfigStorageService)

Aggregations

ConfigurationClientImpl (com.haulmont.cuba.client.sys.ConfigurationClientImpl)1 ConfigStorageService (com.haulmont.cuba.core.app.ConfigStorageService)1 AppPropertyEntity (com.haulmont.cuba.core.config.AppPropertyEntity)1 Configuration (com.haulmont.cuba.core.global.Configuration)1