Howto: TreeTable

Hi

This is my first post in this forum. Started using Vaadin for about 6 months now. I think Vaadin is great !

Vaadin 682

I am having a problem with sorting using a TreeTable. The headers are just not clickable. When I replace the Treetable with a normal Table component , the headers are clickable and sorting correctly.

    private BeanItemContainer<Item> itContainer = new BeanItemContainer<Item>(Item.class);	


private void addBeanToContainer(Item item){
	itContainer.addBean(item);
	List<Item> children = app.getMasterDataManager()
			.getChildrenOfItem(item);
	if (children != null && children.size() > 0) {
		for (Iterator<za.gov.durban.pps.model.Item> it = children.iterator(); it.hasNext();) {
			za.gov.durban.pps.model.Item child = (za.gov.durban.pps.model.Item) it.next();
			addBeanToContainer(child);
		}
	}			
}


 ...

	List<Item> items = app.masterDataManager.findMyProjects(loggedInUser);
	for (Item item : items) {
		addBeanToContainer(item);
	}

	treeTable.setContainerDataSource(itContainer);
             
            for (Object object : treeTable.getItemIds()) {
		Item project = ((Item) object);
		treeTable.setParent(project, findParentItem(treeTable, project));
		treeTable.setCollapsed(project, false);
	}
	
	treeTable.setVisibleColumns(visibleColsList);
	treeTable.setColumnHeader("k100Name", "Project name");
	treeTable.setColumnHeader("treasuryProjectNo", "Project number");
	treeTable.setColumnHeader("status", "Status");
	treeTable.setColumnHeader("itemCategory", "Type");
	treeTable.setImmediate(true);
	treeTable.setWidth("100%");

Any help with this would be greatly appreciated.

Regards
Das