我已经创建了一个包含primefaces的页面,其中使用了Lightbox组件。
当我使用servlet调用动态创建tumbnails时,我会在动态事件中使用它。
第一个页面显示得很好,并且lightbox的工作情况和预期一样,但是当我为下一个页面加载一组新的图片时,这些图片会显示出来,但是当你点击它时,它只是在一个新页面中显示原始图片,当我返回到上一个按钮并点击一个缩略图时,它就会像预期的那样工作。
这是jsf代码:
<h:outputLabel id="curpage" value="#{pictureBean.currentPage}" />
<h:commandButton value="next" action="#{pictureBean.nextPage}" id="next">
<f:ajax render="lightBox curpage" />
</h:commandButton>
<br/>
<p:lightBox height="500px" id="lightBox">
<ui:repeat value="#{pictureBean.pictures}" var="pic">
<h:outputLink value="#{pic.url}" title="#{pic.description}">
<h:graphicImage value="#{pic.urlThumb}" style="width:100px;height:75px;"/>
</h:outputLink>
</ui:repeat>
</p:lightBox>发布于 2010-10-05 04:13:10
我自己修复的:-)我忘了在表单标签之间添加标签。
https://stackoverflow.com/questions/3825588
复制相似问题