Primefaces 数据表 new/delete 有部分更新的行
Primefaces datatable new/delete a row with partial update
当adding/deleting一行时,是否常见更新整个table来刷新它,比如update="form:tbl"
?
有什么方法可以只更新 added/deleted 行而不更新整个 table 吗?
我正在使用 Primefaces 5.3
。
<p:commandButton icon="ui-icon-plus" update="form:tbl" actionListener="#{myService.add()}" process="@this"/>
如官方文档中所述,有您要求的功能
Datatable - Add Row, but is seems available only on Primefaces 6.0 milestone, see addRow() method to DataTable。
您可以尝试使用分页数据表,这样当您添加新行时,您必须更新并仅显示组件的最后一页。
当adding/deleting一行时,是否常见更新整个table来刷新它,比如update="form:tbl"
?
有什么方法可以只更新 added/deleted 行而不更新整个 table 吗?
我正在使用 Primefaces 5.3
。
<p:commandButton icon="ui-icon-plus" update="form:tbl" actionListener="#{myService.add()}" process="@this"/>
如官方文档中所述,有您要求的功能 Datatable - Add Row, but is seems available only on Primefaces 6.0 milestone, see addRow() method to DataTable。 您可以尝试使用分页数据表,这样当您添加新行时,您必须更新并仅显示组件的最后一页。