JSF 中 分页的问题

casablancaliu 2009-03-02 09:59:05
如题, 在JSF中实现分页, 我写的代码如下 但是第二页没有数据 各位大侠帮下忙

<rich:datascroller id="chartList1" for="snapshot_list" maxPages="6" reRender="chartList2" fastStep="7"/>
<rich:dataTable
value="#{chartMgmtControllerBean.charts}" var="chart"
id="snapshot_list" cellpadding="0" cellspacing="0"
styleClass="group_item_list_table" rows="7">
<rich:column styleclass="group_item_row">
<f:facet name="header">Name</f:facet>
<h:outputText value="#{chart.name}" />
</rich:column>
<rich:column styleclass="group_item_row">
<f:facet name="header">Action</f:facet>
<h:commandLink action="#{snapshotSearchController.viewSnapshot}">
<h:graphicImage value="/images/view_details.gif"
style='border-width: 0px;' title="View Detail"/>
<f:param name="snapshotId" value="#{chart.id}" />
</h:commandLink>
<rich:spacer width="5" />
<h:commandLink action="#{snapshotDeleteController.deleteSnapshot}">
<h:graphicImage value="/images/delete.gif"
style='border-width: 0px;' title="Delete"/>
</h:commandLink>
<rich:spacer width="5" />
<h:commandLink action="#{snapshotEditController.editSnapshot}">
<h:graphicImage value="/images/edit_properties.gif"
style='border-width: 0px;' title="Edit"/>
</h:commandLink>
</rich:column>
</rich:dataTable>
<rich:datascroller id="chartList2" for="snapshot_list" maxPages="10" reRender="chartList1"/>



...全文
149 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovezx1028 2009-03-02
  • 打赏
  • 举报
回复
顶一下啊
abc130314 2009-03-02
  • 打赏
  • 举报
回复
我用的是标准标签库。richfaces还没用过
casablancaliu 2009-03-02
  • 打赏
  • 举报
回复
各位大侠

顶起来啊

datascroller 中的PAGE属性 干嘛用的?
ameyume 2009-03-02
  • 打赏
  • 举报
回复
不知道,帮顶
还没学到jsf分页,学习一下先
casablancaliu 2009-03-02
  • 打赏
  • 举报
回复
anybody help me thanks
casablancaliu 2009-03-02
  • 打赏
  • 举报
回复
case closed.

i finally figure it out, the scope of the bean should be session.

casablancaliu 2009-03-02
  • 打赏
  • 举报
回复
up

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧