0

I'm trying with each iteration of the loop to get the data to display.

xhtml

...
<ui:repeat var="cat" value="${animalBean.listCat}">
    <p:graphicImage value="#{animalBean.getImage(cat)}"/>                                               
</ui:repeat>
...

AnimalBean

...
private List<Cat> listCat;
private StreamedContent image;
// getters + setters

public StreamedContent getImage(Cat c) {
    // Here c is null
    return new DefaultStreamedContent(new ByteArrayInputStream(c.getPhoto1()));
}
...

Is it possible to somehow pass a parameter to the method so that at each iteration to perform a method which obtains the data?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user3128303
  • 747
  • 1
  • 11
  • 26
  • I checked that topic. Unfortunately, it did not help in my case... – user3128303 Apr 11 '16 at 19:06
  • If it doesn't work then you did something wrong. Try once again based on kickoff example given in the answer while putting aside your current code. – BalusC Apr 11 '16 at 19:22

0 Answers0