You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sam mulube <sa...@gmail.com> on 2004/10/09 01:29:01 UTC

Form component question

Hello all, I have a slightly quirky requirement in that in the app I
am developing I have a requirement to have a form submit to a URL with
an anchor. To be more explicit the page is part of a tutorial and what
I want to happen is that the user is asked to enter some text into a
form field, the form is then submitted and the same page is returned,
except now some other info on the page is revealed.

I've got this all working fine in Tapestry, but the problem I have is
that sometimes a tutorial page is required to have more than one form
within a page, and whenever a form is submitted it returns back to the
top of the page, which is fine if the form is at the top of the page,
but annoying if the form is at the bottom of a page.

I know that if I was just wiring the pages together manually I could
do something like this:

<form action="mypage.html#anchor"> 

and I know the PageLink, ExternalLink type components have an anchor
parameter which attach an anchor onto the end of the created link.

What would be the best way of doing this, writing a custom Form
component, or can I return the correct URL from within the listener
method of the page triggered by the form?

I'm just getting started with Tapestry and would be grateful for any pointers.

Sam Mulube

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org