Bläddra i källkod

页面设计

master
郑根木 2 år sedan
förälder
incheckning
8e1cf9b781
2 ändrade filer med 8 tillägg och 4 borttagningar
  1. +6
    -2
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java
  2. +2
    -2
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java

+ 6
- 2
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java Visa fil

@@ -107,7 +107,8 @@ public class ModelFormHelper {
field.remove("required");
}

if (MapUtil.readInt(field, "maxlength") == SwEnum.DataType.instance.getByValue(pdf.dataType).dataLength) {
final SwEnum.DataTypeBean dtb = SwEnum.DataType.instance.getByValue(pdf.dataType);
if (dtb != null && MapUtil.readInt(field, "maxlength") == dtb.dataLength) {
field.remove("maxlength");
}
}
@@ -206,7 +207,10 @@ public class ModelFormHelper {
}

if (!field.containsKey("maxlength")) {
field.put("maxlength", SwEnum.DataType.instance.getByValue(pdf.dataType).dataLength);
final SwEnum.DataTypeBean dtb = SwEnum.DataType.instance.getByValue(pdf.dataType);
if (dtb != null) {
field.put("maxlength", dtb.dataLength);
}
}
if (!isField) {
PageDatasetFilter filter = (PageDatasetFilter)pdf;


+ 2
- 2
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageSaveHandler.java Visa fil

@@ -87,7 +87,8 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
if (dsData == null) continue;

//读取待保存的bean
DefaultEntity bean = readBeanFromPage(pageDataSet, dsData);
DefaultEntity bean = readBeanFromPage(pageDataSet, dsData.readMap("form"));
map.put(pageDataSet.name, bean);
SwMap dsFilter = filter.readMap(pageDataSet.name);
if (dsFilter != null && bean.isNew()) {//有过滤条件,将关联的值设上
setLinkValue(pageDataSet, bean, f -> {
@@ -151,7 +152,6 @@ public class DynPageSaveHandler extends AbstractDynPageHandler {
}
}
//暂时不考虑list保存的情况
data = data.readMap("form");
bean.getData().putAll(data);
return bean;
}


Laddar…
Avbryt
Spara