How do I make my image appear inside the ui: repeat tag?

2

I have a question. I'm using JSF and PrimeFaces to make a website for ebooks and I need to display the ebooks that are stored in the database. I can register the ebook normally, but at the time of displaying, the cover image of the ebook does not appear. I made the same example using a simple HTML document and the image appeared, but in the following code it does not appear:

<ui:repeat var="livro" value="#{livroBean.listaCompleta}">
        <p:fieldset legend="#{livro.titulo}" style="margin-bottom:20px">
            <h:panelGrid columns="2" cellpadding="5">
                <h:graphicImage value="#{livro.urlCapa}"/>
                <h:outputText value="#{livro.sinopse}"/>
            </h:panelGrid>
        </p:fieldset>
</ui:repeat>
    
asked by anonymous 19.08.2016 / 02:23

1 answer

0

Try

<ui:repeat value="#{livroBean.listaCompleta}" var="livro">
    <p:fieldset legend="#{livro.titulo}" style="margin-bottom:20px">
            <h:panelGrid columns="2" cellpadding="5">
                <h:graphicImage value="#{livro.urlCapa}">
                <h:outputText value="#{livro.sinopse}" />
                </h:outputText>
                </h:graphicImage>
            </h:panelGrid>
   </p:fieldset>
</ui:repeat>
    
19.08.2016 / 02:52