Hi, I'm searching for some guidance on how to approach the following requirement:
1. I'm using a SplitPane and have the Navigation pane bound to a TreeGrid with a data source that returns a nested structure (aka child arrays). Every item in the tree does have a unique id and this property is marked as a primaryKey in the data source definition. The structure is also uni-directional (the child records have no parentId or equivalent field). This is all working brilliantly.
2. In my list pane I need a toolbar component that should display a drop-down with value set to the selected node in the navigation tree and the list of options set to the peers of the selected node (or in other words, the children of the parent of the selected node).
3. I got this 'working' using a DynamicForm/SelectItem, adding it to my toolbar and manually creating a 'valueMap' from the node & tree instance.
I'd like to know, is there an approach that'd be cleaner? I'm thinking there must be a way I could optionDataSource with some property tweaks but I can't quite figure it out.
1. I'm using a SplitPane and have the Navigation pane bound to a TreeGrid with a data source that returns a nested structure (aka child arrays). Every item in the tree does have a unique id and this property is marked as a primaryKey in the data source definition. The structure is also uni-directional (the child records have no parentId or equivalent field). This is all working brilliantly.
2. In my list pane I need a toolbar component that should display a drop-down with value set to the selected node in the navigation tree and the list of options set to the peers of the selected node (or in other words, the children of the parent of the selected node).
3. I got this 'working' using a DynamicForm/SelectItem, adding it to my toolbar and manually creating a 'valueMap' from the node & tree instance.
I'd like to know, is there an approach that'd be cleaner? I'm thinking there must be a way I could optionDataSource with some property tweaks but I can't quite figure it out.
Comment