cancel
Showing results for 
Search instead for 
Did you mean: 

How do you refresh TreeByNestingTableColumn table after changing context?

Former Member
0 Kudos

Hello Experts,

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.

Please help.

Regards,

Marshall.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marshall,

If i correctly understood your problem then:

In wdDoExit of the ViewController2 just call the method from Component controller that calls rfc and loads node1. That should serve the purpose.

Regards.

Rajat

Former Member
0 Kudos

Hi,

For example in ViewController1 in method populateTreeData() method you are populating the data into the node2 from node1(controller node).

Now

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.

//method

refreshTreeData(){

wdThis.firetreeDataRefreshEvent();

}

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.

Regards,

Charan

Former Member
0 Kudos

Thank you very much Sri Charan.

That did the business!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I understood like node1 is your data node and node2 is the tree node binded to table.

And you are populating the data from node1 to node2 to display the data in tree format in table.

So everytime you do changes in node1, re-populate the data into node2 again.

Regards,

Charan

Former Member
0 Kudos

Hi Sri,

Maybe I should set the scene exactly whats going on so maybe it might help you to help me.

1. Component controller calls rfc and loads node1

2. view controller 1 loads data into node2 in hierarchy format based on user expanding nodes in tree

3. user invokes modal window to make changes in node1 in component controller via view controller 2

Now, upon closing the modal window (view controller 2) how do I refresh the data (node2) in view controller 1?

Hope that is more clear.

Regards,

Marshall.