cancel
Showing results for 
Search instead for 
Did you mean: 

Call a method from child DC

tony_morellet
Participant
0 Kudos

Hi all,

I have a DC with multiple components and I would like to call a method implemented in the component A from the component B, how can I do that?

Best Regards.

Toony

Accepted Solutions (1)

Accepted Solutions (1)

PradeepBondla
Active Contributor
0 Kudos

Hi,

This will be useful https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0409d83-5ed5-2910-ef91-e41da6d5...

[Web Dynpro component Reuse|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3fc1e590-0201-0010-7e8e-eca71476785e]

regards,

Pradeep

Answers (3)

Answers (3)

tony_morellet
Participant
0 Kudos

Hi all,

I have found the solution with your help.

Former Member
0 Kudos

Hi

Use Public Part of B under Used Dc of A.

Make an entry of Component B in used web dynpro components of A

In view controller of A under properties Tab enter Interface Controller under required controllers.

In view controller of A to access method of component B use this sample code.


wdThis.wdGet<view name>WindowInterfaceController().getMethod(); 

// where getMethod() is method in interface controller of B

NOTE:

Make sure using this we can not access methods from view controller of other component .

But methods from component controller of B can be accessed.

Eg

Methods of Component Controller can be called in Interface controller in same way given above and that method of Interface controller can be called in other component

Mandeep Virk

srinivas_sistu
Active Contributor
0 Kudos

Hi,

Have a look at this PDF.... will be helpful...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f07c3625-c971-2910-3a9c-ce131487...

Refer the below threads

Regards,

Srinivas.