Strange behaviour in a ListSelect


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…

BeanItemContainer auxContainer = new BeanItemContainer(ViajeTraslado.class, losViajesTrasladoConcatenados);
auxList = new ListSelect(“auxiliar”, auxContainer);
auxList.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 8078953283305563309L;

        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