Update Primefaces ContentFlow after loaded with lot of images

455 Views Asked by At

I have a contentFlow that is updated after change a selectOneMenu

< p:selectOneMenu value="#{movil.marca}">
    < p:ajax event="change" listener="#{dropdownView.onMarcaChange()}" update="contentFlow"/>
    < f:selectItem itemLabel="#{msgs['selectmarca']}" itemValue="" noSelectionOption="true" />
    < f:selectItems value="#{dropdownView.marcas}" />
< /p:selectOneMenu>


< p:contentFlow id="contentFlow" value="#{dropdownView.movilescontentflow}" var="movil">
    < p:graphicImage url="#{movil.foto}" styleClass="content" onclick="clickFlow(this, event)"/>
< /p:contentFlow>

The problem is that when the contentFlow is updated it has to load a lot of image and the element is rendered before all the images are downloaded.

If I use a galleria instead a contentFow it works OK, yo can see how the images are loaded into the galleria as they are downloaded.

If I refreshed the page (f5) the contentFlow is rendered once all the images are downloadeed and it is rendered OK.

Any ideas?

0

There are 0 best solutions below