You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by karthi <ra...@snovabits.net> on 2012/03/12 06:32:03 UTC
How do I pass values from one page to another using onSelected
Hi All,
I have a page music.tml and in that page there is a button called
play, In the corresponding music.java there is a method
public String onSelectedFromPlay() {
return "Play";
}
When the user clicked on the button this above method will get invoked and I
return a name "Play" so the page Play will get invoked, here I want to send
a value (url to play the music) from music.tml to play.tml when the user
clicks on the button, how do I achieve that?
Normally I would have used <a href... with a parameter and get the parameter
value in that play.java page using @ActivationRequestParameter, however here
I must use button.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-do-I-pass-values-from-one-page-to-another-using-onSelected-tp5556685p5556685.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: How do I pass values from one page to another using onSelected
Posted by karthi <ra...@snovabits.net>.
Thank you it works great!!
--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-do-I-pass-values-from-one-page-to-another-using-onSelected-tp5556685p5557246.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: How do I pass values from one page to another using onSelected
Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 12.03.2012 06:32, karthi wrote:
> When the user clicked on the button this above method will get invoked and I
> return a name "Play" so the page Play will get invoked, here I want to send
> a value (url to play the music) from music.tml to play.tml when the user
> clicks on the button, how do I achieve that?
1. Inject the target page using @InjectPage
2. Set the value of the URL for the injected page
3. Return the injected page, not the page name
You can find an example here:
http://jumpstart.doublenegative.com.au/jumpstart/examples/state/passingdatabetweenpages
HTH
Stephan