Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Guidance required

    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.

    #2
    Your drop-down (SelectItem) can set optionDataSource to the same DataSource used for the TreeGrid, then implement getPickListFilterCriteria and look at the currently selected node in the TreeGrid, returning criteria that will retrieve the selected node's children.

    Comment


      #3
      Thank you! That did the trick (and in hindsight looks obvious).

      Comment

      Working...
      X