Skip to main content

Updating TreeItems with a Tomahawk TreeTable component

2 replies [Last post]
mediii
Offline
Joined: 2007-09-03

hi everybody,

i'm working with a treetable tomahawk component and i encounter some trouble,
i cannot update my treemodel after it was displayed by the component. for example i have several components on each line (inputText or other)
and when i change the input value, the current treeItem is not updated, but the last treeItem takes the new value :/

note If I work with a datatable this problem disappears, the row is correctly updated.

In datatable we have the row Identifier attribute (rowId), it seems there is no identifier for the treetable,

here is my code to feed my treetable :

DefaultTreeModel tree = null;
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(new TreeItem("root"));
for (Layer layer : layers){
DefaultMutableTreeNode layerNode = new DefaultMutableTreeNode(new TreeItem(layer));
for (Serie serie : layer.getSeries()){
DefaultMutableTreeNode serieNode = new DefaultMutableTreeNode(new TreeItem(serie));
layerNode.insert(serieNode);
}
rootNode.insert(layerNode);
}
tree = new DefaultTreeModel(rootNode);

and then in the jsp page :

...

does anyone has encountered a similar problem ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
crico
Offline
Joined: 2008-09-22

Hi.

I have the same problem, have you resolved this problem?

Thanks.

mediii
Offline
Joined: 2007-09-03

Yes by creating my own treetable component :p
following UIData iterative components renderers