Unable to Display Image in p:graphicImage

前端 未结 1 1133
一个人的身影
一个人的身影 2021-01-16 01:13

I have the following code, i can see images in the ui:repeat part but when i click on the image the command link and setPropertyActionListener works fine but the image does

相关标签:
1条回答
  • 2021-01-16 01:37

    Replace

    <p:graphicImage id="prodImage" value="#{imageController.image}" alt="unable to load image #{imageController.imageID}" />
    

    by

    <p:graphicImage id="prodImage" value="#{imagesStreamer.image}" alt="unable to load image #{imageController.imageID}">
        <f:param name="id" value="#{imageController.imageID}" />
    </p:graphicImage>
    

    and remove that ImageController#getImage() method. Keep using the ImageStreamer for all dynamic images (assuming that you used the one as provided in one of your previous questions).

    0 讨论(0)
提交回复
热议问题