0
votes

I am trying to use in-cell editing feature of datatable using Primefaces 3.1. The example shown on their site does not show how could I use "delete" functionality. When I click on "edit" image to make changes in the table row, it works. However, nothing happens when I click on the "delete" image.

I took the code from a working demo availble at PrimeFaces showcase. But, this demo also does not work for "delete".

1

1 Answers

1
votes

However, nothing happens when I click on the "delete" image.

It is not clear what is "when I click on the delete image". In the Primefaces showcase there is no delete image (maybe you mix it with the cross icon, but this is for discarding changes).

I think you need to add delete functionality yourself, e.g. in a separate column (example as addition to the Primefaces showcase code):

<p:column>
  <h:commandButton value="Delete" action="#{tableBean.delete(car)}"/>
</p:column>

and in the backing bean:

public void delete(Car car) {
  carsSmall.remove(car);
}