(in-package :lol)
+(defclass form-element (widget-component)
+ ((client-value :accessor client-value :initform ""
+ :initarg :client-value
+ :documentation "Whetever the client's browse sent for this form element."
+ :backtrack t)
+ (lisp-value :accessor lisp-value :initform +uninitialized+
+ :initarg :lisp-value
+ :documentation "The current lisp object in this form element."
+ :backtrack t))
+ (:metaclass standard-component-class)
+ (:documentation "A single value in a form.
+
+A form-element is, simply put, a wrapper for a value in an html
+form."))
+
;;;; Expiry date picker
(defslot-presentation date-slot-presentation (clsql-wall-time-slot-presentation)
(defclass %date-field (date-field)
((day :component (%integer-range-field :min-value 1 :max-value 31))
(month :component (%integer-range-field :min-value 1 :max-value 12))
- (year :component (%integer-range-field :min-value 2005 :max-value 2015) ))
+ (year :component (%integer-range-field :min-value 2006 :max-value 2015) ))
(:metaclass standard-component-class))
(defmethod shared-initialize :after ((field %date-field) slot-names
real value is +uninitialized+, since +uninitialized+ is a ucw
internal symbol this shouldn't be a problem.")
-(defclass form-element (widget-component)
- ((client-value :accessor client-value :initform ""
- :initarg :client-value
- :documentation "Whetever the client's browse sent for this form element."
- :backtrack t)
- (lisp-value :accessor lisp-value :initform +uninitialized+
- :initarg :lisp-value
- :documentation "The current lisp object in this form element."
- :backtrack t))
- (:metaclass standard-component-class)
- (:documentation "A single value in a form.
-A form-element is, simply put, a wrapper for a value in an html
-form."))
(defgeneric read-client-value (element)
(:method ((element form-element))
(iterate
(for value from (min-value range) to (max-value range))
(<:option :value value :selected (= value (lisp-value range))
- (<:as-html value)))))
\ No newline at end of file
+ (<:as-html value)))))