5102 Posts in 1520 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 419 Views |
-
Save multiple Records from a TableField

1 December 2010 at 4:30am Last edited: 1 December 2010 4:31am
Most probably a stupid question again:
I have a Form with a TableField in the CMS where a user can modify the values of a set of records at the same time. Now how do I (elegantly) save the changes back to the database?
My first attempt was to loop over the returned data, get every changed DataObject via its ID and save the changed data. This works... but there is a prettier way, isn't there?
Anyway if not, I still got one problem: The Form recognizes the changes setting the status to unsaved (in javascript). But it does not recognize the save action. Becaus the saveing is done with ajax i have to put some javascript into my answer telling the form to set the status back to saved, so the anoying "not saved warning" does not appear on leaving the page.
showMessage("Saved") shows the message, I found out. But what snippet changes the status?
| 419 Views | ||
|
Page:
1
|
Go to Top |

