List Info

Thread: using TreeModel with dynamic data




using TreeModel with dynamic data
country flaguser name
Italy
2007-09-21 02:40:35
Hi, I'm using tr:tree through my own TreeModel since a long
time. Now I 
noticed a problem when underlying data can change
dynamically. This 
occurs when method getRowCount() returns a given number of
nodes, but 
then some of them are deleted from the underlying business
layer. In 
such case, method isRowAvailable() returns false for missing
nodes.
Then we get an exception "String index out of
range" in IconRenderer 
#88, since it does not check for an empty icon name (since
there is no 
icon for the missing node).
How should it work in such cases ? Should I *always* return
-1 from 
getRowCount() when the node collection is expected to change
?


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )