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