郑根木 pirms 2 gadiem
vecāks
revīzija
188a08591b
1 mainītis faili ar 9 papildinājumiem un 3 dzēšanām
  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 Parādīt failu

@@ -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<String> vars = (List<String>) option.get("vars");
for (String var : vars) {
mapVar.put(var, SwVariableFactory.getInstance().calcVar(var, params, us));
}


Notiek ielāde…
Atcelt
Saglabāt