how to get the TextField value while user inputing

hi,

i want to enable the one button, once one spec TextField is not empty.

I tried to call “addValueChangeListener” to add event.but i found only the event triggered when the text field lost focus. i also tried to call addKeyUpListener and so on. i found even thought event can be triggered, but when i call “getValue” the value not changes. it seems like i can’t know the text field value immediately when it changes.

could some one know how to do?

Use textField.setValueChangeMode(ValueChangeMode.EAGER);. Note that this will create quite a lot of network traffic.

Olli Tietäväinen:
Use textField.setValueChangeMode(ValueChangeMode.EAGER);. Note that this will create quite a lot of network traffic.

it works, thanks.

Take a look at ValueChangeMode.TIMEOUT. Very similar to eager, but not as much network traffic.