[Seaside] RESTFUL form processing

Tony Giaccone tgiaccone at gmail.com
Tue Jul 12 19:58:48 UTC 2011

Ah, on closer examination of the form, I found my problem.

The elements have to have name attributes. Not Id

this form, where each INPUT tag has a "name" attribute works perfectly.


<FORM action="http://localhost:8080/rest-example/addUser" method="post">
       <td> <LABEL for="firstname">First name: </LABEL></td>
       <td> <INPUT type="text" name="firstname" ></td>
       <td><LABEL for="lastname">Last name: </LABEL></td>
       <td><INPUT type="text"  name="lastname"></td>
       <td><LABEL for="email">email: </LABEL></td>
       <td><INPUT type="text" name="email"></td>
           <td> &nbsp;</td>
       <td><INPUT type="radio" name="sex" value="Male"> Male</td>
       <td><INPUT type="radio" name="sex" value="Female"> Female</td>
        <td> <INPUT type="submit" value="Send"> </td>
        <td><INPUT type="reset"></td>

On Tue, Jul 12, 2011 at 3:52 PM, Tony Giaccone <tgiaccone at gmail.com> wrote:

> I'm not sure how to go about adding named attributes to a method that
> processes a form submission.
> But beyond that I guess what I'm curious about is why out of all the
> elements in the form, the only one that made it to
> self requestContext request.
> is the radiobutton.  Why aren't the other entries there? Doesn't the
> request get parsed long before the REST classes
> get involved?  Or am I missing something?
> Tony
> On Tue, Jul 12, 2011 at 3:15 PM, Philippe Marschall <
> philippe.marschall at gmail.com> wrote:
>> 2011/7/12 Tony Giaccone <tgiaccone at gmail.com>:
>> >
>> > When inspected, postFields has exactly one element which is:
>> > a WARequestFields('sex'->'Male')
>> > Inspect the body and I get:
>> > 'sex=Male'
>> > what happened to my form elements???
>> Have you tried adding name attributes?
>> Cheers
>> Philippe
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110712/d6860bcd/attachment-0001.htm

More information about the seaside mailing list