Usually, I define the action to be called in the a4j:poll
itself:
<a4j:poll id="poll" interval="1800000" action="#{viewManagedBean.actionToBeCalled}" enabled="true" reRender="poll,attendanceList"/>
Also please notice that you are defining a4j:poll
and rich:dataTable
in two separate forms and that you are not specifying prependId="false"
in your forms. However you are referencing to the dataTable (in reRender
) without the form ID.
EDIT based on OP comments. Here is how you deal with the prepend id, you have two possible ways:
- Just add
prependId="false"
to your forms - Don't add a
prependId="false"
but define your forms IDs, and use these ids in thereRender
part, something like this:reRender="theIDYouGaveToYourForm:theIdOfYourDataTable"