cancel
Showing results for 
Search instead for 
Did you mean: 

Access a node of another WD Component

Former Member
0 Kudos

Hi Everybody,

i have two Development Components (A & B). Every Development Component has its own WD Component. In addition to it, DC (A) had embedded DC (B) through Used WD Component. How can i get access to a node of DC (A) from DC (B). I can also solve my problem if i could call a method of the DC (A) from DC (B)?

I am new to WD4J, so can you please describe the process step for step for me?

regards,

Sid

Edited by: Sid Mopo on Feb 17, 2009 11:38 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you want to share context from DC A to DC B then add DC A as used DC in DC B. Map your DC A's component context to the interface controller. Now, in DC B, you can get the context of interface controller of DC A and ready to use it in DC B.

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

thank you for your replay. My problem is that i can not add DC (A) as shared Component to DC (B) because DC (B) is just added in DC (A) as shared component.

regards,

Sid

chander_kararia4
Contributor
0 Kudos

Hi Sid,

Checkout his:-

[;

or,

Add comp1 as used Webdynpro component in comp2. By this, you can see the interfacecontroller of comp1 in comp2.

1) Add a method in interface controller of comp1 to call method of comp controller of comp1.

2) LInk the inteface controller of comp1(used Comp) with comp2 in Diagramview of Comp2.

3) call the method from comp2 controller as

wdThis.wdgetcomp1Interfacecontroller().method();

By this you can have only one way communication, like you can call comp1 from comp2, but you can not call comp2 from comp2. But the above method may solve your requirement.

If you want two communication you need to use Component Interface Definition, for this see the below doc

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0409d83-5ed5-2910-ef91-e41da6d5b8b4]

Regards

Chander Kararia

# Please close the thread once get the correct answer. Give rewards for answers.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sid,

You cannot have cyclic dependency, hence you will not be able to add dependency of DC 'A' in DC 'B' at present.

First, you have to delete the dependency of DC 'B' in DC 'A' & then you add the dependency of DC 'A' in DC 'B'.

Kind Regards,

Nitin