Yes I had already tought of a solution like taht but I was hoping for a clean tapestry solution like the you suggested me with the link. Thanks anyway. Would instead be possible with T5?
Martin Strand ha scritto: > For POST requests, your initial idea is the way to go: > >>>>> Of course I can return to the new user a new page with a form that >>>>> has >>>>> an action that points to the web site, but it would be far better to >>>>> have my page class. > > > So you'll render a form (no need to use the Form component for this) > > <form action="http://www.example.com/" id="myForm" method="post"> > <input type="hidden" name="someParameter" value="someValue"/> > </form> > > > If you want to submit the form automatically without having your user > click anything, hide the form with CSS and use a script similar to > this at the bottom of your page: > > ... > ... > <script> > document.getElementById("myForm").submit(); > </script> > </body> > </html> > > > > > On Sat, 06 Feb 2010 19:30:21 +0100, Ivano Luberti > <lube...@archicoop.it> wrote: > >> Thanks Martin: it worked. >> But what I could do in case I had to submit a form accepting only POST >> method in the form? >> >> Ivano Luberti ha scritto: >>> I will try that: for whatever reason I was convinced that I had to >>> submit a form and not simply a link. >>> But checking twice the docs of the web site I have to forward to, I see >>> I can use a link. >>> Thanks for now >>> >>> >>> Martin Strand ha scritto: >>> >>>> If you just want to redirect the client to another URL, return an >>>> ILink from your form listener: >>>> >>>> public ILink formSubmitListener() >>>> { >>>> // Do work >>>> // ... >>>> >>>> return new StaticLink("http://www.example.com/"); >>>> } >>>> >>>> >>>> Martin >>>> >>>> On Wed, 03 Feb 2010 10:39:23 +0100, Ivano Luberti >>>> <lube...@archicoop.it> wrote: >>>> >>>> >>>>> Hello, I'm trying to solve the following problem using T4.1.6. >>>>> I want to have the user submit a form , perform some operation in the >>>>> page class and then forward the user to an external web site. >>>>> Of course I can return to the new user a new page with a form that >>>>> has >>>>> an action that points to the web site, but it would be far better to >>>>> have my page class. >>>>> I have tried using a service and HttpClient package but it return and >>>>> HttpResponse and I'm not able to convert it to a WebResponse. >>>>> >>>>> Any suggestion? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- ================================================== dott. Ivano Mario Luberti Archimede Informatica societa' cooperativa a r. l. Sede Operativa Via Gereschi 36 - 56126- Pisa tel.: +39-050- 580959 tel/fax: +39-050-9711344 web: www.archicoop.it ================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org