[Seaside] Re-render component on back button

Joachim Tuchel jtuchel at objektfabrik.de
Mon Dec 2 06:37:49 UTC 2013


Lorenz,

Can you give us a little more context? Does the rendered state of the shopping cart correspond to its actual contents?

In vanilla seaside, this should be true. The conponent should be re- rendered when you press the back button. What you are seeing might be "desired" behavior. Back in 2005, we all went nuts about continuations and the fact that the back button finally works right in seaside ;-) our definition of consistency was somewhat different from the rest of the world's...

So I suggest to try the following:

1. Put a halt or breakpoint into the component's rendercontentOn: to see if it re-renders

2, render an inspect link into the component to see if what the component shows is what the cart contains. All you need is an anchor with a callback like this: callback: [myCart inspect]

The basic question IMO is what your definition of "consistent" is and whether you expect the right thing to happen.

The chrome differences In behavior should be addressed right next after that.

Joachim

Am 01.12.2013 um 16:34 schrieb Lorenz Köhl <lorenz at quub.de>:

> I'm developing a shopping cart and wondering if there's any way to show its size consistently even after pressing the back button.
> 
> I think I would need to force a re-render, but since I'm not sure what the browsers actually request on back button presses I'm at a loss how to configure this, if possible.
> 
> When I open the developer tools network tab in chrome and press the back button, the behaviour is different than normally, ie. after I added an item and it shows '1 article' and I press back, then the component is properly re-rendered and still shows '1 article' even on the previous page. So chrome requests are probably
> different..
> 
> Is it possible to force this behaviour in the normal browser state?
> 
> greetings,
>    Lo_______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 


More information about the seaside mailing list