>
> Can't you fix that with a
> getPage().dirty();
> in the Ajax request handler?


Hmm tried your suggestion, but no luck. How would it help anyway? It's
dirty() that is causing the page to change version in the first place
right? RefreshingView.onPopulate() -> MarkupContainer.removeAll() ->
Component.addStateChange() -> Page.componentStateChanging() -> Page.dirty()
-> new version number!

I did find a fix for this though. Changing the rendering strategy from the
default REDIRECT_TO_BUFFER to ONE_PASS_RENDER. With this strategy, the
initial request is not redirect to "*?%version%*", which means when the
user presses refresh, a new page is recreated from scratch every time. Ajax
updates are applied on the version of the page that originally rendered
them, so there's no ambiguity like the scenario I describe. The drawback of
course is that page refreshes lose ajax updates, but the semantic in that
case at least is very clear and it's what I expected in the first place.

On Tue, Feb 14, 2012 at 7:32 AM, Wilhelmsen Tor Iver <[email protected]>wrote:

> > Thus the browser still shows the old version in the URL. But all future
> Ajax requests are targetting a different page version than visible in the
> browser URL :(.
>
> Can't you fix that with a
>
> getPage().dirty();
>
> in the Ajax request handler?
>
> - Tor Iver
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to