Thanks!! Wilhelmsen Tor Iver wrote: > >> Ok.. that didn't stop the client from submitting the form of >> the previous page again. >> Any other solutions to preventing double submissions? > > Tell people to use a less stupid browser than IE? (Which is the one with > that behavior if memory serves)? :) > > Real solution: Use a "hidden" token that you use to check whether the > particular form already has been posted, and in that case just skip the > form processing and work on the already processed object, something like > this in onSubmit(): > > // Map<String, DataObject> objectmap... > > // Form<DataObject> > > String tokenvalue = form.get("token"); > DataObject obj = objectmap.get(tokenvalue); > if (obj == null) { > // Not already handled > obj = this.getModelObject(); > // TODO Persist or whatever > // Put in map > objectmap.put(tokenvalue, obj); > } > // TODO Operate on obj > > Instead of this thrown-together example using an objectmap (which will > get filled with "garbage"), use the session. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > >
-- View this message in context: http://www.nabble.com/force-client-to-use-GET-method-tp20420920p20422599.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]