[Seaside] One-time callbacks / back page handling

Esteban A. Maringolo emaringolo at gmail.com
Mon Jan 7 19:01:30 UTC 2008


Hi,

Is there any way of creating an action callback that can be evaluated only once?

The WATransaction decoration works fine if I want to isolate is the
execution of a single block (nested or not), but seems that #isolate:
was designed to isolate the calling of other components, but not the
execution within then same component.

I have a table of items, with callbacks for each of them (rows), I can
isolate the execution of such callbacks, but if the user goes back, he
can re execute the callback.

For example:

Item 1           [EDIT] [DELETE]
Item 2           [EDIT] [DELETE]
...
Item n           [EDIT] [DELETE]


If the user goes after the "[DELETE]" link on Item 1, and successfully
completes the deletion, and then goes back to the page where the
delete link is present, and click on it again, strange things start to
happen.

If a one-time callback is possible, this would solve this kind of problems.
There still remain the possibility of an attempt of deletion of an
already deleted object by some other user, or even trying to edit a
deleted object (by the same user).

How do you handle this kind of situations?

Best regards,

-- 
Esteban A. Maringolo
eMaringolo at gmail.com


More information about the seaside mailing list