掲示板
Issue in Customizing paginator template
11年前 に Andy Murray によって更新されました。
Issue in Customizing paginator template
New Member 投稿: 11 参加年月日: 12/08/09 最新の投稿
Hi,
Im trying to customize the paginaton templae {CurrebntPageReport} as i need it as 'Items <1-20> of 40'
It is getting me the required output when page loads but when i click next it doesnt change. (but data changes).
paginatorTemplate="{PreviousPageLink} Items #{myBean.pagingStartIndex} - #{myBean.pagingEndIndex} of #{my.totalNumOfAccs} {NextPageLink}"
i have startPageIndex and endPageIndex as class variables in managed bean:
publi class MyBean {
private int pagingStartIndex=0;
private int pagingEndIndex = 0;
public MyBean () {
lazyModel =new LazyDataModel<EnterpriseAccount>() {
@Override
public List<Item> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {
List data = callService();
.........
........
...........
// set pagingStartIndex and setPagingEndIndex
};
}
While debugging I see those values r getting changed but when rendering it shows only intial values when page loads.
Any help appreciated !!!!
Im trying to customize the paginaton templae {CurrebntPageReport} as i need it as 'Items <1-20> of 40'
It is getting me the required output when page loads but when i click next it doesnt change. (but data changes).
paginatorTemplate="{PreviousPageLink} Items #{myBean.pagingStartIndex} - #{myBean.pagingEndIndex} of #{my.totalNumOfAccs} {NextPageLink}"
i have startPageIndex and endPageIndex as class variables in managed bean:
publi class MyBean {
private int pagingStartIndex=0;
private int pagingEndIndex = 0;
public MyBean () {
lazyModel =new LazyDataModel<EnterpriseAccount>() {
@Override
public List<Item> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {
List data = callService();
.........
........
...........
// set pagingStartIndex and setPagingEndIndex
};
}
While debugging I see those values r getting changed but when rendering it shows only intial values when page loads.
Any help appreciated !!!!
11年前 に Neil Griffin によって更新されました。
RE: Issue in Customizing paginator template
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
I would recommend that you create a test portlet that incorporates the p:dataTable demo source code from the PrimeFaces ShowCase. That should work in a portlet environment the same as a webapp. If it does, then you'll have something to run with that works.