@@ -497,6 +497,13 @@ public class ModelFormHelper { | |||||
} else { | } else { | ||||
field.put("maxlength", 0); | field.put("maxlength", 0); | ||||
} | } | ||||
Map lookup = (Map)field.get("lookup"); | |||||
if (lookup!=null){ | |||||
long widgetId = MapUtil.readLong(lookup, "widgetId",-1L); | |||||
if(widgetId>0){ | |||||
setWidget.add(widgetId); | |||||
} | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -520,7 +527,7 @@ public class ModelFormHelper { | |||||
col.put("editor", dtb != null ? dtb.editor: SwEnum.EditorType.INPUT.value); | col.put("editor", dtb != null ? dtb.editor: SwEnum.EditorType.INPUT.value); | ||||
if (field.getLink() == 0L) return; | if (field.getLink() == 0L) return; | ||||
Set<ModelForm> set = ModelFormCache.getInstance().getListByTable(field.getLink(), SwEnum.FormType.WIDGET.value); | Set<ModelForm> set = ModelFormCache.getInstance().getListByTable(field.getLink(), SwEnum.FormType.WIDGET.value); | ||||
if (set == null || set.isEmpty()) return; | if (set == null || set.isEmpty()) return; | ||||
ModelForm form = set.iterator().next(); | ModelForm form = set.iterator().next(); | ||||
@@ -18,10 +18,9 @@ | |||||
<#list fields as filter> | <#list fields as filter> | ||||
{ | { | ||||
"id": "id${newId()}", | "id": "id${newId()}", | ||||
"type": "fx-${filter.editor}", | |||||
"type": "${filter.editor}", | |||||
"props": { | "props": { | ||||
"label": "${filter.label}", | "label": "${filter.label}", | ||||
"type": "text", | |||||
<#if filter.maxlength gt 0> | <#if filter.maxlength gt 0> | ||||
"maxlength": ${filter.maxlength}, | "maxlength": ${filter.maxlength}, | ||||
</#if> | </#if> | ||||
@@ -31,6 +30,13 @@ | |||||
"affixError": false, | "affixError": false, | ||||
"dataset": "${filter.dataset}", | "dataset": "${filter.dataset}", | ||||
"field": "${filter.id}", | "field": "${filter.id}", | ||||
<#if filter.lookup??> | |||||
"lookup": { | |||||
<#list filter.lookup as k, v> | |||||
"${k}": "${v}" <#if k_has_next>,</#if> | |||||
</#list> | |||||
}, | |||||
</#if> | |||||
"name": "${filter.name}" | "name": "${filter.name}" | ||||
}, | }, | ||||
"events": {} | "events": {} | ||||
@@ -39,10 +39,9 @@ | |||||
<#list fields as filter > | <#list fields as filter > | ||||
{ | { | ||||
"id": "id${newId()}", | "id": "id${newId()}", | ||||
"type": "fx-${filter.editor}", | |||||
"type": "${filter.editor}", | |||||
"props": { | "props": { | ||||
"label": "${filter.label}", | "label": "${filter.label}", | ||||
"type": "text", | |||||
<#if filter.maxlength gt 0 > | <#if filter.maxlength gt 0 > | ||||
"maxlength": ${filter.maxlength}, | "maxlength": ${filter.maxlength}, | ||||
</#if> | </#if> | ||||
@@ -50,6 +49,13 @@ | |||||
"labelWidth": 100, | "labelWidth": 100, | ||||
"dataset": "${filter.dataset}", | "dataset": "${filter.dataset}", | ||||
"field": "${filter.id}", | "field": "${filter.id}", | ||||
<#if filter.lookup??> | |||||
"lookup": { | |||||
<#list filter.lookup as k, v> | |||||
"${k}": "${v}" <#if k_has_next>,</#if> | |||||
</#list> | |||||
}, | |||||
</#if> | |||||
"name": "${filter.name}" | "name": "${filter.name}" | ||||
}, | }, | ||||
"events": {} | "events": {} | ||||
@@ -156,15 +156,22 @@ | |||||
"id": "id${newId()}", | "id": "id${newId()}", | ||||
<#if (dfield.readonly = true)> | <#if (dfield.readonly = true)> | ||||
"type": "fx-text", | "type": "fx-text", | ||||
"disabled": true, | |||||
<#else> | <#else> | ||||
"type": "fx-${dfield.editor}", | |||||
"type": "${dfield.editor}", | |||||
</#if> | </#if> | ||||
"props": { | "props": { | ||||
"label": "${dfield.label}", | "label": "${dfield.label}", | ||||
"type": "text", | |||||
"dataset": "${dfield.dataset}", | "dataset": "${dfield.dataset}", | ||||
"field": "${dfield.id}", | "field": "${dfield.id}", | ||||
"required": "${field.required}", | |||||
"required": "${dfield.required}", | |||||
<#if dfield.lookup??> | |||||
"lookup": { | |||||
<#list dfield.lookup as k, v> | |||||
"${k}": "${v}" <#if k_has_next>,</#if> | |||||
</#list> | |||||
}, | |||||
</#if> | |||||
<#if dfield.maxlength gt 0> | <#if dfield.maxlength gt 0> | ||||
"maxlength": ${dfield.maxlength}, | "maxlength": ${dfield.maxlength}, | ||||
</#if> | </#if> | ||||