If you initialise the objects in either of those methods then 
you shouldn't need default values anymore.  
i.e no assignment in constructor or field init

Otherwise if you are @Persisting those variables in the page 
(not the compound object) then you values should be retained.

If you are doing all that & it isn't working I think I'd need
to see the code again to be able help any further

cheers,
Ben

> -----Original Message-----
> From: Martin Dietze [mailto:[EMAIL PROTECTED] On Behalf Of 
> Martin Dietze
> Sent: Friday, 1 June 2007 5:33 PM
> To: 'Tapestry users'
> Subject: Re: T5: when is @Persist necessary and when not...
> 
> On Thu, May 31, 2007, Ben Sommerville wrote:
> 
> > For a form I'd say the best place to create those compound objects
> > is in the onPrepare method.  This will be invoked before 
> any processing/
> > rendering occurs.  (see the Form component subsection of 
> > 
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/valid
> ation.html)
> > 
> > Another option is the pageAttached method (invoked when page
> > is attached to the request) which is documented at
> > 
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/lifec
> ycle.html
> 
> Hmm, having tried both these options this leads to the objects
> being replaced by defaults before the resultpage after a submit
> is created, thus my submit results (the variables are annotated
> with "@Persist") get lost. Or am I misunderstanding something
> completely?
> 
> Cheers,
> 
> Martin
> 
> -- 
> ----------- / http://herbert.the-little-red-haired-girl.org / 
> -------------
> =+= 
> Wie verhindert man, dass einem die Geige gestohlen wird?
> Man legt sie in einen Bratschenkasten...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to