Hi, 1) Stateful pages don't need to be versioned: setVersioned(false). But they get a version id in the URL nevertheless, meaning the implementation is not as good as it could be. A stateful page can be bookmarkable. As said above, you get 2 URLs for it, not unique.
2) I agree this has valid use cases, e.g. where the user works with a page that changes state, e.g. via panel replacement, and the user should NOT be able to go back to any of the previous states. Otherwise one cannot implement a reliable state machine if the user can undermine it with back button support. Wicket should support this use case, but AFAIK it does not. We have been able to code various workarounds but there is a problem with these workarounds: They are not stable - Wicket has broken these with subsequent releases - and I have given up playing this cat and mouse game. So until a non-versioned URL coding strategy becomes part of the Wicket core, this will remainin a frustrating up-hill battle. Please note that there will likely not be a 100% perfect solution to this because of the servlet API. On the first page visit, the container adds a jsessionid parameter to the URL until cookie support is established. In that case, there will still be 2 URLs for the same non-versioned page, even without a versioning parameter in the URL. But that is only a minor issue if you can put another page in front of your non-versioned page. Summing it up, I would suggest that you create a Jira issue for Wicket non-versioned URL support for our use cases. A page has to be mountable with such a policy so that as you say, only the latest version is available, and that must be reflected in a stable URL where ony one unique value exists. It can be done, it has been done before, it is just a matter of good will and policy. The Post-Redirect-Get pattern supports this, and I know that other frameworks support this, too. Regards, Bernard On Sun, 27 Oct 2013 05:26:07 -0700 (PDT), you wrote: >Afaik stateful pages are always versioned. I wonder about these two >questions: > >1. In this case links to versioned pages are not bookmarkable (since they >contain the verion identifier). Correct? This would meen that stateful pages >cannot have bookmarkable links. But this contradicts some statements in the >wicket documenbtation (e.g. >https://cwiki.apache.org/confluence/display/WICKET/Pages). > >2. I believe having stateful pages without versioninig are a valid use case >(i.e. storing just one page instance per page, e.g. for caching pre >calculated values or remembering some GUI settings, the back button leads >always to the same stored instance). Are there good reasons to avoid such a >scenario? Or are there good practices to achive it? > >Thanks, Frank --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
