mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 07:25:54 +08:00
Fix 3.4.5 (#672)
* fix clearFields * Update @rbv * fix: auto-fillin * v3.4.5
This commit is contained in:
parent
41d33a455f
commit
bc577795b8
2
@rbv
2
@rbv
|
@ -1 +1 @@
|
|||
Subproject commit 0ace77d3b95da6f61691bd2610230c4bd979011d
|
||||
Subproject commit e59cdd3de2cbf05f2991a18485eacdd99ac854e3
|
2
pom.xml
2
pom.xml
|
@ -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 -->
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public ConfigBean remove(String name) {
|
||||
Assert.notNull(name, "[name] cannot be null");
|
||||
data.remove(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -470,6 +470,8 @@ public class FieldWriteback extends FieldAggregation {
|
|||
targetRecord.setNull(targetField);
|
||||
}
|
||||
}
|
||||
} else if (clearFields) {
|
||||
targetRecord.setNull(targetField);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue