Browse Source

master
郑根木 2 years ago
parent
commit
188a08591b
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java

+ 9
- 3
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java View File

@@ -268,8 +268,14 @@ public class ModelFormHelper {
SwMap widget = new SwMap(); SwMap widget = new SwMap();
map.put("widget", widget); map.put("widget", widget);


long[] widgetIds = (long[]) option.get("widgetRef");
for (long id : widgetIds) {
List widgetIds = (List) option.get("widgetRef");
for (Object v : widgetIds) {
long id;
if (v instanceof Integer) {
id = (Integer)v;
} else if (v instanceof Long) {
id = (Long)v;
} else throw new SwException("不能识别的控件Id:" + v);
ModelForm widgetForm = getFromCache(id); ModelForm widgetForm = getFromCache(id);
if (widgetForm == null) throw new SwException("没有找到指定的控件定义!id=" + id); if (widgetForm == null) throw new SwException("没有找到指定的控件定义!id=" + id);
SwMap w = new SwMap(); SwMap w = new SwMap();
@@ -282,7 +288,7 @@ public class ModelFormHelper {
//构建变量 //构建变量
SwMap mapVar = new SwMap(); SwMap mapVar = new SwMap();
map.put("var", mapVar); map.put("var", mapVar);
String[] vars = (String[]) option.get("vars");
List<String> vars = (List<String>) option.get("vars");
for (String var : vars) { for (String var : vars) {
mapVar.put(var, SwVariableFactory.getInstance().calcVar(var, params, us)); mapVar.put(var, SwVariableFactory.getInstance().calcVar(var, params, us));
} }


Loading…
Cancel
Save