java如何使用JSF制作图像幻灯片?
可能吗?如果答案是否定的,还有其他想法吗
图片列表是动态的,这取决于您正在查看的用户。 如何使用用户上传的图像制作幻灯片
现在它是这样工作的: 将显示一张图片,您需要将其关闭以打开下一张图片
<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>
# 1 楼答案
使用任何javascript slideshow函数,并将bean value参数传递给它,该参数具有图像路径的逗号(,)分隔值
使用jQuery会给你最好的效果
同时检查this
使用以下函数创建传递bean值的html代码,然后与任何jQuery插件集成