I’m looking for a way to accomplish the following:
I have a view which contains 3 (three) comboboxes. When the user clicks on any combobox to select an item from the list, I want to then force focus to a text input field in the view. I am using a ValueChangeListener, which works great, IF the user changes the value selected. If they select the same value, the combobox closes and the focus stays with the combobox. I tried using a BlurListener also, but as I just stated, the focus stays with the combobox if the selected value doesn’t change, so the blur listener never gets called. An onClose/onOpen event would be great.
Other frameworks I have used have an event that is fired when any selection is made in a combobox, and you get an event item that contains the “old” value and the “new” value. If the old and new value are equal, nothing needs to change as far as data items, but you can then change your focus.
Is there a way to achieve this behavior with the vaadin dropdown component?
The ValueChangeEven in Vaadin is only fired if the value actually changes. You could probably pretty easily do an extended version of combobox with open/close listeners. If you wish not to put your hands dirty with the client side stuff, as
one of our consultants
to take care of this. This could become quite popular add-on.
cheers,
matti