我想知道如何做一个ui:重复多个页面,我点击上一个/下一个按钮来查看下一组数据。JSF ui:重复分页
目前我有一个UI:重复
<ui:repeat id="repeat5" value="#{getData.data}" var="lst2" varStatus="loop">
我可以查看在一个行/列的内容(基本上图像),但所有的数据被显示在同一屏幕上,但我想只显示5行和4列,然后使用上一个/下一个按钮查看5行/ 4列布局中的其余图像。
目前我只能指定像下面的列配置,我如何得到指定的行。
<h:panelGrid id="panelGrid3" columns="4" cellspacing="2" cellpadding="2">
更新1(代码拉斯穆斯弗兰卡)
PLS发现代码被你的要求。
<h:form id="mainForm">
<p:tabView id="tabView" >
<p:tab title="Image Viewer" id="Viewer" titleStyle="height:30px">
<p:layout>
<p:layoutUnit id="layoutEast" position="east" size="350" style="height:200px">
<p:commandButton type="button" onclick=""
icon="ui-icon-circle-triangle-w"/>
<p:commandButton type="button" onclick="switchPage(1,29);"
icon="ui-icon-circle-triangle-e"/>
<h:panelGrid id="panelGrid3" columns="5" cellspacing="2" cellpadding="2">
<ui:repeat id="repeat5" value="#{getData.data}" var="imagesLst2" varStatus="loop">
<h:panelGroup>
<p:commandLink id="cl3" action="#{getData.imageID(imagesLst2.imageID)}" update=":mainForm:tabView:example">
<p:graphicImage id="gi3" value="#{imagesStreamer.image}" styleClass="bord"
onmousedown="mouseDown(this)" alt="image not available3" width="60" height="60"
style="#{loop.index > 29 ? 'visibility: hidden;' : ''}">
<f:param name="id5" value="#{imagesLst2.imageID}" />
</p:graphicImage>
</p:commandLink>
</h:panelGroup>
</ui:repeat>
</h:panelGrid>
</p:layoutUnit>
</p:layout>
</p:tab>
</p:tabView>
你的命令链接里面的UI重复工作好吗?我在这方面遇到问题,我不知道是否是jsf限制。 –
它完美地工作 – user1433804
请求范围?您每次创建managedBean时都加载您的列表?谢谢 –