Failed to parse the expression [#{myGalleryBean.photos.stream.filter((i)->i.selected eq true).toList()}]
<p>I am trying to do a for loop over a list and show the images that are selected only. </p>

<p>I am using this code in my index.xhtml:</p>

<p><img src="https://i.stack.imgur.com/27FIh.png" alt="My code"></p>

<p>But I keep getting the following error:</p>

<blockquote>
  <p>/index.xhtml @87,73 value="#{myGalleryBean.photos.stream.filter((i)->i.selected eq true).toList()}" Failed to parse the expression [#{myGalleryBean.photos.stream.filter((i)->i.selected eq true).toList()}]</p>
</blockquote>

<p>I have this code working on Java EE 7, but after changing to Java EE 6 I got that error.</p>

<p>Any help on how to do this in Java EE 6 would be really appreciated.</p>