Hi, thanks for the reply :)
Some comments: - very hacky way is not appropriate (I think) as it'll break clustering, session persistence (server restart), etc. - less hacky: that's something I've been thinking about. But I'd need more specific information to go that way -- how to determine exactly what to expire from the page store, how to distinguish page expired vs. session expired situations, how to redirect user back to the 'last valid page' they were on (before they tried to (ab)use browser's back button)? Any particular suggestions? - even less hacky: I'm not 100% positive what exactly is that you're suggesting, but I do have a question -- could it possibly work? In my experiments with Wicket and browser's back button, Wicket seems to demonstrate a miraculous capability of restoring state as it was at the point of time when that particular page was rendered -- that's including both stuff that is in the model and also in instance variables in page instances. I really need to somehow understand how this back support works -- I'm rather scared that my lack of understanding will lead to some rather unexpected and unpleasant failures in production. Any suggestions as to where to look for info? Martijn Dashorst wrote: > > A couple of thoughts come to mind: > - very hacky: ensure the wizard pages are not serializable -> they > won't end up in the pagestore so any back button activity will result > in pageexpired messages > - less hacky: remove the wizard pages after the final submission from > the pagestore (I believe you can evict them) > - even less hacky: in onsubmit of your final step mark the form > submitted (create a field 'submitted' and set it to true) and add a > validator that fails when the flag is true > > Martijn > > On Fri, Mar 26, 2010 at 4:48 PM, Sergey Olefir <solf.li...@gmail.com> > wrote: >> >> Also on this subject -- if I want to prevent users from submitting wizard >> (multi-page form) again via back button after they've submitted it once >> (or >> in other conditions), what would be the best way to approach this >> problem? >> >> And similarly -- if I want to prevent users from using back button at all >> (e.g. show them the last 'normally' generated page if they submit >> anything >> from the 'old' page), what would be the best way to achieve this? > > -- View this message in context: http://old.nabble.com/Support-for-back-button-and-new-windows--tp28028525p28080646.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org