Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

ValueChangeEvent - origin?

Georgi Petkov
6 years ago Sep 25, 2015 11:35am
Thomas Lesinski
6 years ago Sep 28, 2015 8:14pm

boolean save = false;

Valuechangelistener -> if(save) { do sth; save = false; }

this will make the Valuechangelistener to do nothing when the table is being loaded, then u need a way to turn save = true again.

Valuechangelistener can show u when the Value is changed (table loading) or when the user is focusing a field or losing the focus of it. Textchangelistener (if this is possible for the table) is triggered right before a user actually edits the input of a field. I did this things with Table+TextFields, so I dont know if it will work for you with just an editable table. But as long as u can use a Valuechangelistener and a Textchangelistener it should work for u.

Agata Vackova
6 years ago Sep 29, 2015 1:02pm

I starts my ValueChangeListener with:

if (!((AbstractField) event.getProperty()).isAttached()){
                            return;
                        }

Than the action is not performed until the table is displayed.