How can I reload the images in an imageSwitch

UI Components for JSF
Post Reply
Thomas.Bender
Posts: 1
Joined: 12 Jun 2014, 20:22

29 May 2016, 20:11

Hi all,

I want to present a number of pictures in an imageSwitch. The Images are loaded out of the database. It is possible to add or delete images in an dedicated administration tool.

This is the part of code I use to create the imageSwitcher inside the index.xhtml:

Code: Select all

<p:imageSwitch id="imageSwitch" effect="fade">
             <ui:repeat value="#{pictureOverViewBean.pictureList}" var="image">
                 <p:graphicImage value="#{imageBean.image}" title="#{image.title}">
                       <f:param name="uuid" value="#{image.uuid}" />
                  </p:graphicImage>
             </ui:repeat>
</p:imageSwitch>
Initially after loading the page all images loaded and presented in the imageSwitcher. If an image is added or removed in the administration tool an the imageSwitcher is not reloaded new images are not presented and deleted images are not removed out of the imageSwitcher.
And now the question:

Is it somehow e.g. by using ajax possible to reload the images from the database in the imageSwitcher without reloading the complete website? I tried to do an update on the ID imageSwitch with a commandButton but without success. What can I do to solve that problem?

Thx

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 40 guests