Added validation.lisp
[clinton/lisp-on-lines.git] / src / slot-presentations.lisp
index d7e874d..c92fa4b 100644 (file)
@@ -1,5 +1,8 @@
+(declaim (optimize (speed 0) (space 3) (safety 0)))
 (in-package :lisp-on-lines)
 
+
+;;;; I dont think i'm using these anymore.
 (defun multiple-value-funcall->list (function &rest args)
   "The function to be called by m-v-bf"
                   (multiple-value-call #'list (apply function args)))
                 "")
         :rows (rows slot)
         :cols (columns slot))
-       (maybe-convert-newline-and-escape-html-then-print))))
+       (when (presentation-slot-value slot instance)
+         (maybe-convert-newline-and-escape-html-then-print)))))
 
 
 (defcomponent mewa-slot-presentation ()
-  ((slot-name :accessor slot-name 
+  ((validate-functions :accessor validate-functions :initform (list (constantly t)))
+   (slot-name :accessor slot-name 
              :initarg :slot-name 
              :documentation 
              "The name of the slot being accessed")
@@ -59,6 +64,8 @@ When T, only the default value for primary keys and the joins are updated.")
    (creatablep :accessor creatablep :initarg :creatablep :initform t))
   (:documentation "The superclass of all Mewa slot presentations"))
 
+
+
 ;;;; this has to be in the eval when i would think
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defun generate-slot-presentation-definition-for-type (type)
@@ -376,7 +383,7 @@ Calendar.setup({
                           :initargs
                           `(:attributes ,(attributes slot)))
                           ))
-         (<:as-html "--"))))
+          (<:as-html "--"))))
 
 (defslot-presentation many-to-many-slot-presentation (mewa-relation-slot-presentation)
   ((list-view :accessor list-view :initarg :list-view :initform :one-line)