zzwinne
2012-11-13 13:57
浏览 254
已采纳

freemarker的语法问题

<#list ldMeanPublicEleList as ldMeanPublicEleList>
...
${ldMeanPublicEleList.name}/w:t
...
<#list ${ldMeanPublicEleList.cvList} as columnValue>
...
${columnValue.title}/w:t
...
</#list>

</#list>

这种写法对么?允许 <#list ${ldMeanPublicEleList.cvList} as columnValue>这种写法么?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • blogzhoubo 2012-11-13 16:56
    已采纳

    <#list ${ldMeanPublicEleList.cvList} as columnValue>这种写法没有问题。只是:

    <#list ldMeanPublicEleList as ldMeanPublicEleList> 中,as前后都是ldMeanPublicEleList,这肯定不行。

    改成下面这样试一试:
    [code="html"]<#list ldMeanPublicEleList as ldMeanPublicEle>
    ...
    ${ldMeanPublicEle.name}/w:t
    ...
    <#list ${ldMeanPublicEle.cvList} as columnValue>
    ...
    ${columnValue.title}/w:t
    ...
    </#list>

    </#list> [/code]

    点赞 评论

相关推荐 更多相似问题