FYI, there is an existing RFE that I just updated: "Support bean binding and validation" http://restlet.tigris.org/issues/show_bug.cgi?id=713
Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Thierry Boileau [mailto:[email protected]] Envoyé : mardi 22 décembre 2009 10:32 À : [email protected] Objet : Re: spring mvc like web binding for POJO Hi, I send you a sample eclipse project that declares a converter of XObject ( a dummy class in this sample code) : - from web form representations to XObject - from XObject to text/plain representations The single resource declares two methods: @Post public String handle(XObject obj) { // Which returns the first pair of key/value } @Get public XObject toObject() { } I hope this will help you. Best regards, Thierry Boileau > hi, > > thx for your reply. > > actually i wan to binding a lot of parameter.. maybe ~20. > > if using getParameter(name) is error phone since too many parameter to > get. > > soi instaed maybe it would work like > > <form method="post"> > <input name="first" value="first parameter" /> .... > > then the class can get the object like > > @post > public void handle(XObject x) > Â x.getFirst(); // return "first parameter" > > > not sure how will done in restlet? coz i can't find any documentation. > > kiwi > ---- > happy hacking ! > > > > > On Tue, Dec 22, 2009 at 4:32 PM, Thierry Boileau > <[email protected] <mailto:[email protected]>> wrote: > > Hi kiwi, > > at this time, the feature that seems similar to spring MVC web > binding, > is the usage of the converterHelper. > For example, your ServerResource defines such method: > @Post > public void accept(Form form){ > [...] > } > > The default converter delivered by the org.restlet.jar will > convert the > form sent by the Web browser (thanks to its media type), to a Form > instance containing all parameters. > If you want to handle conversions from representations to specific > objects (in both directions, or only one), you can add your own > converter. > > Could you tell us about your needs? > > Best regards, > Thierry Boileau > > hi, > > > > I wondering is restlet (will) support POJO binding like what in > spring MVC web binding which convert all parameter value to java > object. > > > > This could be useful if client is sending many parameter and > server can convert it to object without many boilerplate code. > > > > kiwi > > ---- > > happy hacking ! > > > > ------------------------------------------------------ > > > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2431861 > > <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2431861> > > > > > > ------------------------------------------------------ > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432242 > > <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageI > d=2432242> > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432261 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2433373

