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

Asked

Viewed 72 times

2

I have a question. I am using JSF and Primefaces to make a website for ebooks and need to display the ebooks that are stored in the database. I can register the ebook normally, but when it comes to displaying, the ebook cover image does not appear. I did the same example using a simple HTML document and the image appeared, only the following code 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>

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>
  • I tested and it didn’t work = but thanks for the help anyway.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.