Can someone explain to me exactly how page versioning works, and how to
turn it off?
I have a page StagingPage that contains a file uploader. This page is
interesting in that when you upload some files with Button1, the page
lists the files on the page and keeps them in a collection until you hit
Button2, at which point the pages does Some Other Really Interesting
Thing with the files. In other words, the page acts like a staging area
for files, allowing you to 1) upload files and then 2) do something with
them.
I get this number on the end of the URLs which, from the page versioning
and caching reference documentation
<http://wicket.apache.org/guide/guide/versioningCaching.html>, seems to
indicate the version of the page. I don't want this. I just want there
to be one version of the page (even though it is stateful). The back
button can go to the previous page; I don't care.
So I turn off versioning in StagingPage with:
setVersioned(false);
But I still get numbers at the end of the StagingPage URL. Worse, back
and forward in my browser goes between apparently two versions of the
page (one with the "Choose Files" button selecting files, and one
without)---but the number in the URL doesn't change! Worse still, when I
remove the number and reload the URL without the number, Wicket puts the
number back but first increments the number! Now back and forward cycle
between numbered URLs.
I thought setVersioned(false) was supposed to turn all that off?
In my own Guise framework, each page has a single component instance
tree on the back end. Whatever you do at that URL, whenever you come
back to it it will be just like you left it. Granted, there are several
drawbacks such as memory consumption; Guise can learn a lot from Wicket
in how the latter can serialize each page between requests, and
versioning can be very useful in some situations. But here I just want a
stateful page that has one single version---the current version. I don't
want it to remember any previous versions. And I don't want numbers on
the end of the URL. How can I turn off versioning for real?
Thanks,
Garret