on 2014 Jan 23 12:24 PM
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
Thanks again. So what i understand is that the data is to be flown automatically from Component A to B.
The context node gets filled in component A and my understanding is that being an interface node and since the mapping of component A is mentioned in component B the context node data is to be freely available in Component B without the need of any code logic. Hence that is why i mapped the table in component B to this context node but the data does not seem to flow into component B. I am left to wonder what exactly i am missing.
Any uggestion/solution will be of great help.
Regards,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi Venkat,
Steps seams to be correct. Check the logic once, whether you are able to fetch the data or not
for reference :
1. Defined component YSG_FACELESS in YSG_FACELESS_USAGE component
2. Define external context mapping between Interface controller of Faceless component and component controller of YSG_Faceless_usage.
3. Define internal context mapping.
4. Call the method of the component A
Note: Hope you should have missed calling the method.
Thanks & Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
The steps you have performed above are fine.
As you have mapped the interface node into your component B, you should be able to get the data of component A.
As you mentioned : 2. Updated the context node with data on action.
The action is in component A, so how are you triggering / calling event handler method of that action in component B.
I suspect, the action of component A is not called.
You can try setting data of context node in view method WDDOINIT( ) of component A. Now, data of context node should be available in component B.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.