[Seaside] Trouble with undo on Record Editor
s002 at landr.net
Thu Aug 12 18:46:34 CEST 2004
First, Thanks for the help on previous threads. I now have a GOODS db
accessed at the session level. I have a PMLogEditor class that allows
me to modify GOODS log entries.
I want to have a 'Cancel' button that will return to the calling method,
without saving any changes to the current record. I saved the current
values in #oldItem. But it seems that they get changed when the #item
values change. Below is my code for this part of the application.
self call: (PMLogEditor new item: thisRecord).
"show Edit a Log form"
oldItem _ item " save current values of item before editing"
. . . .
html submitButtonWithAction: [self undoChanges. self answer]
html space: 5.
html submitButtonWithAction: [self clear] text: 'Clear'].
" Restore original values to item"
item _ oldItem.
-Thanks for the help.
More information about the Seaside