jsfjsf-2primefacesdatatableroweditor

p:dataTable rowEdit doesn't update row object


I'm trying to edit rows on datatable using rowEdit mode but it doesn't work for me.

Here is the rowEdit event :

<p:ajax event="rowEdit"
        listener="#{saisirHeuresForm.updateMyRow}" 
        update=":saisirHeuresForm:messages"/>

And the managedBean corresponding method :

public void updateMyRow(RowEditEvent event) {
    event.getObject();
}

The event.getObject() method returns the object corresponding to the row which is edited but without any property modification.

Has someone any idea about this problem ?

Thanks in advance for your help


Solution

  • Finally I found what I did wrong. The method getListItems() was all the time loading from DB so the items I modified were directly reloaded from DB and in this case, without the modifcation I did.

    Hope it can help someone