Using latest 8.1.x
We have a product tree with nodes and products that I have made lazy-loading by extending a TreeDataProvider and overriding hasChildren/getChildCount/fetchChildren so that they perform a load if they notice the node has not been loaded. Since I only want to put a “add product”-button on rows that are products, I essentially have a addComponentColumn that does (after debugging modifications)
return p.isProduct() ? new Label(“product”) : new Label(“node”);
But for some reason I get “node” listed for product rows also even if a simple System.out.println shows that isProduct returns true. The last child node is also somehow special - if there is only one product in the node it shows “product” correctly but if there are many products the last one is blank (neither “product” or “node”). Or then it gets removed somehow.
Is there something wrong with my TreeDataProvider? In other aspects it works correctly, e.g. normal addColumn(TData::getProductName) shows correctly
Really puzzling :-/
Thanks in advance,
Nik