Treetable not collapsing

Hello all,

I am using a FieldFactory to create a treetable. All code is the same for a regular table and a treetable generation. The only difference resides on the constructor (new TreeTable() or new Table()) and also the container that is received implements the collapsible interface (I use a if(container instanceof Collapsible) table = new TreeTable().
Children and Parents are indented correctly, the arrows appear on the right places, the only problem is that the nodes do not collapse :S - all items are visible and the arrows animate for collapsing but the children do not disappear.

My first thought is that there are some configuration I made for a regular table that cannot be made to a Treetable… Any ideas about this?

Here is the code that is specific for the tables:

if (colIds != null) { // is Table
				table = new HolosTable();
				if (tableClass != null)
					try {
						table = tableClass.getConstructor().newInstance();
					} catch (Exception e) {
						System.out.println(e.getMessage());
					}
				if (container != null && container instanceof Collapsible)
					table = new HolosTreeTable();
				table.setCacheRate(0.1);
				field = new CellFieldLayout(table, root != null);
				HolosFieldFactory factory = new HolosFieldFactory(localItem.getItemProperty(propertyId).getType());
				factory.setListeners(listeners);
				factory.setGenerators(generators);
				factory.setValidationGroup(validationGroup);
				factory.setUsingBlurNotifier(usingBlurNotifier);
				factory.setThrowingConversionException(throwConvExc);
				factory.setAllEditable(allEditable);
				table.setTableFieldFactory(factory);
				table.setSelectable(true);
				if (container == null) { // no container
					container = new HolosBeanItemContainer<Object>((Class<? super Object>) localItem.getItemProperty(propertyId).getType(), colIds);
					if (objList != null && objList.size() > 0) // hasValues
						((HolosBeanItemContainer<Object>) container).addAll(objList);
				}
				table.setContainerDataSource(container);
				for (Object colId : colIds) {
					if (generators != null && generators.containsKey(colId)) {
						((HolosTableGenerator) generators.get(colId)).setItem(localItem);
						table.addGeneratedColumn(colId, generators.get(colId));
					}
					table.setColumnHeader(colId, TM.get(type.getSimpleName() + "." + colId));
				}
			}

Regards
Bruno

Haven’t heard about this kind of behaviour before. Which Vaadin and TreeTable versions are you on? Try downloading another version of the TreeTable to see if it is a bug in the version that you are on right now. That would at least narrow the problem a little.

I am using treetable 1.2.2 (latest) and vaadin 6.6.4 (latest). I think this could be related to my other problem that I explained here:
http://vaadin.com/forum/-/message_boards/view_message/629893

Just so that you can really see what I am talking about I did a screen capture of the issue. You can watch the swf here:
http://ftp.holos.pt/~brd/treetable.swf
. Dont mind the quality, just check how the arrow animates, the indention is ok but the children do not collapse…

Regards
Bruno

Hello again,

I have just found out the problem with the TreeTable. There is some kind of problem with the
Collapsible
interface which leads to the behaviour I described above. When I switched to the
Hierarchical
interface the treetable started working ok.

Regards
Bruno

Great to hear. If you think it is a bug and you would like to get it fixed, you can file a ticket at
dev.vaadin.com
.