Datatable does not update after successful ajax call

后端 未结 6 527
广开言路
广开言路 2021-01-12 06:17

I have a data table. Each row of the table has a commandButton called \'Remove\', which is supposed to remove that row from the model and the view and

6条回答
  •  情歌与酒
    2021-01-12 07:00

    I was using update="@form" and it didn't completely work: it wasn't updating the number of rows in the dataTable, for instance. What I already had in place was this on the button that updated the form:

    process="@this" oncomplete="updateRC();"

    and then just below I had:


    What I did to fix the rows update problem is add a styleClass to the dataTable, e.g. "myTable", and then add a jQuery selector to that class in the above remoteCommand, e.g.:

提交回复
热议问题