cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a method of other webdynpro component

Former Member
0 Kudos

Hi Experts,

I have 2 webdynpro components , I need to call a method of one webdynpro component from other webdynpro component method.

Methods are in View.

Kindly help.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member283828
Participant
0 Kudos

Hi Bijal,

first of all in the child component's component controller method(which you want to expose to another component) must be checked in the interface column.

Double click on the webdynpro project(parent component)->In the used components tab, in the column of component type the child project name(whose method you want to call) and in component usage column give any name->save the project.

goto the controller(VIEW or COMPONENT) from where you want to call the method->click create controller usage->select the interface controller of the child component->save the project.

click the code wizard->select method call in used controller->select the child component interface controller ->select the method you want to call.

Hope the above navigation helps.

Cheers,

Kiran Kumar

Former Member
0 Kudos

Hi,

You have to follow the following steps:

For your better understanding i am using the terms C1(component1) and C2(component2). C1's method M1to be used in C2.

- Declare the method of the C1, and check the Interface property of the method in the component controller of C1.

- Declare the component usage of C1 in C2. Double click on component name->USed Components Tab ->Enter the name with which you want to refer the C1 in C2 in the column "Component Use", give the name of C1 in the column in "Component".

- Goto any method of the component controller where you want to call the method M1 of C1. Goto to the code inspector icons and choose the option "Method call from used controllers". Press F4, you will see your method and C1 name. select it and your job is done.

Best Regards,

Ashish.

Answers (0)