0

タイプが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>

私は上記の方法を試していましたが、うまくいきませんでした。これを行う方法。

4

1 に答える 1

0
<g:each in="${attachments.findAll{[1,4,5].contains(it.type)}}">
    <p>File: ${it.name}, ${it.type}</p>
</g:each>
于 2012-10-16T12:16:25.073 に答える