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 <alecs...@gmail.com> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

Reply via email to