Favour using the activation context. If person has been persisted to the database then pass the id in the activation context. Otherwise go with the technique you've suggested below.
http://jumpstart.doublenegative.com.au/jumpstart/examples/state/passingdatabetweenpages And yes, in my earlier response I forgot to instantiate a person in onPrepareForSubmit() when the mode is "create", not "update". Geoff On 09/05/2012, at 6:28 AM, netdawg wrote: > Thanks for verifying. Which brings me back to...the basic misunderstanding I > seem to have on using persistence.... > > What is the best practice to HANDLE a parameter (say person) between pages > or even the page submitting to itself? That is, if not through some form > form of session persistence? Is it through intricate knowledge of these > event handlers like onPrepareXxxx...? Environment push/pop? > > Right now, if page1 submits person to page2. > > I am doing the following in Page1.class > > @Inject > Page2 page2 > > onSuccess method > 1. page2.setPerson(person) > 2. return page2; > > Within Page2.class > > @Persist (PersistenceConstants.FLASH) > private Person person; > provide setter for person, needed in page1 > > It works, of course, but is there a better way? > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5695818.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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org