Even though same page instance is used for requests, page field value is set to default value when it is released to pagepool (after every request), so email are always null after redirect-aftre-post .
Use persist or activate/passivate pattern, please refer to http://tapestry.apache.org/tapestry5/guide/pagenav.html # Page Navigation Patterns Thanks DH ----- Original Message ----- From: "Andy Pahne" <andy.pa...@googlemail.com> To: "Tapestry users" <users@tapestry.apache.org> Sent: Friday, March 06, 2009 10:33 AM Subject: Re: Page navigation passed value not displayed (@InjectPage style) > > > I usually do it a little differnet and it works for me: > > > > class YourPage{ > @InjectPage > private DestinationPage destinationPage; > > > > Object onAction(String emailAddress){ > return destinationPage.startEdit(emailAddress); > } > > > } > > > class DestinationPagePage{ > > @Property @Persist > String emailAddress; > > > Object startEdit(String emailAddress){ > this.emailAddress = emailAddress; > return this; > } > > } > > > > Hope that helps, > Andy > > > > > > manuel aldana schrieb: >> thanks, but same issue. Anyway I think with the InjectPage pattern and >> returning an Object you have control which page-instance is passed. I >> debugged an the same page instance is used to retrieve the value. >> >> But further debugging shows that the setter is called, but when >> displaying the page the email field is reset to 'null' (which I >> wouldn't expect from the lifecycle when using the InjectPage + >> returnPage pattern). >> >> Luther Baker schrieb: >>> 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 <ald...@gmx.de> 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 >>>> ald...@gmx.de >>>> software-engineering blog: http://www.aldana-online.de >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>>> >>> >>> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >