You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/11/01 02:43:56 UTC

T5: persist a list

Hi,

I got a list for a loop:

@Persist("flash")
private List<String> files;

Questions:

1. do i have to files = new List<String>() in my page constructor?
2. why this files never got empty, I can see it even from another browser?
how to empty this list?

Thanks,

A.C.
-- 
View this message in context: http://www.nabble.com/T5%3A-persist-a-list-tf4729017.html#a13522171
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: persist a list

Posted by Josh Canfield <jo...@thedailytube.com>.
@Persist("flash") removes the object from the session after it reads it
while the page request is being prepared. Every time you set the value it
gets put back into the session. So, you could keep a flash persisted object
in the session perpetually if it's set from within your events or lifecycle
methods.

If you type Ctrl-N from IE you get a new browser window that shares the
session with the original window. You can try opening a different browser
(Firefox, Safari).

http://forum.java.sun.com/thread.jspa?threadID=489087&messageID=2294678

Hope that helps,
Josh


On 10/31/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>
>
> Hi,
>
> I got a list for a loop:
>
> @Persist("flash")
> private List<String> files;
>
> Questions:
>
> 1. do i have to files = new List<String>() in my page constructor?
> 2. why this files never got empty, I can see it even from another browser?
> how to empty this list?
>
> Thanks,
>
> A.C.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-persist-a-list-tf4729017.html#a13522171
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.