简体   繁体   English

如何在jsf 1.1中将寻呼机添加到动态数据表

[英]how to add a pager to dynamic datatable in jsf 1.1

i've been trying to add a pager to a dynamic datatable. 我一直在尝试将寻呼机添加到动态数据表中。

I am using the BalusC code at : http://balusc.blogspot.com/2006/06/using-datatables.html 我在以下位置使用BalusC代码: http : //balusc.blogspot.com/2006/06/using-datatables.html

Dynamic columns are working great, but now i need to programatically add a simple pager to allow the user to scroll through the records. 动态列的效果很好,但是现在我需要以编程方式添加一个简单的分页器,以允许用户滚动记录。

I'm using jsf-ibm components, where there exists a pager component, but i've been checking the api's and can't find the right way to add it to the HtmlDataTableEx component. 我正在使用jsf-ibm组件,该组件中存在一个传呼器组件,但是我一直在检查api,无法找到将其添加到HtmlDataTableEx组件的正确方法。

Any suggestion will be apreciated. 任何建议将不胜感激。

nevermind, i found the way, in case someone reaches this question: 没关系,我找到了办法,以防万一有人遇到这个问题:

HtmlDataTableEx table = new HtmlDataTableEx(); HtmlDataTableEx table = new HtmlDataTableEx();

// all your column setttings here... //您在此处的所有列设置...

HtmlPagerGoto pager = new HtmlPagerGoto(); HtmlPagerGoto传呼器= new HtmlPagerGoto(); //you can use web or deluxe too... pager.setId("tablaPager"); //您也可以使用网络或豪华网站... pager.setId(“ tablaPager”); pager.setFor("tablaReporte"); pager.setFor(“ tablaReporte”); pager.setStyleClass("tablaPagerClass"); pager.setStyleClass(“ tablaPagerClass”);

HtmlOutputStatistics statistics = new HtmlOutputStatistics(); HtmlOutputStatistics统计信息=新的HtmlOutputStatistics(); statistics.setId("tablaStatistics"); statistics.setId(“ tablaStatistics”); statistics.setFor("tablaReporte"); statistics.setFor(“ tablaReporte”); statistics.setStyleClass("tablaStatisticsClass"); statistics.setStyleClass(“ tablaStatisticsClass”);

HtmlPanelGroup header = new HtmlPanelGroup(); HtmlPanelGroup标头=新的HtmlPanelGroup(); header.getChildren().add(statistics); header.getChildren()。add(statistics); header.getChildren().add(pager); header.getChildren()。add(pager);

table.setHeader(header); table.setHeader(header); //this can be in the footer too //这也可以放在页脚中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM