0 Replies Latest reply on May 2, 2013 5:47 AM by Chao Wang

    how to dynamically load datatable data with ajax in richfaces?

    Chao Wang Newbie

      Hey all, I have an issue about dynamically loading datatable data,


      I'd like to use dataTable to display some information in differernt rows and columns, the problem is that my MenagedBean need take a while to retrieve all data from another server and this will block page loading for user.


      Basically,  I just loaded web page with an empty dataTable, and another thread will fill my cache which contains data should be displayed in dataTable, This won't block web page for user, but it required click some button for refresh page to show the new data during the data retriving.


      Is there any way I can inform my JSF page once a new data is read and stored into cache, and re-render dataTable contents?



      I saw the "poll" example in showcase : http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=poll&skin=blueSky which uses a timer to do the update, but how the datatable could passively recognize there is an new row should display?


      any suggestion or maybe a similar example is appreciate.