cancel
Showing results for 
Search instead for 
Did you mean: 

Public functions in the interface controller

Former Member
0 Kudos

Hi all,

My project includes 3 components. Each component has its own Iview and public functions.

The application will run a main component that uses those 3 components.

What is the right way to call the public functions?

Should I announce them in the interface controller?

Or should I use plugging for doing it?

If I announce them in the interface controller, how I am calling them from the main component?

Thanks,

Noy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

In the interface controller of component B create a method. inside that method call the public function which you created. Now add component B in the used components of component A. go to properties tab of comonent A and add both the component usage of B as well the interface controller of B. no inside the implementation of component controller of A you can access the method like

wdThis.wdGet<component B usagename>Interface().<methodnmae>();

regards,

rahul.

Answers (3)

Answers (3)

Former Member
0 Kudos

You have to add the components to the main component by used Webdynpro components.

Add the required controllers where you want to use this (either in the view or main component controller)

Use

wdThis.wdGet(compA=the name u have to give while adding the used components to the main component)Interface().pubMethod()

AD

Former Member
0 Kudos

Hi noy,

u can declare ur Public functions inside the Interface controller globally.For declaring it gllobally u can give ur functions inside the:

//@@begin others

Functions

//@@end

Regards,

Nagarajan.

Former Member
0 Kudos

Hi,

You can put it in interface contoller and you can call that by

wdThis.wdget<Controller>().<methodName>();

Regards, Anilkumar

Former Member
0 Kudos

I can't see the public function. I try to do:

wdThis.wdGet<componentName>ComponentUsage().

And

wdThis.wdGet<componentName>ComponentUsage().getInterfaceController().

To be clearer:

I got 2 components: component A, which uses component B.

Component B has a public function in the component controller called "func1". This function is also announced as a method in the interface controller.

What I want to do is to call func1 from the component controller of component A.

Former Member
0 Kudos

Hi Noy,

First of all, create one method in compB's component interface controller. From this method call your compB's method using:

wdthis.wdget<component name>().<method name>();

Now, open your compA. Choose Used webdynpro components and add compB here.

Now, from your compA call your compB's interface controller method. In turn it will call your compB's method.

Regards,

Bhavik