[Seaside] Re: How to mark not-cacheable?

Lukas Renggli renggli at gmail.com
Wed Jan 16 13:28:13 UTC 2008


> But, and here comes the problem, if you go back the list will show
> both elements, if you attempt to remove the already removed element,
> you'll get a walkback (in this case reporting an NotFoundError).

WATransactionExample>>renderContentOn: html
       html unorderedList
               list: collection;
               callback: [:value | collection remove: value ifAbsent: []]

Works perfectly ;-)

> Another option would be to associate the callback with a render pass,
> or something similar.

This has always been done like this.

> I've read that tweaking the WALRUCache this could be achieved,
> however, no one said how :-).

I think the cleanest solution would be to make it an option for a
callback to only trigger once. Should be fairly simple to do so.

There are two questions remaining:

- What happens if you try to trigger such a callback the second time?
Do you specify another callback that should be triggered instead? Do
you display an error message? Do you regenerate the current page? Do
you redirect to the latest page?

- Why does a [fundamental|unnecessary]? feature request comes after 7
years of application development with Seaside? Is it because you have
to take precaution anyway, just in case somebody else deleted the
element from a different session? Is it because the remove
functionality should be part of the model and handle this situation?

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list