users@glassfish.java.net

Updating TreeItems with a Tomahawk TreeTable component

From: <glassfish_at_javadesktop.org>
Date: Tue, 06 May 2008 02:58:44 PDT

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 :

<t:tree id="treetable" value="#{bean.tree}"
var="treeItem" >
...

</t:tree>


does anyone has encountered a similar problem ?
[Message sent by forum member 'mediii' (mediii)]

http://forums.java.net/jive/thread.jspa?messageID=272916