Friday, November 8, 2013

"last" link in Xpage pager control not working

I recently had to work with pager controls in Xpages.  I used to work with the default “Sample 1″ style for “Pager style” and this time I had to go for other styles that displays the "last" link in the pager. For some reason it did not render and instead I had to see a few dots instead of the "last" link.
It was as if some thing like "to be continued...." . Damn IBM walas... that was very good way to mock me :P
Eventually got my heart in mouth lol as I was under a lot of pressure to get it to work. With some research I found a post somewhere in the ibm developer works were a like minded person (may be) was enjoying this funny joke by IBM. One of the replies to that post suggested a work around hack to calculate total view entries count, divide it by number of documents being displayed and associate it with view control display etc...
I short I wanted my pager to look something like the following :
|< >| 
But it was looking something like the following
|< ..
I tried inspecting the pager and to my astonishment, it was never there. It was really something like "to be continued..." , I mean it was never calculated by the XPage
After some poking around and some more google searches, I found “alwaysCalculateLast” in the All Properties tab for the pager control. I set it to true and it works like charm :)

No comments:

Post a Comment