0

I want to display the attachments whose type may be 1 or 4 or 5

${attachments} has got attachments with the attributes name, type

EDIT:

<g:findAll in="${attachments}" expr="it.type==1 || it.type==4 ||  it.type==5">
       <p>File: ${it.name}, ${it.type}</p>
    </g:findAll>

I was trying the above method, it didn't work, How to do this.

n92
  • 7,424
  • 27
  • 93
  • 129

1 Answers1

0
<g:each in="${attachments.findAll{[1,4,5].contains(it.type)}}">
    <p>File: ${it.name}, ${it.type}</p>
</g:each>
James Kleeh
  • 12,094
  • 5
  • 34
  • 61