Unwanted ValueChangeEvent caused by setItemDataSource

Hi there,
I have a huge Form which uses a BeanFieldGroup.
When I change the bean by calling setItemDataSource it will fire valuechangevents on all fields.
the problem is, that there is no way (or is it?) to find out, if the user fired the event by changing a value or whether “the code” did it.
Example, why I would need this: a combox has a listener which calls a validation-method, which will fail, when the change event is called because of setting a new datasource. the reason might be, because the other fields aren’t filled yet with new data and the validation fails because of that.
so it would be nice, if there was a way to prevent firing the event on calling setItemDataSource or to find out, if the user caused the event.
any ideas?

I’m using vaadin 7.1.11

thx

The ValueChangeEvent is fired only if there is an actual value change, so there probably is in your case.

You can, of course, have some boolean value somewhere that says whether the listener(s) should process the events. That of course requires checking it in all the listeners.

A boolean value somewhere? I don’t know what you want to tell me, sry :wink:
The only thing I could imagine the boolean is about is whether it is an useraction or the code that fired the event, but I still see no way to find that out.
Well, I still haven’t found a solution for this problem, but I’ve found a workaround for my failing validation.
So the problem isn’t that critical for me, but still I’m interested in solutions for the questtion whether there is a way to find out if the user caused the event or the code or how to prevent the code from firing the event.