Re: getting the button from a Form
Hi Marc, On Jul 15, 2009, at 4:45 AM, Marc Lerma wrote: > hello everyone, > > In my application, I need to get the id of a form button when > managing a POST call on a given resource. > > this is my form i'm posting to my resource: > > > Name: > textarea> > Password: > > > onclick="document.forms['login'].submit()"> The onclick handler here is why you aren't getting the submitButton=Submit value in the posted representation. Use instead. Rhett > > > > and I'm getting it as follows: > > @Post > public Representation sendForm(Representation entity) { > > > Form form = new Form(entity); > >//get the names of the form fields >Set names = form.getNames(); > >... > } > > I'm being able to get all the field names but the button one, and I > definitely need it. is there any means by which I can get the button > name ('submitButton')??? > > > thanks in advance! > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2371432 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2371499
getting the button from a Form
hello everyone, In my application, I need to get the id of a form button when managing a POST call on a given resource. this is my form i'm posting to my resource: Name: Password: and I'm getting it as follows: @Post public Representation sendForm(Representation entity) { Form form = new Form(entity); //get the names of the form fields Set names = form.getNames(); ... } I'm being able to get all the field names but the button one, and I definitely need it. is there any means by which I can get the button name ('submitButton')??? thanks in advance! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2371431
getting the button from a Form
hello everyone, In my application, I need to get the id of a form button when managing a POST call on a given resource. this is my form i'm posting to my resource: Name: Password: and I'm getting it as follows: @Post public Representation sendForm(Representation entity) { Form form = new Form(entity); //get the names of the form fields Set names = form.getNames(); ... } I'm being able to get all the field names but the button one, and I definitely need it. is there any means by which I can get the button name ('submitButton')??? thanks in advance! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2371432