Hi,I have a problem on showing the total number of pages in a pager…
I find on the web this method of customization:
Set the pager style as Custom,
in the Status PagerControl set the value as “Page {0} of {1}” as here:
<xp:pagerControl id=“pagerControl3”
type="Status"
value="Page{0} of {1}"
> </xp:pagerControl>
This solution doesn’t show the total number of pages, but at least 9…
Someone can help me?
Thanks in advance.
Paolo.
Subject: Re: Pager & Total Number of Page
Better late than never …
Put this in the Computed Value of the Label of the Status Pager Control:-
var entryCount = viewData.getEntryCount();
var viewControl = getComponent( ‘viewPanel1’ );
var rowCount = viewControl.getRowCount();
// Search is active → rowcount, else entrycount
var count = ( viewControl.getDataSource().getSearch() ) ? rowCount : entryCount;
var pages = count / viewControl.getRows();
"Page {0} of " + parseInt( pages );
Subject: XML Code for that is …
<xp:pagerControl id=“pagerControl5” type=“Status”>
<xp:this.value><![CDATA[#{javascript:var entryCount = viewData.getEntryCount();
var viewControl = getComponent( ‘viewPanel1’ );
var rowCount = viewControl.getRowCount();
// Search is active → rowcount, else entrycount
var count = ( viewControl.getDataSource().getSearch() ) ? rowCount : entryCount;
var pages = count / viewControl.getRows();
"Page {0} of " + parseInt( pages );}]]></xp:this.value>
</xp:pagerControl>
hcl-bot
4
Subject: Thanks
Better late than never …
thanks a lot for your solution… I’ve never received a mail notification from the system about your responses.
I’ll try this work around ASAP
Thanks again. 
Paolo.