Joris Wijlens wrote:

Hi,

I have this multi row update form implemented with a datable. The updates are in the collection that was bound to the datatable. So far so good. But now I want to which rows got changed because I don't want to submit all the rows of the collection to the database.

How can i do this?

I do this by attaching a ValueChangeListener to every updatable component in the table. The listener just stores away a reference to the current rowData object in a list of "changed" objects. When the "update" action executes, it then iterates over the list of "changed" objects.

The valueChangeListener tag only takes a classname, unfortunately, so there are a few hoops to jump through in order to be able to access the rowData object and access the list into which it should be stored. I can't remember the exact details for now, but it's not too hard; I think from memory I used a VariableResolver to evaluate an EL expression to get access to the necessary object.

Regards,

Simon

Reply via email to