Primefaces:延迟加载数据表的分页器按钮未显示
我以前使用过数据表分页,它很有魅力。这次我需要使用延迟加载的分页,它显示第一页,并且没有分页器按钮。我已经尝试了很多方法,但它只是没有显示分页器按钮。如果我更改行数,它会起作用,即该页面上的行数已更改,但分页器按钮未显示。如果我检查 chrome 中的数据表,它显示 thr 是分页器底部的 div
<div xmlns="http://www.w3.org/1999/xhtml" id="j_idt7:contentTable_paginatorbottom" class="ui-paginator ui-paginator-bottom ui-widget-header ui-corner-bl ui-corner-br"></div>
这是我的数据表
我正在使用 jsf2、primefaces 2.2.1 和 apache tomcat 6。
任何帮助想法将不胜感激。谢谢
问候 希扎尔
i have previously used datatable pagination and it worked as a charm. This time i needed to use the lazy loaded pagination and its showing the first page and there are no paginator buttons. I have tried a lot of things but it just isnt showing the paginator buttons. if i change the number of rows, it works i.e the number of rows on tht page changed but the paginaotor buttons are not showing. if i inspect the datatable in chrome, it shows thr is a div for the paginator bottom
<div xmlns="http://www.w3.org/1999/xhtml" id="j_idt7:contentTable_paginatorbottom" class="ui-paginator ui-paginator-bottom ui-widget-header ui-corner-bl ui-corner-br"></div>
this is my datatable
<p:dataTable id="contentTable" value="#{chatroomBean.lazyLoadedChatroomBeans}"
var="chatroom" paginator="true" paginatorPosition="bottom" rows="10" lazy="true"
paginatorTemplate=" {PreviousPageLink} {CurrentPageReport} {NextPageLink} "
rendered="#{chatroomBean.chatroomSearchText!=null}">
i am using jsf2, primefaces 2.2.1 and apache tomcat 6.
any help idea will be much appreciated. thanks
regards
khizar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您遇到了此错误。
来自链接到的论坛讨论:
I think you've run into this bug.
From the linked-to forum discussion:
已经晚了,但我刚刚看到这个问题,想起我已经解决了这个问题,所以我想我应该在这里留下答案,以防万一 sum1 else 遇到它。问题是我使用的主题 cudnt 找到按钮的图像,由于我现在不记得了,我没有使用 jar 作为主题,我只是将 theme.css 添加到我的项目中,它开始工作...唯一的问题是 theme.css 中图像的链接就像
将它们更改为这个
n 它的工作原理就像一个魅力...
另一种解决方案(可能是更好的解决方案)是在类路径中添加主题的 jar 并将主题添加到 web.xml 但每个人都可能知道这一点...:)
问候,
khizar
its late but i just saw this question n remembered tht i had solved the prob so i thot i shud leave an answer here just in case sum1 else runs into it. the problem was tht the theme i was using cudnt find the images for the buttons, due to sum reason i cant remember now, i was not using the jar for the theme, i just added the theme.css to my project and it started working ... only problem was the links to images in the theme.css were like
changed them to this
n it works like a charm ...
another solution (n probably the better one) wud be to add the jar for the theme in classpath and add the theme to web.xml but everyone probably knows tht ... :)
Regards,
khizar