Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
getting value from TextField
Hello,
I'm trying to figure out what is the difference between two methods of getting value from TextField:
1) textField.getValue()
2) from event.getText() of TextChangeListener
method 2 work fine and fast, however method 1 returns value only if I click on some button on the layout.
P.S.
code is in the attachments
TextChangeEvent occurs when you type or otherwise change the text (copy/paste). The text is the "raw" contents in the ui, not formatted or validated at this point. The field's value change usually happens when you exit the field (click outside the field, tab out, etc.). If you get the value from the field's getValue or ValueChangeEvent, it has been formatted and validated.
-Olli