2
votes

I want to update the datatable columns (particular columns) dynamically as the data changes in the server it has to reflect in UI through ajax call. How can I achieve this with primeface.

1
How about using p:poll? Check this : primefaces.org/showcase/ui/poll.jsf - rags

1 Answers

2
votes

you can use polling mechanism provided by primefaces using p:poll tag.

From Primefaces Documentation:

Poll is an ajax component that has the ability to send periodical ajax requests and execute listeners on JSF backing beans

<h:form id="form">  
    <p:dataTable id="tab" ...>
      //cols
    </p:dataTable>  

    <p:poll interval="3"   
            listener="#{counterBean.increment}" update="tab" />  
</h:form>