Paste number 32688: | dataflow example with ucw gui |
Pasted by: | attila |
When: | 18 years, 2 months ago |
Share: | Tweet this! | http://paste.lisp.org/+P80 |
Channel: | #ucw |
Paste contents: |
;;; i've customized an appointment display, here's some code to get an idea
(define-computed-universe compute-as) ;; global for now, later it should be per session
(defclass* appointment-html-input ()
((client-value :computed-in compute-as :documentation "Make the inherited slot computed."))
(:metaclass computed-standard-component-class))
(defclass* appointment-date-picker (appointment-html-input dojo-dropdown-date-picker)
()
(:metaclass computed-standard-component-class))
(defview weekly-appointment-sheet-view (standard-list-view table-view-mixin)
((first-hour (compute-as 8))
(last-hour (compute-as 20))
(start-date-field :component (appointment-date-picker :value (minimize-time-part (now) +utc-zone+)))
(number-of-days-to-display (compute-as 14))
(end-date (compute-as (local-time-add-days (value (start-date-field-of -self-))
(1+ (number-of-days-to-display-of -self-)))))
;; TODO these slots can't be computed until the mop integration handles parent slots correctly
(unique-doctor-renderer :component t)
(unique-patient-renderer :component t)
(unique-location-renderer :component t)
(first-visible-appointment-index (compute-as (find-first-appointment-index-later-then
-self- (value (start-date-field-of -self-))
(end-date-of -self-))))
(last-visible-appointment-index (compute-as (or (find-first-appointment-index-later-then
-self- (end-date-of -self-)
(end-date-of -self-))
(first-visible-appointment-index-of -self-))))))
This paste has no annotations.