ww:iterator和<ww:if>

来源:互联网 发布:免费erp软件下载 编辑:程序博客网 时间:2024/04/29 08:11

迭代List<string>

其中courseName为List<String>类型,加id在test中用#cname输出List中的元素

<ww:iterator value="courseNames" id="cname">

<ww:if test="#cname==courseTopic.courseName">
<option selected="selected">
${cname}
</option>
</ww:if>
<ww:else>
<option>
${cname}
</option>
</ww:else>
</ww:iterator>

原创粉丝点击