On Thu, Jun 9, 2011 at 11:06 AM, Mathilde Pellerin
<[email protected]> wrote:
> Hi all,
>
> In a form, I have a textfield and a button which is disable. I want to
> enable the button when user enter a value on textfield.
>
> so I do that :
>        emailField.add(new AjaxFormComponentUpdatingBehavior("onkeyup") {
>
>            @Override
>            protected void onUpdate(AjaxRequestTarget target) {
>                System.out.println("------------ onUpdate trace");
>                submitButton.setEnabled(true);
target.add(submitButton);
>            }
>        });
>
> onUpdate method is called (I have the trace in console) but my button is
> still disable...
>
> This is the code of the button :
>        final Button submitButton = new Button("submitButton");
>        submitButton.setEnabled(false);
>
> I don't understand why this code doesn't work because I saw similar code on
> the Web that seems to work.
>
> Thanks for your help.
>
> --
> *Mathilde Pellerin*
> Ingénieur en développement de logiciel
>
> STATLIFE
> tel : 01.42.11.64.88
> mail : [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to