Hi,

well I guess I have found yet an other bug in the tree2 component. I wanted to include a UIData component as child of a node facet. But the components within that UIData component do not work correctly. For example input components lose their input value and command components do not work at all. After some investigation I have found the problem. The UITreeData does save the state of EditableValueHolder childs but does not do so for UIData components, that require some special handling.
This special handling is done in the UIData component (if there is a child UIData), although there is a bug (MYFACES-288). As a result you cannot use the tree2 within a UIData component correctly too. Thats because UITreeData does not subclass UIData.

I guess this problem appears in general to all components that are iterating over some sort of data structure, if there is a sub component doing this as well.
That means, if a component does interate over its contents, it should be a requirement to subclass UIData. This would ensure that these work correctly with each other.

My suggestion would be to make UIDataTree subclass UIData and to introduce some special DataModel that iterates over the tree structure or deprecate the "row" functions and add special ones for the tree structure. That would also remove all the subcomponent state saving code from the component as this is already implemented in UIData.


What do you think about that?


Another enhancement would be, to be able to define some default node facet.


Regards,
Mathias Werlitz

Reply via email to