[Seaside] RESTFUL form processing

Tony Giaccone tgiaccone at gmail.com
Tue Jul 12 12:59:03 UTC 2011

I'm trying to understand how to do form submissions to a restful web service
in seaside.

I've loaded up the restful support from seaside30addons

added these packages to the standard downloaded seaside image:


I rand the test cases and they all run fine.

My Html form looks like this:


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


I enter data for each field in the form, set the radio box to "Male" and do
the submit.

I have a break point set in my method

 |aRequest postFields  |
<Path: '/addUser'>
 <Consumes: 'application/x-www-form-urlencoded'>
aRequest := self requestContext request.
 postFields := aRequest postFields.
 self halt.
 Transcript show: 'Got it'; cr.

When inspected, postFields has exactly one element which is:

a WARequestFields('sex'->'Male')

Inspect the body and I get:


what happened to my form elements???

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110712/a8957ccc/attachment.htm

More information about the seaside mailing list