You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by hese <10...@gmail.com> on 2010/11/23 23:42:14 UTC
moving to the next page after form submit
Hi,
I have form in my page. When the user submits the form, I want to process
the info and move to the next page.
e.g.
http://localhost:8080/target/thepage/1 - when the user clicks submit here I
want to go to
http://localhost:8080/target/thepage/2 - when the user clicks submit here I
want to go to
http://localhost:8080/target/thepage/3
and so on.
So, in the form submit handler what is the best way to do this?
<???> onSuccessFromTheForm() {
//how I move to the next page here?
}
I saw
http://tapestry.apache.org/tapestry5.1/guide/pagenav.html
which speaks about different kinds of return types...String, Link etc.
Maybe I should construct a Link object
Link onSuccessFromTheForm() {
Link link = new LinkImpl(....);
return link;
}
Can anyone tell me what parameters to pass to LinkImpl?? or is there
another way i can do it?
Thanks.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/moving-to-the-next-page-after-form-submit-tp3277654p3277654.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: moving to the next page after form submit
Posted by hese <10...@gmail.com>.
LinkImpl constructor -
LinkImpl(String absoluteURI, boolean optimizable, boolean forForm, Response
response, RequestPathOptimizer optimizer)
i dont understand what I should pass for
- optimizable
- forForm
- reponse
- optimizer
--
View this message in context: http://tapestry.1045711.n5.nabble.com/moving-to-the-next-page-after-form-submit-tp3277654p3277658.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: moving to the next page after form submit
Posted by hese <10...@gmail.com>.
Howard - really appreciate that you take time to reply even to newbie
questions!
--
View this message in context: http://tapestry.1045711.n5.nabble.com/moving-to-the-next-page-after-form-submit-tp3277654p3278576.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: moving to the next page after form submit
Posted by hese <10...@gmail.com>.
Thanks Howard! It worked in the first go!
Link onSuccessFromThePage() {
Link link =
pageRenderLinkSource.createPageRenderLinkWithContext(ThePage.class,
getNextPage());
return link;
}
--
View this message in context: http://tapestry.1045711.n5.nabble.com/moving-to-the-next-page-after-form-submit-tp3277654p3278573.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: moving to the next page after form submit
Posted by Howard Lewis Ship <hl...@gmail.com>.
You shouldn't instantiate the Link directly; instead you can inject
the PageRenderLinkSource
service and obtain the Link from that.
On Tue, Nov 23, 2010 at 2:49 PM, ael <al...@dash.com.ph> wrote:
>
> Hello Hese
>
> There are many ways to do this.
>
> 1. By using return page.class (without parameters)
> 2. By using Context Url (OnPassivate & OnActivate) (with parameters)
> 3. Using Link Parameters (with parameters)
>
>
> http://jumpstart.doublenegative.com.au/jumpstart/
> http://jumpstart.doublenegative.com.au/jumpstart/
>
> Good Luck...
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/moving-to-the-next-page-after-form-submit-tp3277654p3277663.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
Re: moving to the next page after form submit
Posted by ael <al...@dash.com.ph>.
Hello Hese
There are many ways to do this.
1. By using return page.class (without parameters)
2. By using Context Url (OnPassivate & OnActivate) (with parameters)
3. Using Link Parameters (with parameters)
http://jumpstart.doublenegative.com.au/jumpstart/
http://jumpstart.doublenegative.com.au/jumpstart/
Good Luck...
--
View this message in context: http://tapestry.1045711.n5.nabble.com/moving-to-the-next-page-after-form-submit-tp3277654p3277663.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org