You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Josh Kamau <jo...@gmail.com> on 2011/05/06 09:18:27 UTC

@Persist vs @Retain

Hi Team,

Whats the difference between @Persist and @Retain ?

Regards.
Josh

Re: @Persist vs @Retain

Posted by Josh Kamau <jo...@gmail.com>.
Thanks guys. I will forget @Retain ever existed.

Josh.

Re: @Persist vs @Retain

Posted by Igor Drobiazko <ig...@gmail.com>.
Starting from Tapestry 5.2 using @Retain is discouraged. Please read the
javadoc for more details.

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Retain.html

On Fri, May 6, 2011 at 9:18 AM, Josh Kamau <jo...@gmail.com> wrote:

> Hi Team,
>
> Whats the difference between @Persist and @Retain ?
>
> Regards.
> Josh
>



-- 
Best regards,

Igor Drobiazko
http://tapestry5.de

Re: @Persist vs @Retain

Posted by "Joost Schouten (mailing lists)" <jo...@jsportal.com>.
>From the @Retain javadoc:

 * Marker annotation placed on fields whose value should be retained
past the end of the request. This is most often
 * associated with fields that are <em>lazily loaded</em>. By marking
such fields with the Retain annotation, the fields
 * will <em>not</em> be discarded at the end of the request.
 * <p/>
 * This is quite different from {@link Persist}, because the value
that's allowed to be retained is not stored
 * persistently; it is simply not cleared out. A subsequent request,
even from the same user, may be processed by a
 * different instance of the page where the value is still null.

It is deprecated though, so I would stear clear of using it.

Cheers,
Joost

On Fri, May 6, 2011 at 9:18 AM, Josh Kamau <jo...@gmail.com> wrote:
> Hi Team,
>
> Whats the difference between @Persist and @Retain ?
>
> Regards.
> Josh
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org