快捷搜索:  as  test  1111  test aNd 8=8  test++aNd+8=8  as++aNd+8=8  as aNd 8=8

金沙国际娱城app_酒文化网进入



Displaytag1.1支持在外部实现大年夜数据量分页。主要有两种要领实现:

Displaytag 1.1 offers two alternative ways for working with partial lists:

the first one uses the valuelist pattern, and requires that the object that you give to displaytag implements the org.displaytag.pagination.PaginatedList interface. You can pass this object to displaytag as an usual list, and it will extract paging and sorting information from it. This way is more recommended if you have to build your backend layer and you can easily follow this pattern.

a second way, recommended if you only have to use partial list for few 金沙国际娱城apptables that show a performance problem using full lists, is passing all the needed parameters as separate tag attributes (recors 金沙国际娱城appto be shown, page number, total number of records...)

此中第二种要领看金沙国际娱城app起来较为简单,只需在中增添两个属性:partialList="true"size="resultSize"即可,然则在应用发明这种要领因为是在原本内存分页的根基上改动的,以是照样存在一些Bug(比如:分页导航的值不会变......)

以是这里先容Displaytag保举的第一种要领,即:

实现org.displaytag.pagination.PaginatedListorg.displaytag.pagination.PaginatedList接口。

实现PaginatedList接口:

importjava.util.List;

importorg.displaytag.pagination.PaginatedList;

importorg.displaytag.properties.SortOrderEnum;

/** */ /**

* 分页列表

*

*@authorJohn.Zhu

*

*/

publicclassPageListimplementsPaginatedList {

/** */ /**

* 每页的列表

*/

privateList list;

/** */ /**

* 当前页码

*/

privateintpageNumber=1 ;

/** */ /**

* 每页记录数 page size

*/

privateintobjectsPerPage=15 ;

/** */ /**

* 总记录数

*/

privateintfullListSize=0 ;

privateString sortCriterion;

privateSort金沙国际娱城appOrderEnum sortDirection;

privateString searchId;

publicList getList() {

returnlist;

}

publicvoidsetList(List list) {

this .list=list;

}

publicintgetPageNumber() {

returnpageNumber;

}

publicvoidsetPageNumber( intpageNumber) {

this .pageNumber=pageNumber;

}

publicintgetObjectsPerPage() {

returnobjectsPerPage;

}

publicvoidsetObjectsPerPage( intobjectsPerPage) {

this .ob金沙国际娱城appjectsPerPage=objectsPerPage;

}

publicintgetFullListSize() {

returnfullListSize;

}

publicvoidsetFullListSize( intfullListSize) {

this .fullListSize=fullListSize;

}

publicString getSortCriterion() {

returnsortCriterion;

}

publicvoidsetSortCriterion(String sortCriterion) {

this .sortCriterion=sortCriterion;

}

publicSortOrderEnum getSortDirection() {

returnsortDirection;

}

publicvoidsetSortDirection(SortOrderEnum sortDirection) {

this .sortDirection=sortDirection;

}

publicString getSearchId() {

returnsearchId;

}

publicvoidsetSearchId(String searchId) {

this .searchId=searchId;

}

}

免责声明:以上内容源自网络,版权归原作者所有,如有侵犯您的原创版权请告知,我们将尽快删除相关内容。

您可能还会对下面的文章感兴趣: