-
1. Re: Programmatically access pageIndex from dataScroller
vk101 Jun 2, 2009 7:28 AM (in response to vk101)
if I output #{myPageIndex} on the page, the current value of the page is displayedActually, the page index variable will ONLY display when it is displayed within a rich:column of the rich:dataTable associated which contains the rich:datascroller, or in the footer which contains the rich:datascroller. If I try to output the value of the page index anywhere else on the page, it isn't displayed.
I had a feeling the value is available anywhere on the page but that perhaps it isn't getting updated with the AJAX requests of the datascroller - so I tried the following, which surprisingly didn't work.
I wrapped the h:outputText which I used to display the page index value in an a4j:outputPanel, whose ajaxRendered attribute is set to true. The reRender of both rich:datascroller and the a4j:form which contains it at a higher level points to the id of the h:outputText and its containing a4j:outputPanel. That doesn't change a thing.
Why isn't the page index variable available everywhere on the page, and how can I go about fixing this? Thanks.