mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 20:28:00 +08:00
PL-7783 On "Application Properties" screen, changed value of property is reverted after clicking Refresh
This commit is contained in:
parent
bee3453163
commit
c69ad22e19
@ -59,7 +59,7 @@ public class ConfigurationClientImpl implements ClientConfiguration {
|
||||
return new ConfigPersisterClientImpl(getConfigStorageService(), caching);
|
||||
}
|
||||
|
||||
protected ConfigStorageService getConfigStorageService() {
|
||||
public ConfigStorageService getConfigStorageService() {
|
||||
return configStorageCache;
|
||||
}
|
||||
}
|
@ -20,8 +20,11 @@ package com.haulmont.cuba.gui.app.core.appproperties;
|
||||
import com.haulmont.chile.core.datatypes.Datatype;
|
||||
import com.haulmont.chile.core.datatypes.Datatypes;
|
||||
import com.haulmont.chile.core.datatypes.impl.BooleanDatatype;
|
||||
import com.haulmont.cuba.client.sys.ConfigurationClientImpl;
|
||||
import com.haulmont.cuba.core.app.ConfigStorageService;
|
||||
import com.haulmont.cuba.core.config.AppPropertyEntity;
|
||||
import com.haulmont.cuba.core.global.AppBeans;
|
||||
import com.haulmont.cuba.core.global.Configuration;
|
||||
import com.haulmont.cuba.core.global.Metadata;
|
||||
import com.haulmont.cuba.gui.WindowParam;
|
||||
import com.haulmont.cuba.gui.components.*;
|
||||
@ -44,9 +47,6 @@ public class AppPropertiesEdit extends AbstractWindow {
|
||||
@Inject
|
||||
private Datasource<AppPropertyEntity> appPropertyDs;
|
||||
|
||||
@Inject
|
||||
private ConfigStorageService configStorageService;
|
||||
|
||||
@Inject
|
||||
private Label cannotEditValueLabel;
|
||||
|
||||
@ -103,7 +103,12 @@ public class AppPropertiesEdit extends AbstractWindow {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user