Skip to content

Commit bc57779

Browse files
authored
Fix 3.4.5 (#672)
* fix clearFields * Update @rbv * fix: auto-fillin * v3.4.5
1 parent 41d33a4 commit bc57779

File tree

11 files changed

+24
-18
lines changed

11 files changed

+24
-18
lines changed

@rbv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 0ace77d3b95da6f61691bd2610230c4bd979011d
1+
Subproject commit e59cdd3de2cbf05f2991a18485eacdd99ac854e3

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<groupId>com.rebuild</groupId>
1212
<artifactId>rebuild</artifactId>
13-
<version>3.4.4</version>
13+
<version>3.4.5</version>
1414
<name>rebuild</name>
1515
<description>Building your business-systems freely!</description>
1616
<!-- UNCOMMENT USE TOMCAT -->

src/main/java/com/rebuild/core/Application.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
7373
/**
7474
* Rebuild Version
7575
*/
76-
public static final String VER = "3.4.4";
76+
public static final String VER = "3.4.5";
7777
/**
7878
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
7979
*/
80-
public static final int BUILD = 3040409;
80+
public static final int BUILD = 3040510;
8181

8282
static {
8383
// Driver for DB

src/main/java/com/rebuild/core/configuration/ConfigBean.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,22 @@ public ConfigBean() {
3333

3434
/**
3535
* @param name
36-
* @param value Remove if null
36+
* @param value
3737
* @return
3838
*/
3939
public ConfigBean set(String name, Object value) {
4040
Assert.notNull(name, "[name] cannot be null");
41-
if (value == null) {
42-
data.remove(name);
43-
} else {
44-
data.put(name, value);
45-
}
41+
data.put(name, value);
42+
return this;
43+
}
44+
45+
/**
46+
* @param name
47+
* @return
48+
*/
49+
public ConfigBean remove(String name) {
50+
Assert.notNull(name, "[name] cannot be null");
51+
data.remove(name);
4652
return this;
4753
}
4854

src/main/java/com/rebuild/core/configuration/general/AutoFillinManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public JSONArray getFillinValue(Field field, ID sourceId) {
176176
}
177177

178178
ConfigBean clone = e.clone().set("value", value);
179-
clone.set("source", null);
179+
clone.remove("source");
180180
fillin.add(clone.toJSON());
181181
}
182182
return fillin;

src/main/java/com/rebuild/core/configuration/general/DataListManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public ConfigBean getWidgetCharts(ID user, String entity) {
215215
JSONArray charts = (JSONArray) e.getJSON("config");
216216
ChartManager.instance.richingCharts(charts, null);
217217
return e.set("config", charts)
218-
.set("shareTo", null);
218+
.remove("shareTo");
219219
}
220220

221221
/**

src/main/java/com/rebuild/core/configuration/general/FormsBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ else if (viewMode) {
266266
.getExtraAttr(EasyEntityConfigProps.DISABLED_VIEW_EDITABLE);
267267
model.set("onViewEditable", !BooleanUtils.toBoolean(disabledViewEditable));
268268

269-
model.set("id", null); // Clean form's ID of config
269+
model.remove("id"); // Clean form's ID of config
270270
return model.toJSON();
271271
}
272272

src/main/java/com/rebuild/core/configuration/general/FormsManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public ConfigBean getFormLayout(String entity, ID user) {
3636
.set("elements", JSONUtils.EMPTY_ARRAY);
3737
} else {
3838
entry.set("elements", entry.getJSON("config"))
39-
.set("config", null)
40-
.set("shareTo", null);
39+
.remove("config").remove("shareTo");
4140
}
4241
return entry.set("entity", entity);
4342
}

src/main/java/com/rebuild/core/configuration/general/MultiSelectManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private MultiSelectManager() {
3737
public JSONArray getSelectList(Field field) {
3838
ConfigBean[] entries = getPickListRaw(field, false);
3939
for (ConfigBean e : entries) {
40-
e.set("hide", null).set("id", null);
40+
e.remove("hide").remove("id");
4141
}
4242
return JSONUtils.toJSONArray(entries);
4343
}

src/main/java/com/rebuild/core/configuration/general/PickListManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ protected PickListManager() { }
3939
public JSONArray getPickList(Field field) {
4040
ConfigBean[] entries = getPickListRaw(field, false);
4141
for (ConfigBean e : entries) {
42-
e.set("hide", null);
43-
e.set("mask", null);
42+
e.remove("hide").remove("mask");
4443
}
4544
return JSONUtils.toJSONArray(entries);
4645
}

0 commit comments

Comments
 (0)