Primefaces lightBox问题

时间:2010-09-29 20:29:25

标签: jsf jsf-2 lightbox primefaces

我创建了一个带有primefaces的页面,我使用Lightbox组件。

我在动态问题中使用它,因为我使用servlet调用动态创建tumbnails。

第一页显示不错,灯箱按预期工作,但当我为下一页加载一组新图片时,会显示图片,但是当您点击它时,它只会在新页面中显示原始图片,当我然后使用上一个按钮返回并单击缩略图时,它按预期工作。

这是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>

1 个答案:

答案 0 :(得分:1)

我自己修理了:-)我忘了在表单标签之间添加标签。

相关问题