java - How to make an image slideshow with JSF? -


is possible? if answer no, other ideas?

the list of pictures dynamic, depends on user you're viewing. how can make slideshow images user uploaded?

now it's working way: single picture displayed , need close open next one.

<rich:datagrid  id="albumgrid" value="#{somebean.pictures}" var="item" columns="4" elements="4" width="450px" rendered="#{not empty somebean.pictures}" style="margin-left:20px;">                  <a4j:commandlink id="fulllinkprofile">                     <a4j:actionparam name="pic" value="#{item.path}" assignto="#{picsbean.path}" />                     <h:graphicimage value="/home/pictures/user/#{item.path}" rendered="#{item.path != null}"/>                 </a4j:commandlink>                 <f:facet name="footer">                     <rich:datascroller for="albumgrid" boundarycontrols="hide" stepcontrols="show"  fastcontrols="hide" >                                            </rich:datascroller>                 </f:facet>                </rich:datagrid> 

use javascript slideshow function , pass bean value argument has comma(,) seperated values of image paths.

using jquery give best effects.

also check this.

use following function create html code passing bean value , integrate of jquery plugin.

function loadimage(imgpaths) {     var images = imgpaths;     var imgarr=images.split(",");     var ulobj=document.getelementbyid("parentdiv");     var i;     var len =imagepath_array.length-1;     for(i=0;i<len;i++)     {         var imgobj=document.createelement("img");         var liobj=document.createelement("li");         imgobj.src=imgarr[i];         liobj.appendchild(imgobj);         ulobj.appendchild(liobj);     } } 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -