Hi Jan,

>Given a table which displays the state of laboratory orders,
>When an order is canceled via a click on an AJAX button,
>And the page is reloaded via Ctrl + R,
>Then the order is again displayed with status "open".

the page is re-rendered on each reload. So there's no reason why the status should be shown "open" again.
Except your code keeps hold of stale information.

Furthermore Wicket pages are never cached by the browser (maybe this was different in 2010?).

So we could discuss page versioning, but maybe we could first check what problem you're actually trying to solve.

Regards
Sven


On 04.01.20 16:58, Jan Mewes wrote:
Hi,

Given a table which displays the state of laboratory orders,
When an order is canceled via a click on an AJAX button,
And the page is reloaded via Ctrl + R,
Then the order is again displayed with status "open".

I am concerned that this sort of behavior could lead to error states. I would feel better if there would not be any way to get back to the old state, i.e. that the ?pageId in the url should be removed for pages using AJAX.

I tried to achieve this in the following ways but failed:

Disable the versioning by calling the method/Page#//setVersioned(false):/
https://ci.apache.org/projects/wicket/guide/8.x/single.html#_turning_off_page_versioning

Providing a custom "MountedMapper" as show here and mentioned in the corresponding conversation:
https://github.com/martin-g/single-page-instance

Setting cache control headers to force a page reload:
https://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/

Is there any chance that the disabling of page versioning could become a first-class feature?

Kind regards,

Jan

Reply via email to