You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Strand <ma...@dinstudio.se> on 2005/12/05 15:28:53 UTC

Rewinding, I don't get it

I've got form with a list of items and a delete button. On form submit, I  
want to check the values of some checkboxes, delete the corresponding  
items from a remote IMAP server, and then redisplay the page with the  
updated list.

However, to prevent the "stale link" phenomenon, it seems I need to get  
the old list from the IMAP server first in order for the rewind and  
setting of checkbox values to function properly. Then, the form listener  
is called, the items are deleted, I grab the updated list from the IMAP  
server and redisplay it.
Isn't there a way to skip the old list - just grab all checkbox values and  
delete the corresponding items?

--Martin

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


Re: Rewinding, I don't get it

Posted by Martin Strand <ma...@entcap.se>.
Thanks, persisting the list on the client sounds reasonable.

Is there a way to persist the list as a sequence of primary keys and then  
recreate it on rewind? The actual objects can't be serialized cause they  
include a reference to a TCP connection. (I guess it would be like  
persisting a db result set)
I've seen people mentioning IPrimaryKeyConverter and DataSqueezer but I'm  
not sure how and where to use them or if it will work in this case. Could  
someone give me some guidance?

--Martin

On Tue, 06 Dec 2005 18:50:18 +0100, Konstantin Ignatyev  
<kg...@yahoo.com> wrote:

> Keeping the 'old' list in a persistent property of the page might help.  
> Then on the "updated" view you can addidtionaly check if there were any  
> new posts if you want to prevent outdated view.
>
> Martin Strand <ma...@dinstudio.se> wrote: I've got form with a  
> list of items and a delete button. On form submit, I
> want to check the values of some checkboxes, delete the corresponding
> items from a remote IMAP server, and then redisplay the page with the
> updated list.
>
> However, to prevent the "stale link" phenomenon, it seems I need to get
> the old list from the IMAP server first in order for the rewind and
> setting of checkbox values to function properly. Then, the form listener
> is called, the items are deleted, I grab the updated list from the IMAP
> server and redisplay it.
> Isn't there a way to skip the old list - just grab all checkbox values  
> and
> delete the corresponding items?
>
> --Martin

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


Re: Rewinding, I don't get it

Posted by Konstantin Ignatyev <kg...@yahoo.com>.
Keeping the 'old' list in a persistent property of the page might help. Then on the "updated" view you can addidtionaly check if there were any new posts if you want to prevent outdated view.

Martin Strand <ma...@dinstudio.se> wrote: I've got form with a list of items and a delete button. On form submit, I  
want to check the values of some checkboxes, delete the corresponding  
items from a remote IMAP server, and then redisplay the page with the  
updated list.

However, to prevent the "stale link" phenomenon, it seems I need to get  
the old list from the IMAP server first in order for the rewind and  
setting of checkbox values to function properly. Then, the form listener  
is called, the items are deleted, I grab the updated list from the IMAP  
server and redisplay it.
Isn't there a way to skip the old list - just grab all checkbox values and  
delete the corresponding items?

--Martin

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





Konstantin Ignatyev




PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000

Bowers, C.A.  The Culture of Denial:  Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools.  New York:  State University of New York Press, 1997: (4) (5) (p.206)