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.
Strange behaviour in a ListSelect
Hey!
I'm undergoing strange behaviours using a ListSelect in my project... To explain myself, I'll describe what happens and what's my guess.
I've got two ListSelect in a page, containing different datasources. The first one works correctly, but the second one doesn't. When you open the second ListSelect, the options appear. By default, the first option is selected (preselected). When I click on another option, I can realise that the ListSelect gets closed, the desired option is chosen BUT, just afterwards, the first option is selected AUTOMATICALLY without clicking on something.
What is this behaviour due to?
Thanks in advance.
PS: I can provide source code if needed for deeper insight.
I'm currently replacing the malfunctioning ListSelect by another and it seems it'll work correctly. Astonishing :|
It doesn't work. Adding aValueChangeListener, I've realised that all values can be selected but the first one...
BeanItemContainer<ViajeTraslado> auxContainer = new BeanItemContainer<ViajeTraslado>(ViajeTraslado.class, losViajesTrasladoConcatenados);
auxList = new ListSelect("auxiliar", auxContainer);
auxList.setMultiSelect(false);
auxList.setRows(1);
auxList.setNullSelectionAllowed(false);
auxList.setIcon(FontAwesome.EXTERNAL_LINK);
auxList.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 8078953283305563309L;
@Override
public void valueChange(ValueChangeEvent event) {
System.out.println("val change to " + ((ViajeTraslado)event.getProperty().getValue()).toString());
}
});
I think the issue is when adding the valuechangelistener