I have data in a container which must be shown in two Tree widgets.
In one of the trees a filter should be applied (not all nodes shown). In the other Tree the complete container should be shown. If a change is made in one tree (change of node parenting, change in properties), the other should reflect it.
My idea was to use the same container backing both trees, but to add a Filterable decorator to one container before adding it to the second Tree. But I couldn’t find such a decorator. Did I miss it?
Is there another approach? I could have two separate containers for both tree, but then they need to exchange all modifications. How should the wiring be done for this?
It sounds like you need two containers for this purpose. One that has the applied filters and one that has not. The problem, as you said, is that you have to keep them in sync yourself
FWIW, I agree that filtered containers should really behave like views and not change the state of the container itself. I suppose it would be possible to implement a filtering container wrapper yourself but it would be difficult to generalize to work properly with arbitrary containers. If you only need to support in-memory containers, for instance, it should be pretty doable though.
Yes I’m only interested by in-memory containers. But my problem is maybe not so general as I first stated it.
In the filtered view I just want to hide one Root tree node and all its children.