Pager on a repeat fails to change page

  • I have a custom control that manually builds a table for a View, based on Dec’s blog on that very topic. Also in his blog, one may simply add a Pager to the Repeat on the control and all will be well. Unfortunately it’s not.- I get the navigation stuff rendered perfectly. It knows there are three pages, and it shows “Page 1 of 3” on the left, “1 2 3” in the middle, and “Next | Previous” on the right, precisely as it should. The items that should be links appear as links, and on the surface it’s working perfectly.

  • However, none of the links work. They all show “page urlwakka”, meaning they simply reload the current page, which is what happens.

  • I have partial refresh on. If I turn that off the Pager links stay the same, but I get an Error 500: Command not handled Exception instead of a page reload when I click one.

  • Everything I’ve see leads me to believe this should be fully automagic. What am I missing?

Thanks for your time…

<xp:panel id=“lotusContent” styleClass=“lotusContent” style=“padding:0px 0px 0px 0px”>

<xp:pager id=“viewPager” for=“viewRepeat” styleClass=“lotusPaging”>

<xp:pagerControl id=“current” type=“Status” styleClass=“lotusLeft” value=“Page {0} of {1}” />

<xp:pagerControl id=“previous” type=“Previous” styleClass=“lotusRight” />

<xp:pagerControl id=“sep” type=“Separator” styleClass=“lotusRight” style=“padding:0px 2px 0px 2px” />

<xp:pagerControl id=“next” type=“Next” styleClass=“lotusRight” />

<xp:pagerControl id=“selector” type=“Group” />

</xp:pager>

<xp:table styleClass=“phonebook”>

<xp:repeat rows=“10” value=“#{someView}” var=“rowData” indexVar=“rowIndex” id=“viewRepeat”>

xp:tr

xp:this.styleClass

</xp:this.styleClass>

…output a row…

</xp:tr>

</xp:repeat>

</xp:table>

</xp:panel>

Subject: SOLVED: Exception & Pager functionality.

  • Show Default Error Page doesn’t actually solve the problem, but it does show me where the problem is. Nice!!

  • I suspect this never shows up on a partial refresh because the offending element isn’t refreshed. That doesn’t explain why the Pager fails to work, however, which is still the case, or why the element doesn’t toss an error on initial load. I fixed the Exception and the Pager work perfectly with a full page refresh instead of a partial one.

  • Now for bizzaro land: The Pager works perfectly with partial refresh now that the error has been corrected. I’d call this a BUG myself: Errors in non-refreshed elements do not throw an Exception, and cause the Pager on a partial refresh to fail for no apparent reason. If an error is going to cause a failure whether an element gets refreshed or not, that error should appear somewhere.

  • Hope this helps someone later on…