(unless (string= "" value)
(let ((i (parse-integer value :junk-allowed t)))
(when i
- (setf (presentation-slot-value slot instance) (parse-integer value))))))
+ (setf (presentation-slot-value slot instance) i)))))
(defmethod present-slot ((slot integer-slot-presentation) instance)
(if (editablep slot)
;;;; Currency (double precision reals)
(defslot-presentation currency-slot-presentation (real-slot-presentation)
- ()
+ ((as-money-p :accessor as-money-p :initarg :as-money-p :initform nil))
(:type-name currency))
(defmethod (setf presentation-slot-value) ((value string) (c currency-slot-presentation) instance)
(if (editablep currency)
(<ucw:input :type "text" :size 10
:accessor (presentation-slot-value currency instance))
- (<:as-html (presentation-slot-value currency instance))))
+ (<:as-html (format nil (if (as-money-p currency)
+ "$~$"
+ "~D")
+ (presentation-slot-value currency instance)) )))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; dates and times