Selecting tree programmaticly doesn't highlight item

Hi,

I’m using beta 2 (but not sure if it is a Vaadin 7 problem).
When selecting a item in my tree programmaticly the item is not highlighted.


final Tree tree2 = new Tree();
tree2.setMultiSelect(true);
tree2.setMultiselectMode(MultiSelectMode.SIMPLE);
tree2.setImmediate(true);
tree2.setItemCaptionMode(ItemCaptionMode.EXPLICIT_DEFAULTS_ID);
final BeanItemContainer<String> beanItemContainer = createTreeContainer(data);
tree2.setContainerDataSource(beanItemContainer);
tree2.addItemClickListener(new ItemClickListener() {

    @Override
    public void itemClick(ItemClickEvent event) {
	    Object itemId = event.getItemId();
            String child = getChild(itemId);
	    tree2.select(child);
    }
});

tree2.isSelected(child) is true, when debugging that after doing the .select(). So the correct object was used to select the item. Why is the item not highlighted?

Greetings
Maik

It must have to do with the ItemClickListener…but I don’t know why. When moving my code to a button (ClickListener) it works. I really believe it’s a bug…

Or is there a better solution? What I want to do is that when clicking on a parent node all child-nodes should become selected automaticly.