p:dataTable rowEdit doesn't update row object [duplicate]

…衆ロ難τιáo~ 提交于 2020-01-06 19:51:33

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/31803791/pdatatable-rowedit-doesnt-update-row-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!