on 09-12-2011 11:33 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.