on 03-29-2005 4:02 PM
Hello,
When I want to create a function on the Component level, where should I put it: At the component Controller or at the component interface and why?
And after I created such function how can I activate it from a certain view inside this component?
Roy,
1. If your function defined on Component Interface it is available for other components (that will embed your component). Also it is available as described in [2].
2. If function defined in Component Controller or Custom Controller it is available to any controller within your component (Interface, View, Custom) but not available outside.
3. If function defined in View Controller, then it is available only to this view controller.
[1] and [2] assumes adding controller via "Required Controllers" list on "Properties" tab of embeder.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roy,
Methods in the component controller are written when u want to write global function which u want to access in all the views of the component.If u want to expose some of ur functions to other components then u use interface controller.
If u want to access a method in the component controller from the view in the same component add the controller to the required controllers in the properties tab and in the view implementation access it using
wdThis.wdget<<Comp Controller Name>>.<<Method Name>>.
If u want to access the function of the interface controller in the other components add the public part to the used Dc's ,Add the component in the Used WebDynpro Components and then add the interface controller to the required controllers in the properties tab and in the view implementation access it using
wdThis.wdget<<Interface controller Name>>.<<Method Name>>.
Hope this answers ur question.
Hello Sowjanya,
I have created a public test method at the component controller but when I use in a certain view this syntax:wdThis.wdget<<Comp Controller Name>>. I don't receive the method I've created (I've rebuilt the porject after I've created the function and before I tried to access it from a certain view). Am I missing something here? what did you mean when you said: "If u want to access the function of the interface controller in the other components add the public part to the used Dc's ,Add the component in the Used WebDynpro Components..."?
Hi Roy,
I think u didnot add ur component controller in the required controllers in the view properties tab.Then only u will be able to access the component controllers method and context value attributes.Just check it.
Suppose U are developing a two webdynpro development components say dc1 and dc2.If u want to access the component of dc2 in dc1 you use that procedure I mentioned for interface controller.
Hi Roy,
in your Component Controller or Custom Controller go to the Method tab , select New, create methods as per your requirement i.e. method or event handler, you can also mention some parameters. In the implementation body the signature of the method will be created as per this configuration. Write your code in that place. The Others section is only for local usage so it wont be visible to other controllers.
Shubhadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.