我想显示类型可能是1或4或5的附件
${attachments} has got attachments with the attributes name, type
编辑:
<g:findAll in="${attachments}" expr="it.type==1 || it.type==4 || it.type==5">
<p>File: ${it.name}, ${it.type}</p>
</g:findAll>
我正在尝试上面的方法,它没有用,怎么做。
答案 0 :(得分:0)
<g:each in="${attachments.findAll{[1,4,5].contains(it.type)}}">
<p>File: ${it.name}, ${it.type}</p>
</g:each>