[Bese-devel] checkboxes

Vladimir Sekissov svg at surnet.ru
Wed Dec 28 15:01:26 UTC 2005


Good day,

a_bakic> When a checkbox is off in a form, its value is not submitted as part of the
a_bakic> http request. This means that the corresponding ucw callback is not called at
a_bakic> all in this case. Has anyone found a nice solution to this problem in ucw?

Checkbox values are T or NIL. Changed  value will be a string.
You can use this to check was value changed or not.

Probably something like:

(defmethod coerce-client-value ((e checkbox-element) value)
  (unless (stringp value) ; value unchanged, return NIL
    (when (call-next-method)
      (setf (slot-value e 'client-value) t)
      t)))

Best Regards,
Vladimir Sekissov



More information about the bese-devel mailing list