(defvar *links* (list))
-(defaction add-link ((self component))
+(defmethod/cc add-link ((self component))
(let ((l (call-display (make-instance 'link)
:type 'editor)))
(when l (push l *links*))))
input-id "session"
(ucw::session.id (ucw::context.session ucw::*context*))))
-(defaction on-submit ((l auto-complete))
+(defmethod/cc on-submit ((l auto-complete))
())
(defmethod js-on-select ((l auto-complete))
(<ucw:render-component
:component (make-presentation val :type :one-line))))))
-(defaction revert-foreign-slot ((slot ajax-foreign-key-slot-presentation))
+(defmethod/cc revert-foreign-slot ((slot ajax-foreign-key-slot-presentation))
(setf (lol::value (live-search slot)) nil)
(when (original-value slot)
(mewa::sync-foreign-instance slot (original-value slot))))
(in-package :lisp-on-lines)
-(defaction read-instance ((self component) instance)
+(defmethod/cc read-instance ((self component) instance)
"View an existing instance"
(call 'crud-viewer :instance instance))
-(defaction update-instance ((self component) instance)
+(defmethod/cc update-instance ((self component) instance)
"Edit an instance, possibly a newly created one"
(call 'crud-editor :instance instance))
-(defaction create-instance ((self component) class &rest initargs)
+(defmethod/cc create-instance ((self component) class &rest initargs)
"Create a new instance and edit it."
(update-instance self (apply #'make-instance class initargs)))
(display (make-instance 'component) instance
:layers '(+ as-string)))))
-(defaction delete-instance ((self component) instance)
+(defmethod/cc delete-instance ((self component) instance)
(when (call 'option-dialog
:message (format nil "Really Delete ~A" (display-as-string instance))
:options '((t "Yes, really delete it,")
(defcomponent crud-editor (crud validation-mixin)
())
-(defaction ensure-instance ((self crud-editor))
+(defmethod/cc ensure-instance ((self crud-editor))
"This one does a little magic, see SYNC-INSTANCE"
(meta-model::sync-instance (instance self)))
:action (create-instance object (db-class object))
(<:as-html "(Create New " (db-class object) ")"))))
-(defaction call-crud-summary ((self component) class)
+(defmethod/cc call-crud-summary ((self component) class)
(call 'crud-summary :class class))
(setf (range-list.offset self)
(funcall (range-list.generator self) :offset))))
-(defaction scroll ((self range-list) op)
+(defmethod/cc scroll ((self range-list) op)
(funcall (range-list.generator self) :offset (range-list.offset self))
(setf (mewa::instances self)
(range-list.fetch-items self op)))
-(defaction scroll-to-page ((self range-list) window-number)
+(defmethod/cc scroll-to-page ((self range-list) window-number)
(setf (range-list.offset self) window-number)
(scroll self :current))
base-classes)))
-(defaction do-search ((self simple-search))
+(defmethod/cc do-search ((self simple-search))
(let* ((target (or (slot-value self 'ucw::parent) self))
(result (call-component
target
:type :listing
:initargs `(:instances ,r)))))))
-(defaction ok ((self simple-search-results) &optional arg)
+(defmethod/cc ok ((self simple-search-results) &optional arg)
(declare (ignore arg))
(answer nil))
(make-instance 'mewa::mewa-presentation-search
:search-presentation (make-presentation instance :type :search-model)
:list-presentation (make-presentation instance :type :listing
-(defaction select-search-table ((self advanced-search))
+(defmethod/cc select-search-table ((self advanced-search))
(let* ((i (make-instance (search-table self)))
(p (make-search-presentation i)))
(embed-component self p)
:initarg :action
:initform nil :special t :accessor link-action)))
-(defaction call-action-with-component-and-object ((self component) action-id object)
+(defmethod/cc call-action-with-component-and-object ((self component) action-id object)
(funcall (ucw::find-action (ucw::context.current-frame *context*) action-id)
self
object))