[Seaside] registerObjectForBacktracking, submit and execute block

Avi Bryant avi at beta4.com
Sat Aug 28 23:47:16 CEST 2004


On Aug 28, 2004, at 10:38 AM, Andreas Nilsson wrote:

> I'm trying to build an edit form with a table displaying items, a 
> checkbox for each item and a link to delete all checked items.
> In my form i have two collections, one to keep all items and another 
> one to keep the selection.
> It all worked flawlessly until i decided to register the collections 
> for backtracking, now nothing happens when i delete items.
> The problem as I see it is that the snapshot is taken when the form 
> submits, before the block is executed that removes the checked items.

I don't understand the problem, but for reference, the actual order is 
this:

1) render response
2) take snapshot
3) accept request
4) restore snapshot
5) process callbacks (execute blocks)
6) back to (1)

Where for any given iteration, 3-5 may actually occur any number of 
times if the back button is used.

Can you maybe post a minimal test case that shows the faulty behavior?

Cheers,
Avi

> Current behaviour:
> 1)	Submit to update selection
> 2)  	Take snapshot for backtracking
> 3) 	Execute block removing checked items
>
> Correct behaviour:
> 1)	Submit to update selection
> 2)	Execute block removing checked items
> 3)	Take snapshot for backtracking



More information about the Seaside mailing list