Icefaces ace:dataTable懒加载 [英] Icefaces ace:dataTable lazy loading

查看:350
本文介绍了Icefaces ace:dataTable懒加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有一个懒惰加载的例子:ace:dataTable?..
我不明白如何实现LazyDataModel类的加载方法,以及如何从一个数据库通过这种方法..



谢谢!

解决方案

ace:dataTable 已经有一个内置加载机制在ICEFaces
(至少为3.x及以上版本)。



不需要扩展 AbstractList >到您的标签,并确保 属性指向扩展 LazyDataModel 的类。你只需要实现一个接受起始页,页面大小,排序和放大的抽象
方法。过滤参数。



还不要忘记使用分页并确定页面的大小(rows属性)。



检查: ICEFaces docs Ver。 3 ace:dataTable


Is there anybody who have a little example of a lazy loading with ace:dataTable?.. I can't understand how to implement the load method of the class LazyDataModel.. and how to fetch data from a Database through this method..

thanks!

解决方案

ace:dataTable has already a "built in" lazy loading mechanism in ICEFaces (at least for release 3.x and up).

No need to extend an AbstractList for this anymore.

All you need to do is add the lazy="true" to your tag, and make sure the "value" attribute points to a class that extends LazyDataModel... you just need to implement the abstract method there that accepts start page, page size, sorting & filtering arguments.

Also don't forget to use pagination and determine the size of the page ("rows" attribute).

Check: ICEFaces docs Ver. 3 ace:dataTable

这篇关于Icefaces ace:dataTable懒加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆