On Tue, 28 Sep 2010 18:47:17 +0200, Manuel Sugawara <manuel.sugaw...@gmail.com> wrote:

On Tue, Sep 28, 2010 at 11:24 AM, Martin Strand <
do.not.eat.yellow.s...@gmail.com> wrote:

Of course is a matter of taste but I rather have
http://localhost/?q=c%E1lculo+diferencial<
http://localhost/?q=c%C3%A1lculo+diferencial>than

http://localhost:8080/C$00e1lculo$0020diferencial


I happen to prefer the second URL so I am doing this with an activation
context, just as you describe:

POST /search.form
redirects to
GET /search/my-search-query


Which requires an extra round trip to the server that is not needed at all.
See
http://royal.pingdom.com/2010/09/22/is-the-web-heading-toward-redirect-hell/

Regards,
Manuel.

Indeed, but this is just what I wanted in my particular case.
I'm using a custom Form component where the POST request is validated and any error messages are immediately displayed in an uncachable response, without any redirection. If the form validates, a redirect sends the client to a new URL that is cachable for a very long time.


It's not impossible to use GET method for forms, it's just that the built-in form component doesn't support this so you would have to roll your own. As far as I can tell from how Tapestry uses client side form data to replay events on the server, the GET URL you suggest would not be able to trigger all the validate/submit/success/etc events that the built-in form component does. If you don't need functionality like that from the Form component, I suppose you could create a very simple GetForm component and use that instead. I'm guessing you would also have to provide your own FormSupport in order to use built-in components such as TextField etc

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to