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);
            }
        });

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]

Reply via email to