Thanks for your reply

I did like this

(defun init-page ()
  "Layout of main page."
  (if (request-parameter "token")
      (make-instance 'funcall-widget :fun-designator (lambda (&rest
args)
                                                     (with-html
                                                       (:div
                                                        (:p "Got
token" (:br))))))
      (make-instance 'funcall-widget :fun-designator (lambda (&rest
args)
                                                     (with-html
                                                       (:div
                                                        (:p "No
token" (:br))))))))


this is work. but I think this looks agry. I want use selector or on-
demand-selector to make own custom dispatching widget. So, but thanks
for gave me an idea.

hidemi

On 4月19日, 午後9:15, Nandan Bagchee <[email protected]> wrote:
> Use the request-parameter fn from weblocks..
>
> (defun request-parameter (name)
>   "Get parameter 'name' from the request. If the request was
> submitted via GET method, the parameter is obtained from the
> query string. If the request was submitted via POST, the
> parameter is obtained from the body of the request. Otherwise, an
> error is signalled."
>   (when (eq (request-method*) :head)
>     (warn "User agent ~S sent a HEAD request" (hunchentoot:user-agent)))
>   (ecase (request-method*)
>     (:get (get-parameter name))
>     (:post (post-parameter name))))

-- 
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en.

Reply via email to