poll interval get change when the page get refresh in JSF

494 views Asked by At

I used JSF poll tag to reload a data table in my JSP. And there is another JSP in the footer. It has a button to reload the page with new data.

When I click on the button on the footer, it get change the frequency of the poll interval.

Bellow is the code sample;

Main.JSP

<et:partialTriggerGroup id="statusUpdatePoller">
<tr:poll interval="10000" id="statusUpdatePoller" pollListener="#{ServerSideClass.statusUpdate}"/>
<m:dataTable>
...
</m:dataTable>

</et:partialTriggerGroup>

Footer.jsp

<et:partialTriggerGroup id="pageControlTrigger">
...

<tr:commandLink action="#{ServerSideClass.statusUpdate}"  partialSubmit="true" />
</et:partialTriggerGroup>
  • Both refresh button & poll tag calls to the same server side method (ServerSideClass.statusUpdate()) to load data.
  • If I don't press the button on the Footer.jsp, the poll intervals works correctly.
  • If that button press the interval frequency get change. (Page get refresh within 2,3 seconds)

Anything wrong with this implementation ?

TIA.

0

There are 0 answers