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 :expressionless:

It doesn’t work. Adding aValueChangeListener, I’ve realised that all values can be selected but the first one…

[code]
BeanItemContainer auxContainer = new BeanItemContainer(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());
        }
        
    });

[/code]I think the issue is when adding the valuechangelistener