It's a publicly exposed HTTP call so I won't be getting an 
org.restlet.data.Form passed in. I'll be getting an entity body with params as 
in:

param=value&otherparam=value

Paul Morris

On Aug 8, 2011, at 8:32 AM, "Tim Peierls" 
<<mailto:t...@peierls.net><mailto:t...@peierls.net>t...@peierls.net<mailto:t...@peierls.net>>
 wrote:

I'm probably missing something, but why isn't the following acceptable?

@Post public Representation doPost(Form form) {
    // do stuff with form
}

--tim

On Sun, Aug 7, 2011 at 11:54 PM, Paul Morris 
<<mailto:pmor...@nmh.org><mailto:pmor...@nmh.org><mailto:pmor...@nmh.org>pmor...@nmh.org<mailto:pmor...@nmh.org>>
 wrote:
I might also mention that I'm trying to keep my bean from being Spring aware so 
I'm looking for the solution that is as least Spring-invasive as possible. 
Thanks.

> This may be more of a Spring question than a Restlet question but can someone 
> advise on the best way to handle the following in Restlet/Spring:
>
> I want to create a Form dynamically when a POST is called as in:
>
> @Post
> public Representation doPost(Representation entity) {
>     Form form = new Form(getRequestEntity());
>     // do stuff with the parameters in the form
> }
>
> But how do I inject the Form into my ServerResource object in the Spring 
> context file since it won't have what it needs (namely the requestEntity) to 
> get instantiated until after the POST gets called?

------------------------------------------------------
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2812411><http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2812411><http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2812411>http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2812411

This message and any included attachments are intended only for the addressee. 
The information contained in this message is confidential and may constitute 
proprietary or non-public information under international, federal, or state 
laws. Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2812526

Reply via email to