Hi Mike You need to make the param persistent. By default properties are not persisted between requests and what's actually happening here is a redirect after post, i.e. two requests
This should get you on the right track: public class Second { @Persist("session") // or use @Persist("flash") or @Persist("client") private String param; public String getParam() { return param; } public void setParam(String param) { this.param = param; } } 2009/10/23 Mite <mitemeis...@gmail.com> > > Hello to everyone on the forum. > > I have these two pages: > > ------------------------------------------------------------------------- > > import org.apache.tapestry5.annotations.InjectPage; > > public class Index > { > private String message; > > @InjectPage > private Second second; > > public String getMessage() { > return message; > } > > public void setMessage(String textField) { > this.message = textField; > } > > Object onSubmitFromUserInputForm(){ > second.setParam(message); > return second; > } > > } > > <html t:type="layout" title="school Index" > t:sidebarTitle="Current Time" > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" > xmlns:p="tapestry:parameter"> > <p:sidebar> > <t:form t:id="userInputForm"> > <t:textfield t:value="message"/> > <input type="submit" value="Submit"/> > </t:form> > > </p:sidebar> > </html> > > > ---------------------------------------------------------------------------------------------- > > public class Second > { > private String param; > > public String getParam() { > return param; > } > > public void setParam(String param) { > this.param = param; > } > } > > > <html t:type="layout" title="Second page" > t:sidebarTitle="Current Time" > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" > xmlns:p="tapestry:parameter"> > > <p:sidebar> > <p>1</p> > <p>${param}</p> > <p>3</p> > </p:sidebar> > > </html> > > > The problem that occurs is the following. Every time I submit the form > from > the Index page and get redirected to the Second page, the data from the > form > is not transfered. I get blank space instead of the data. It seems like > Tapestry creates a new object after it redirects me to Second. > > Can somebody point me to where is the problem? > > Thank you in advance > > -- > View this message in context: > http://www.nabble.com/Tapestry-seems-to-delete-object-data-tp26033218p26033218.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >