I'm trying to put an onClick event on a pager which is in a dataView. I want the onClick event to update a sessionScope variable. I've added the code and tested it, I can't get it to work. I made a test button and set it up with the same onClick event and the variable is updated correctly.
Right now, if I click the pager it works correctly and pages through the dataView. But, it doesn't update the sessionScope variable. Any ideas what could be causing this?
<xp:pager partialRefresh="true" id="pager8" xp:key="pagerBottomLeft"
styleClass="mblFooterLeft">
<xp:this.rendered><![CDATA[#{javascript:isPagerDisplayed();
}]]></xp:this.rendered>
<xp:pagerControl id="pagerControl2" type="Previous">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="testLabel">
<xp:this.action><![CDATA[#{javascript:incPagerDisplay();
sessionScope.pagerDisplay++;}]]></xp:this.action>
</xp:eventHandler>
</xp:pagerControl>
</xp:pager>
Any help would be greatly appreciated.
xp:pagerControl
(reference link). – Naveen