on 11-29-2005 7:15 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can put it in interface contoller and you can call that by
wdThis.wdget<Controller>().<methodName>();
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.