HCoop
/
clinton
/
lisp-on-lines.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a664438
)
added rollback functionality to cancel
author
drewc
<drewc@tech.coop>
Mon, 20 Jun 2005 18:06:38 +0000
(11:06 -0700)
committer
drewc
<drewc@tech.coop>
Mon, 20 Jun 2005 18:06:38 +0000
(11:06 -0700)
darcs-hash:
20050620180638
-39164-
98e8c03962ca9d2fb6268d5117fdaac4be1171ae
.gz
src/mewa/mewa.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/mewa/mewa.lisp
b/src/mewa/mewa.lisp
index
e384f74
..
ba7d6d9
100644
(file)
--- a/
src/mewa/mewa.lisp
+++ b/
src/mewa/mewa.lisp
@@
-89,13
+89,17
@@
attributes is an alist keyed on the attribute nreeame."
(append (mapcar #'(lambda (s)
(cons (car s)
(gen-pslot
(append (mapcar #'(lambda (s)
(cons (car s)
(gen-pslot
- (if (meta-model:foreign-key-p model
- 'ucw::foreign-key
- (car s))
- (cadr s))
- (string (car s)) (car s))))
- (meta-model:list-slot-types model))
- (mapcar #'(lambda (s) (cons s (append (gen-pslot 'ucw::has-many (string s) s) `(:presentation (make-presentation ,model :type :one-line)))))
+ (if (meta-model:foreign-key-p model (car s))
+ 'ucw::foreign-key
+ (cadr s))
+ (string (car s)) (car s))))
+ (meta-model:list-slot-types model))
+ (mapcar #'(lambda (s)
+ (cons s (append (gen-pslot 'ucw::has-many (string s) s)
+ `(:presentation
+ (make-presentation
+ ,model
+ :type :one-line)))))
(meta-model:list-has-many model))))
(defmethod set-default-attributes ((model t))
(meta-model:list-has-many model))))
(defmethod set-default-attributes ((model t))
@@
-269,7
+273,11
@@
attributes is an alist keyed on the attribute nreeame."
(defaction cancel-save-instance ((self mewa))
(defaction cancel-save-instance ((self mewa))
- (answer nil))
+ (cond
+ ((slot-value (instance self) 'clsql-sys::view-database)
+ (meta-model::update-instance-from-records (instance self))
+ (answer self))
+ (t (answer nil))))
(defaction save-instance ((self mewa))
(meta-model:sync-instance (instance self))
(defaction save-instance ((self mewa))
(meta-model:sync-instance (instance self))