Miller, John wrote:
I have a datable with a dataScroller on the top and bottom. There is a
button that toggles whether the Table shows “Closed Events” or not . It
appears that the dataScroller on top renders itself before the dataTable
is updated, hence showing an incorrect number of pages. See the below
code :
[snip]
The getData method must go to the DB every time, hence is not a true
getter, but unfortunately obtaining data from the DB every page request
is a requirement.
Perhaps you could add an h:outputText with style="display:none" at the
start of the page in order to trigger a method which refreshes your data?
eg:
public String getRefreshModel() {
// refetch data here
return "";
}
and
<h:outputText style="display:none" value="#{fooBean.refreshModel}"/>
It's a hack, but should ensure your table's datamodel is refreshed
before the first scroller access it...
Cheers,
Simon