Reputation: 77
Is there a way to tell if a field is being EDITED in Vaadin? I have a feed that updates some spinners, and wish the user ability to change values and not have system update till after the changeEvent is fired.
Regards.
Upvotes: 0
Views: 55
Reputation: 4275
I think you might benefit from a slightly different approach. Any value change events have the property isFromClient
, which you can use to distinguish events from the real user and value changes that occur as a result of the server-side code updating the field.
textField.addValueChangeListener(valueChangeEvent -> {
if (!valueChangeEvent.isFromClient()) {
// value updated from server -> do nothing
return;
}
// user changed the value, this time we want to react to it
});
Upvotes: 1