cancel
Showing results for 
Search instead for 
Did you mean: 

Reg:node access across different controller

former_member197425
Active Participant
0 Kudos

Dear All,

I want to access the node data of Component controller of a component in another Webdynpro component for this i followed the below process.

1.Selected the interface check box of node to be accessed in component1.

2.In component2 in Component useage i gave Component1 name.

3.in the view of component2 under context i selected the controller Usage and selected component1.By this the interface node of component1 is visible.

4.I mapped that interface node to Context of component2 view.

5.In init method i tried to extract the data of interface node in view of component2.

But i am not able to get the data of component1 from interface node.it is just showing blank...................

What can be the probleum????

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

It may well be that you are accessing a different instance of the first component from your second component. (should be easy to check this in the debugger)

The examples etc given should guide you through this problem.

For a simple solution you can use the FPM to control the instantiation of your components. You can then be sure that the various component instances will share contexts correctly. - Simple is probably not the right word - but this is one of the advantages that using the FPM gives you.

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

I am forwarding an example of select-option, here they demonstrated component usage.

I hope it will help you to understand.

http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages

Regards and Best wishes.

Former Member
0 Kudos

Hi,

There is a Standard WD component WDT_COMPONENTUSAGE. In this Component they are fetching the data from the 1st component in NODE_INTERFACE in action GOTO_BOOKINGS.

Compare your application with this Standard one. Hope it helps you.

Former Member
0 Kudos

Hi,

It shuld work,

just make sure that,

1. You are not invalidating the data anywhere.

2. When trying to extract the data, make sure that you have set the data, as you are trying to extract the data in INIT method,

I doubt whether actually you have data in the node?

Regards,

Arvind