Sean Schofield wrote:

OK well that explains the problem. I have two ideas to improve tree2
on this front:


2.) Generate a warning (instead of exception) if the node cannot be
found. This way if you do want to preserve node state but you have
the unusual case where the underlying data changes, you don't crash. Obviously in your case it won't be unusual but there are other cases
where perhaps another user updated the database in between posts and
so the underlying tree data changed. Maybe also a preserveTreeModel
attribute similar to preserveDataModel for <x:dataTable> ...


I will work on a patch for #1 and think about #2

sean


Hello Sean,

I don't think issuing a warning is the correct way to go. Since in the case that somebody needs this behaviour he is always bombarded by warnings from his tree. This will clog up his logs and can be very annoying. (Had a similar problem with an old version of datatable : ( )
What I would suggest is that the tree simply ignores the fact that it can't find certain nodes or even better make it that the user can turn this behaviour on or off.
IMHO a warning is an error.


just my 2ct.

Regards
Stefan



Reply via email to