java的俩个list<map<string,object>>嵌套在freemarker 怎么遍历
List<Map<String,Object>>firstArrResult=newArrayList<>();List<Map<String,Object>>first...
List<Map<String, Object>> firstArrResult = new ArrayList<>();
List<Map<String, Object>> firstAbout = new ArrayList<>();
Map<String, Object> map = new HashMap<String, Object>();
Map<String, Object> map1 = new HashMap<String, Object>();
map.put("AC_CA_NAME", AC_CA_NAME);
map1.put("title", title);
firstAbout.add(map1);
firstArrResult.add(map);
firstArrResult.get(i).put("firstAbout", firstAbout);
这种嵌套该怎么遍历
<#list firstArrResult as fa>
${f.AC_CA_NAME}
</#list fa.firstAbout as fab>
${title}
</#list>
</#list>直接报错了freemarker.core.ParseException: Syntax error in template "qnysyModel.ftl" in line 6705, column 58:
#list is an existing directive, but the tag is malformed. (See FreeMarker Manual / Directive Reference.)
</#list fa.firstAbout as fab> reemarker.core.ParseException: Syntax error in template "qnysyModel.ftl" in line 6705, column 58: 展开
List<Map<String, Object>> firstAbout = new ArrayList<>();
Map<String, Object> map = new HashMap<String, Object>();
Map<String, Object> map1 = new HashMap<String, Object>();
map.put("AC_CA_NAME", AC_CA_NAME);
map1.put("title", title);
firstAbout.add(map1);
firstArrResult.add(map);
firstArrResult.get(i).put("firstAbout", firstAbout);
这种嵌套该怎么遍历
<#list firstArrResult as fa>
${f.AC_CA_NAME}
</#list fa.firstAbout as fab>
${title}
</#list>
</#list>直接报错了freemarker.core.ParseException: Syntax error in template "qnysyModel.ftl" in line 6705, column 58:
#list is an existing directive, but the tag is malformed. (See FreeMarker Manual / Directive Reference.)
</#list fa.firstAbout as fab> reemarker.core.ParseException: Syntax error in template "qnysyModel.ftl" in line 6705, column 58: 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询