QiuYan Tong
QiuYan Tong

Reputation: 13

Primefaces datatable new/delete a row with partial update

When adding/deleting a row, is it common to update the entire table to refresh it, such as update="form:tbl" ?

Is there any method to update only the added/deleted row and not the entire table ?

I'm using Primefaces 5.3.

<p:commandButton icon="ui-icon-plus" update="form:tbl" actionListener="#{myService.add()}" process="@this"/>

Upvotes: 1

Views: 317

Answers (1)

Alexcat
Alexcat

Reputation: 87

As reported in the official documentation there is the feature you requested Datatable - Add Row, but is seems available only on Primefaces 6.0 milestone, see addRow() method to DataTable. You can try with a paginated datatable, so when you add the new row, you have to update and display only the last page of the component.

Upvotes: 1

Related Questions