[hunchentoot-devel] Accessor Function for Form Fields
Volkan YAZICI
yazicivo at ttnet.net.tr
Sun Apr 22 18:15:09 UTC 2007
Hi,
I really like the way DEFINE-EASY-HANDLER works with supplied form
field parameters. But the problem with it is, IMHO, that you cannot
use DEFINE-EASY-HANDLER everywhere in the code when you want to reach
to a form variable. Therefore I come up with such a solution:
(let ((default-parameter-type ''string)
(default-request-type :both))
(defmacro with-form-fields ((&rest fields) &body body)
`(let ,(loop for field in fields
collect (hunchentoot::make-defun-parameter
field default-parameter-type default-request-type))
, at body)))
I couldn't be sure if using an unexported function is the right way to
go here, therefore I'm here for your help. Is there any other function
provided by hunchentoot to have the same effect as WITH-FORM-FIELDS?
If there isn't any, maybe others too would be happy to see this
function coming default with hunchentoot.
Regards.
More information about the Tbnl-devel
mailing list