开发者

Primefaces lightBox problem

I have created a page with primefaces where I use the Lightbox component.

I use it in a dynamic mat开发者_如何转开发ter as I create tumbnails on the fly with a servlet call.

The first page shows up nice and the lightbox works as expected but when I load a new set of pictures for the next page the pictures are shown but when you click on it, it just shows the original picture in a new page, when I then return with the previous button and click on a a thumbnail it works as expected.

This is the jsf code:

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


I fixed it myself :-) I was forgotten to add the tags between form tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜