Try adding @Persist to the destination class ... otherwise, I'm not sure
you're guaranteed which page instance will get rendered.
public class SendingActivationEmail
{
@Persist
private String email;
-Luther
On Thu, Mar 5, 2009 at 7:10 PM, manuel aldana <[email protected]> wrote:
> Hi,
>
> I want to pass one value to one page with the InjectPage pattern (
> http://tapestry.apache.org/tapestry5/guide/pagenav.html). But below code
> does not work (email does not get displayed on other page).
>
>
> public class Registration
> {
> @Property
> private String email;
> @InjectPage
> private SendingActivationEmail sendingActivationEmail;
>
> @OnEvent(value = "submit", component = "newUser")
> Object newUser()
> {
> //WHEN DEBUGGING VALUE GETS PASSED CORRECTLY
> sendingActivationEmail.setEmail(email);
> return sendingActivationEmail;
> }
> }
> -------
> public class SendingActivationEmail
> {
>
> private String email;
>
> public String getEmail()
> {
> return email;
> }
>
> public void setEmail(String email)
> {
> this.email = email;
> }
> }
> -------
> SendingActivationMail.tml (I would not see email printed here):
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> We send an email to your registrated email ${email}. check it out.
> </t:layout>
> --------
>
> --
> manuel aldana
> [email protected]
> software-engineering blog: http://www.aldana-online.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>