Jsf 在p:galeria中错误重复的图像
我在使用primefaces image galleria时遇到麻烦。Jsf 在p:galeria中错误重复的图像,jsf,primefaces,image-gallery,Jsf,Primefaces,Image Gallery,我在使用primefaces image galleria时遇到麻烦。 有时电影带会多次播放,有时则不会 图像由Servlet类动态获取。 我已经调试了代码,图像列表是正确的,没有重复这些项目。 如何防止图像重复 galleria.xhtml <p:galleria id="myGalleria" value="#{myBean.imageList}" var="item" effect="fade" autoPlay
有时电影带会多次播放,有时则不会
图像由Servlet类动态获取。
我已经调试了代码,图像列表是正确的,没有重复这些项目。 如何防止图像重复 galleria.xhtml
<p:galleria id="myGalleria"
value="#{myBean.imageList}"
var="item"
effect="fade"
autoPlay="false"
panelWidth="540"
showCaption="true"
widgetVar="myGalleria">
<p:graphicImage width="520"
id="img"
title="#{item.description}"
value="/imageServlet/show?id=#{item.id}"
cache="false" />
</p:galleria>
MyImage类
public class MyImage {
private String id;
private String description;
}
MyBean类
public class MyBean {
List<MyImage> imageList = myService.getImageList();
}
公共类MyBean{
List imageList=myService.getImageList();
}
这可能是的副本,请参见我的解决方法:
您忘记了一些代码:这里MyBean.imageList始终是一个空列表。@StephaneM我通过更改负责获取图像列表的代码部分来编辑我的问题。图像列表已正确加载。我改进了你的平铺。请查看差异并阅读“好/坏”标题您的PrimeFaces版本是什么?@Kukeltje PrimeFaces 6.2此更改最小化了问题,但没有解决问题。非常感谢。
public class MyBean {
List<MyImage> imageList = myService.getImageList();
}