Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to access Root AM from a nested AM

h0sJun 5 2012 — edited Jun 5 2012
Hi,

I have a Root Application Module, and 2 nested Apllication Modules :

RootAM
|_NestedAM1
|_NestedAM2

In a view object executeQuery() method, published on NestedAM1, I would like to call a public method published in NestedAM2.

I try to do something like this :
    @Override
    public void executeQuery() {
        BasicApplicationModuleImpl rootAm = (BasicApplicationModuleImpl)this.getRootApplicationModule();
        NestedAM2Impl nestedAm2 = (NestedAM2Impl)rootAm.findApplicationModule("NestedAM2");
        
        String lanCode = (String)nestedAm2.myMethod();
        this.setutiLanCode_BV(lanCode);
        
        super.executeQuery();
    }
But "this.getRootApplicationModule()" give me NestedAM1 and not RootAM. So I don't know how to access the NestedAM2 application module.

Do you know how I can do this?

Thanks.
This post has been answered by John Stegeman on Jun 5 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2012
Added on Jun 5 2012
6 comments
580 views