JSF2 - ui:repeat,第一个命令链接不起作用,但其他链接起作用
我有一个 ui:repeat 循环来执行一些分页:
<h:panelGroup layout="block" style="height: 25px;text-align: right" id="Prod-printed-paging">
<ui:repeat value="#{upBean.pagesProdPrinted}"
id="Prod-printed-page-loop"
var="cppage" varStatus="cpstatus" >
<h:panelGroup rendered="#{cpstatus.first and not (upBean.pageProdPrinted == '1')}">
<h:commandLink id="previous" style="color: #390">#{appMsg.previous}
<f:ajax listener="#{upBean.previousPageProdPrinted}"
event="click"
render=":form-myProd:get-printed-Prod :form-myProd:Prod-printed-paging"/>
</h:commandLink> |
</h:panelGroup>
<h:panelGroup rendered="#{upBean.pageProdPrinted eq cppage}">
<h:panelGroup style="font-weight: bold">#{cppage}</h:panelGroup>
</h:panelGroup>
<h:panelGroup rendered="#{not (upBean.pageProdPrinted eq cppage)}">
<h:commandLink>
<h:panelGroup>#{cppage}</h:panelGroup>
<f:ajax listener="#{upBean.goToPagePrinted(cppage)}"
event="click"
render=":form-myProd:get-printed-Prod :form-myProd:Prod-printed-paging"/>
</h:commandLink>
</h:panelGroup>
<h:panelGroup rendered="#{cpstatus.last and not (upBean.pageProdPrinted == upBean.nbPageProdPrinted)}">
| <h:commandLink id="next" style="color: #390">#{appMsg.next}
<f:ajax listener="#{upBean.nextPageProdPrinted}"
event="click"
render=":form-myProd:get-printed-Prod :form-myProd:Prod-printed-paging"/>
</h:commandLink>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
这显示得很好,如下所示(如果我们位于页面 > 第 n.1 页):
上一页 | 下一页1 2 3 4 | 1 2 3 4 next
所有链接都运行良好(触发 ManagedBean 操作),但“上一个:”链接。单击“上一个”似乎会执行某些操作: - 我看到它发送了一个部分请求(来自 firebug Console 选项卡),但“previousPageProdPrinted”处的断点没有被捕获。
我有 ah:form,没有嵌套在另一个表单中。我可以做些什么来跟踪这个问题吗?
环境: - 玻璃鱼 3.1 - Mojarra 2.1.3 (FCS b02)
感谢您的阅读, 股份公司
I have a ui:repeat loop to perfom some paging:
<h:panelGroup layout="block" style="height: 25px;text-align: right" id="Prod-printed-paging">
<ui:repeat value="#{upBean.pagesProdPrinted}"
id="Prod-printed-page-loop"
var="cppage" varStatus="cpstatus" >
<h:panelGroup rendered="#{cpstatus.first and not (upBean.pageProdPrinted == '1')}">
<h:commandLink id="previous" style="color: #390">#{appMsg.previous}
<f:ajax listener="#{upBean.previousPageProdPrinted}"
event="click"
render=":form-myProd:get-printed-Prod :form-myProd:Prod-printed-paging"/>
</h:commandLink> |
</h:panelGroup>
<h:panelGroup rendered="#{upBean.pageProdPrinted eq cppage}">
<h:panelGroup style="font-weight: bold">#{cppage}</h:panelGroup>
</h:panelGroup>
<h:panelGroup rendered="#{not (upBean.pageProdPrinted eq cppage)}">
<h:commandLink>
<h:panelGroup>#{cppage}</h:panelGroup>
<f:ajax listener="#{upBean.goToPagePrinted(cppage)}"
event="click"
render=":form-myProd:get-printed-Prod :form-myProd:Prod-printed-paging"/>
</h:commandLink>
</h:panelGroup>
<h:panelGroup rendered="#{cpstatus.last and not (upBean.pageProdPrinted == upBean.nbPageProdPrinted)}">
| <h:commandLink id="next" style="color: #390">#{appMsg.next}
<f:ajax listener="#{upBean.nextPageProdPrinted}"
event="click"
render=":form-myProd:get-printed-Prod :form-myProd:Prod-printed-paging"/>
</h:commandLink>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
This displays fine like this (in the case we are on a page > page n. 1):
Previous | 1 2 3 4 | next
All links are working well (firing the ManagedBean action) but the "Previous: link. Clicking "Previous" seems to do something:
- I see it sends a partial-request (from firebug Console tab) but breakpoint at the "previousPageProdPrinted" doesn't get caught.
I have a h:form, not nested in another one. Is there anything I can do to track this issue?
Environment:
- Glassfish 3.1
- Mojarra 2.1.3 (FCS b02)
Thank you for reading,
JSC
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论