Thanks for the prompt response. However, in my case is has to be set on the client/JavaScript side because our application allows page designers to change the content of the page and its behavior at runtime and decide which cookie to set if any.
Thanks, Alec On Thu, Apr 14, 2011 at 10:37 AM, Pedro Santos <[email protected]> wrote: > Hi, you can set a cookie in the Button#onSubmit implementation, > > new Button(""){ > public void onSubmit() { > //at this point all validations are tested > ((WebResponse)RequestCycle.get().getResponse()).addCookie(new > Cookie(name, value)); > } > } > > On Thu, Apr 14, 2011 at 1:25 PM, Alec Swan <[email protected]> wrote: > >> Hello, >> >> I have a button on a page which submits a Wicket form by calling >> form.submit() using straight JavaScript. If the form submitted without >> errors, then the JavaScript code should set a cookie. I am looking for >> some ideas on how to detect if the form was submitted successfully or >> not in JavaScript? >> >> Thanks, >> >> Alec >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > Pedro Henrique Oliveira dos Santos > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
