cancel
Showing results for 
Search instead for 
Did you mean: 

Calling assistance-class of any active-component during runtime

former_member211591
Contributor
0 Kudos

Hi all,

my development is getting more and more complex. Thus I've got a very long and complex list of active components(abbr. comp) during runtime. For instance, comp1 (starting comp) calls comp2, comp2 calls comp3 and so on.

While debugging comp4 I can see the active components like comp1->comp2->comp3->comp4.

Let's say comp4 needs a value out of comp1's assistance class. So I got an idea... why shouldn't I be able to directly access the comp1s assistance class instead of trying to forward the value through the interfaces of comp2/comp3 to comp4,

So my question is, is it possible to access the active components (assistance class) during runtime? If yes, how?

Thank you very much in advance.

Regards

ismail

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can create a interface method in your main comp.controller which returns the wd_assist object.

from any other used components you can call this method and get the instance object.

former_member211591
Contributor
0 Kudos

Ok, sounds good. But how can I call the interface-method of comp1 without creating a component usage of comp1 in comp4? (How do I get the reference to comp1s compcontroller?)

former_member211591
Contributor
0 Kudos

I figured out a different solution,

I created a reference to the assistance-class of comp1 as a static attribute to the assistance-class himself.

After setting this static attribute in WDDOINIT of comp1 (to wd_assist), I was able to get the reference from everywhere by retrieving the static attribute.

Answers (0)