cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer of context node data from one component to another

former_member672218
Participant
0 Kudos
603

Hello,

I would like to transfer context node data from Component A to component B. I tried all the steps that are mentioned in the forum but still the data does

not get reflected in the second component.

Please find below the steps that i have done so far.

Component A

1. Created a context node and marked the interface property in the same.

2. Updated the context node with data on action.

Component B.

1. Mentioned the component A in the "Used Components"

2. Mentioned the Component A and its interface controller in the Component Controller of B.

3. Mentioned the Component A and its interface controller in the View of component B.

4. Drag and dropped the context node from Component controller of A to Context in B.

5. Created table in component B and mapped the respective context node to the table.

In debugging ( In component B), i am not able to find the data in the context node.

Can you tell me what is the step i am missing?

Regards,

Venkat

View Entire Topic
former_member672218
Participant
0 Kudos

Hello Sankar and Rama,

Yes. I have not called any method. I am calling the first component A and that should trigger component B in a new window on click of a button in component A. I am trying to fill all the data into the context

node( Which is a interface node) in component A and on click of the button trying to read the context node data in component B.

I have written code in  WDDOINIT() method of component B where i am trying to read the context node data filled earlier. Is my approach correct or should i change the logic?

Regards,

Venkat

ramakrishnappa
Active Contributor
0 Kudos

Hi Venkat,

If you need to fill data when component A, gets instantiated, you need to write your logic to set data in WDDOINIT( ) of component A.

Now, In component B, you can read data in any action as Component A's context is already having data.

The WDDOINIT( ) method of component B is called first and then WDDONIT( ) method of used component A get called on instantiation.

So, set data in component A's WDDOINIT( ) method and read data in any method of Component B - not in WDDONIT( )

Hope this helps you.

Regards,

Rama

former_member222068
Active Participant
0 Kudos

Hi Venkat,

1. If you are writing code in Component B, yes this works.

2. If you have written code in component A, then follow the steps what I had mentioned.

  

Note: You can call only the custom interface methods in other components.

Thanks & Regards,

Sankar Gelivi