Icefaces ace:dataTable懒加载 [英] Icefaces ace:dataTable lazy loading
问题描述
我不明白如何实现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屋!