[hunchentoot-devel] Need some help figuring out what I'm doing wrong trying to get post parameters passed properly

Matthew Curry mjcurry at gmail.com
Sat Feb 9 19:34:47 UTC 2013


You're still not using the parameter name "task[]".

Try:
 (define-easy-handler (task-prioritize-url-handler :uri
*task-prioritize*) ((task[] :parameter-type 'list)) (task-prioritize
task[]))

-Matt


On Sat, Feb 9, 2013 at 2:19 PM, Jim Barrows <jim.barrows at gmail.com> wrote:
> Fixed that, and it didn't work.  I went through all three permutations
> (define-easy-handler (task-prioritize-url-handler :uri *task-prioritize*)
> ((task :parameter-type 'list)) (task-prioritize task))
>
> results in:
> [2013-02-09 12:18:40 [DEBUG]] task-prioritize NIL
>
> [2013-02-09 12:18:40 [DEBUG]] parameters ((task[] . 37) (task[] . 38)
>                                           (task[] . 36))
>
>
> On Sat, Feb 9, 2013 at 11:47 AM, Ala'a Mohammad <amalawi at gmail.com> wrote:
>>
>> the parameter name is "task[]", not "tasks" used as a default name for
>> the 'tasks' parameter in the easy handler.
>>
>> try using real-name
>>
>> HiH
>>
>> Ala'a
>>
>> On Sat, Feb 9, 2013 at 10:42 PM, Jim Barrows <jim.barrows at gmail.com>
>> wrote:
>> > I'm a Lisp newbie trying to use the jquery ui sortable widget
>> > (http://api.jqueryui.com/sortable/) to sort a list of tasks.
>> > The plugin posts the list of tasks as:
>> >
>> > task[]:
>> > 37
>> > task[]:
>> > 36
>> > task[]:
>> > 38
>> >
>> >
>> > Which Hunchentoot sees as:
>> > [2013-02-09 11:15:34 [DEBUG]] parameters ((task[] . 37) (task[] . 36)
>> >                                           (task[] . 38))
>> >
>> > However, when I use this handler:
>> > (define-easy-handler (task-prioritize-url-handler :uri
>> > *task-prioritize*)
>> > (tasks) (task-prioritize tasks))
>> >
>> > I get:
>> > [2013-02-09 11:38:52 [DEBUG]] task-prioritize NIL
>> >
>> > [2013-02-09 11:38:52 [DEBUG]] parameters ((task[] . 36) (task[] . 38)
>> >                                           (task[] . 37))
>> >
>> > If I use:
>> > (define-easy-handler (task-prioritize-url-handler :uri
>> > *task-prioritize*)
>> > ((tasks :parameter-type 'array)) (task-prioritize tasks))
>> > I get:
>> > [2013-02-09 11:36:07 [DEBUG]] task-prioritize #()
>> >
>> > [2013-02-09 11:36:07 [DEBUG]] parameters ((task[] . 37) (task[] . 36)
>> >                                           (task[] . 38))
>> >
>> > If I use:
>> > (define-easy-handler (task-prioritize-url-handler :uri
>> > *task-prioritize*)
>> > ((tasks :parameter-type 'list)) (task-prioritize tasks))
>> > I get:
>> > [2013-02-09 11:37:32 [DEBUG]] task-prioritize NIL
>> >
>> > [2013-02-09 11:37:32 [DEBUG]] parameters ((task[] . 37) (task[] . 36)
>> >                                           (task[] . 38))
>> >
>> > My understanding from the documentation is that I should end up with a
>> > list
>> > of id's in the var task when is all said and done.  Could someone tell
>> > me
>> > what I'm doing wrong that that isn't happening?  Or help clarify my
>> > understanding?
>> >
>> > Thanks so much!
>> > --
>> > James A Barrows
>> >
>> > _______________________________________________
>> > tbnl-devel site list
>> > tbnl-devel at common-lisp.net
>> > http://common-lisp.net/mailman/listinfo/tbnl-devel
>>
>> _______________________________________________
>> tbnl-devel site list
>> tbnl-devel at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
>
>
>
> --
> James A Barrows
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel




More information about the Tbnl-devel mailing list