Fix 3.4.5 (#672)

* fix clearFields

* Update @rbv

* fix: auto-fillin

* v3.4.5
This commit is contained in:
REBUILD 企业管理系统 2023-10-27 22:20:41 +08:00 committed by GitHub
parent 41d33a455f
commit bc577795b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 18 deletions

2
@rbv

@ -1 +1 @@
Subproject commit 0ace77d3b95da6f61691bd2610230c4bd979011d
Subproject commit e59cdd3de2cbf05f2991a18485eacdd99ac854e3

View file

@ -10,7 +10,7 @@
</parent>
<groupId>com.rebuild</groupId>
<artifactId>rebuild</artifactId>
<version>3.4.4</version>
<version>3.4.5</version>
<name>rebuild</name>
<description>Building your business-systems freely!</description>
<!-- UNCOMMENT USE TOMCAT -->

View file

@ -73,11 +73,11 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
/**
* Rebuild Version
*/
public static final String VER = "3.4.4";
public static final String VER = "3.4.5";
/**
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
*/
public static final int BUILD = 3040409;
public static final int BUILD = 3040510;
static {
// Driver for DB

View file

@ -33,16 +33,22 @@ public class ConfigBean implements Serializable, Cloneable, JSONable {
/**
* @param name
* @param value Remove if null
* @param value
* @return
*/
public ConfigBean set(String name, Object value) {
Assert.notNull(name, "[name] cannot be null");
if (value == null) {
data.remove(name);
} else {
data.put(name, value);
}
data.put(name, value);
return this;
}
/**
* @param name
* @return
*/
public ConfigBean remove(String name) {
Assert.notNull(name, "[name] cannot be null");
data.remove(name);
return this;
}

View file

@ -176,7 +176,7 @@ public class AutoFillinManager implements ConfigManager {
}
ConfigBean clone = e.clone().set("value", value);
clone.set("source", null);
clone.remove("source");
fillin.add(clone.toJSON());
}
return fillin;

View file

@ -215,7 +215,7 @@ public class DataListManager extends BaseLayoutManager {
JSONArray charts = (JSONArray) e.getJSON("config");
ChartManager.instance.richingCharts(charts, null);
return e.set("config", charts)
.set("shareTo", null);
.remove("shareTo");
}
/**

View file

@ -266,7 +266,7 @@ public class FormsBuilder extends FormsManager {
.getExtraAttr(EasyEntityConfigProps.DISABLED_VIEW_EDITABLE);
model.set("onViewEditable", !BooleanUtils.toBoolean(disabledViewEditable));
model.set("id", null); // Clean form's ID of config
model.remove("id"); // Clean form's ID of config
return model.toJSON();
}

View file

@ -36,8 +36,7 @@ public class FormsManager extends BaseLayoutManager {
.set("elements", JSONUtils.EMPTY_ARRAY);
} else {
entry.set("elements", entry.getJSON("config"))
.set("config", null)
.set("shareTo", null);
.remove("config").remove("shareTo");
}
return entry.set("entity", entity);
}

View file

@ -37,7 +37,7 @@ public class MultiSelectManager extends PickListManager {
public JSONArray getSelectList(Field field) {
ConfigBean[] entries = getPickListRaw(field, false);
for (ConfigBean e : entries) {
e.set("hide", null).set("id", null);
e.remove("hide").remove("id");
}
return JSONUtils.toJSONArray(entries);
}

View file

@ -39,8 +39,7 @@ public class PickListManager implements ConfigManager {
public JSONArray getPickList(Field field) {
ConfigBean[] entries = getPickListRaw(field, false);
for (ConfigBean e : entries) {
e.set("hide", null);
e.set("mask", null);
e.remove("hide").remove("mask");
}
return JSONUtils.toJSONArray(entries);
}

View file

@ -470,6 +470,8 @@ public class FieldWriteback extends FieldAggregation {
targetRecord.setNull(targetField);
}
}
} else if (clearFields) {
targetRecord.setNull(targetField);
}
}
}