diff --git a/smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java b/smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java index c220623..456a271 100644 --- a/smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java +++ b/smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java @@ -268,8 +268,14 @@ public class ModelFormHelper { SwMap widget = new SwMap(); 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); if (widgetForm == null) throw new SwException("没有找到指定的控件定义!id=" + id); SwMap w = new SwMap(); @@ -282,7 +288,7 @@ public class ModelFormHelper { //构建变量 SwMap mapVar = new SwMap(); map.put("var", mapVar); - String[] vars = (String[]) option.get("vars"); + List vars = (List) option.get("vars"); for (String var : vars) { mapVar.put(var, SwVariableFactory.getInstance().calcVar(var, params, us)); }