How do you refresh TreeByNestingTableColumn table after changing context?
I am using EP and NWDS 7.0.18.
I have a two context nodes, node1 contains all the table data. The node2 has a recursive node that loads node1 data into a hierarchy tree format.
My question is, when I make some changes to the parent-child relationship in node1 in the component controller, how do I refresh the TreeByNestingTableColumn (loaded from node2)??
node2 is generated at runtime in the view controller.
For example in ViewController1 in method populateTreeData() method you are populating the data into the node2 from node1(controller node).
1. Create an event in Component Controller (in which you are changing the data in node1).
For example: treeDataRefreshEvent()
2. Create a method refreshTreeData in same Component controller and invoke this event in that method.
3. Create one Event Handler For example "treeDataRefreshEventHandler"in ViewController1 and while creating this event handler select the source event as "treeDataRefreshEvent()" from Component Controller. There will be an option to select this source event while creating the event handler in view controller.
4. In this "treeDataRefreshEventHandler" invoke the method populateTreeData() of your view controller1 to populate the data from node1 to node2 again.
5. From ViewController2(model popup) you are invoking some method like changeDataInNode1() of Component Controller to change the data in node1. After invoking this method invoke the refreshTreeData() of Component Controller also.
This approach is just raising an event in Component controller and catching that event in event handler of view controller.
Very simple. Carefully read this and follow this approach. If you are still not clear ask me. Will explain you clearly.