How to access a nested h AM roots

Hello

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

RootAM
| _NestedAM1
| _NestedAM2

In a view object executeQuery() method, published on NestedAM1, I want 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?

Thank you.

First of all, a few comments:

(1) you are defeating the spirit of the AMs nested If VO in a nested AM depends on something in a root AM
(2) even worse, you are really defeating the spirit of the nested AMs if VO in a nested AM depends on something in a nested siblings AM
(3) you are beating the separation of concerns if VO is based on a method in an AM at all

So, I'd be looking to change my approach, if I were you.

That said, I did it in 11.1.2.2 (you don't mention a version, then I went at latest).

(1) created a simple VO based on "select user to twice.
(2) overrode executeQueryForCollection as follows:

  protected void executeQueryForCollection(Object object, Object[] object2, int i)
  {
    ApplicationModuleImpl i1 = this.getRootApplicationModule();
    ApplicationModuleImpl i2 = i1.getRootApplicationModule();

    _LOG.severe(i1.getName());
    _LOG.severe(i2.getName());
    super.executeQueryForCollection(object, object2, i);
  }

(3) created an AM called "IAmNested" and added the VO above to the data model
(4) created an AM called "IAmRoot" and added to the data model IAmNested
(5) ran the IAmRoot AM (also tested with a JSF page)
(6) a noted two messages in the window of the newspaper, who were both "SEVERE: IAmRoot.

So, in short, I don't see the behavior you report. Maybe you are actually using AOS nested root AM in this case?

John

Tags: Java

Similar Questions

  • How to access another library to the user of the account root on mac 10.11

    Hello experts, can you help me please know how to access the library of the user of an account when I am logged in as user root 10.11?

    Open the users folder, and then his home folder, choose go to folder from the Finder menu and provide exactly the library as the path. If you wish, you can put the name of the follow-up folder a / at the beginning of the path instead of double-click this folder.

    (139251)

  • How to access the chassis lable on the main stage of a nested symbol

    All-

    I have two buttons

    btnA on the main stage

    btnB is nested inside btnA

    How to access a lable of frame on the main stage of btnB

    Hi, zontaluma-

    This should work:

    sym.getComposition () .getStage () .play ("label");

    -Elaine

  • How to access method Interface Client of App Mod from an another App Mod?

    Hello

    I have an application with a model project. It contains a module of application (say 'SharedAppMod') kept at the level of the session. There a few objects in view.
    A customer util Interface method is added to this SharedAppMod that is filtering for the object of said view with the said values and returns the result set. Structure is presented below.

    By SharedAppModImpl,

    lines filterUsingSecondaryRowSet (card) {} public
    Rowset resultRowSet = null;
    String [] attrNames = (String []) map.get('zoom') ("AttributeNames");
    Object [] attrValues = (Object []) map.get('zoom') ("AttributeValues");
    String viewObjectName = (String) map.get('zoom') ("ViewObjectName");
    ......
    ......
    }

    This project has been set in the jar to lib adf file to rest projects available in the rest of the applications. In so doing, given that this method of client interface is exposed under the control of data across applications, we are able to add an entry of the method described in our def file and run it to bean managed by discover the operation binding.

    But when you want to access the same method of AppModImpl or viewObjImpl from the rest of the applications, we do not know how to access.

    Can ppl give you an idea on how this can be done?

    Thanks in advance.

    Kind regards
    Julien V

    You can add the other module of the (shared) application to your application root module (main). Double-click the application root module and select the tab "DataModel" develop research of node n 'ApplicationModuleInstances' of the other module of application on the left side of the random. Select it and it shuffle to the right. This makes it accessible from the application module root (e.g. findApplicationModule or by the method that is created by the frame).

    Timo

  • How to access the functions on my main SWF of my external SWF?

    Hello someone can help me how to access the functions on my main SWF file of a loaded SWF file?

    Forget using parent. Send an event to the place.

    btn3.addEventListener(MouseEvent.CLICK, btnClickHandler);
    function btnClickHandler(e:MouseEvent):void {
         dispatchEvent(new Event("categoryClick");
    }
    

    In your main swf file, listen for the complete event on the Loader.contentLoaderInfo.

    In the complete event handler, add an event listener for the categoryClick (or you have chosen to call it) on the loaded swf file.

    // event handler triggered when external swf is loaded
    function loaderCompleteHandler(event:Event) {
        (event.currentTarget.content as MovieClip).addEventListener("categoryClick", categoryClickHandler);
    }
    
    function categoryClickHandler(event:Event):void {
        trace("category button clicked in loaded swf");
    }
    

    And remember, whenever you use root or parent, God kills a kitten.

  • How to access my iPhone music on my iMac?

    How to access my iPhone music to my iMac?

    If you ask how to move music from your Mac to your iPhone, you use iTunes for this. Apple can explain this better in moving content to iTunes on your computer to your iPhone, iPad or iPod touch - Apple Support

  • How to access iTunes game library on a computer without iTunes

    There used to be a way to access my iTunes online library. I have access to iCloud Drive and I have iTunes game, but I can't understand how to access my library on a computer where I can not download iTunes. My understanding is that it was the goal to Match iTunes, so I feel like I'm missing something.

    Hello

    What kind of computer you have and what operating system?

    Jim

  • How to access my voicemail from another phone?

    My Iphone is stuck in reboot mode (the logo remains on the screen) and when I connected to itunes and tried the update, I got error message 4013, saying that it cannot be updated and I need to restore. Is there another way to fix it without having to restore and lose all my data?

    You have asked two different questions here. If you receive an error 4013, then take a look at this document of support for the troubleshooting steps.  If you see the 9-4005, 4013, 4014 error when you restore your device iOS - Apple Support

    With regard to access to your voicemail from another phone, you must talk to your cellular operator and know how to access voicemail from another phone. They control the voice mail and would be able to explain their procedures, if you don't find anything on their website. It usually requires that call you your phone number, then press a series of buttons to enter your password to enter the voicemail server.

  • How to access the info in my iCloud account

    How to access the info in my iCloud account?

    You can access much of the iCloud.com on a computer or through specific applications on your mobile device such as contacts, calendars, iCloud Drive, Photos. What exactly you were looking for and what type of device.

  • I installed LeechBlock and now I can not find! Can someone tell me where and how to access it?

    Hello

    I'm new to using addons, so please forgive my ignorance. I installed LeechBlock and now I don't see where to find it. Can someone tell me where and how to access it? I looked under Addons on the Tools menu, but this is just options to install addons more.

    I thought there would be a button on the toolbar, or even a new toolbar, but I don't see anything...

    Thanks in advance!

    Hi, you are almost there! When you look at the Add - ons you must select the Extensions on the left side, and you should see and your AdBlock plus. It can also be a button on the bar of 3 menu - but I'm not familiar with that particular module so cannot be sure about that.

    Hope that helps.

  • I don't have any encryption under the options tab. This can be corrected? If this is not the case, how could access it?

    When I go to Options on the Advanced tab, there is no encryption between update tab and certificates. How would access the encryption info?

    There is no encryption tab in current versions of Firefox.

    The current releases of Firefox no longer have a setting in the user interface to disable TLS or SSL3 and you must make the change on the subject: config page and edit two prefs.

    SSL3 is enabled by default in the current version of Firefox (security.tls.version.min = 0) and TLS to TLS 1.2 versions (security.tls.version.max = 3).

    You can change the preferences of security.tls.version.min and security.tls.version.max to define what TLS versions are enabled.

    You will need to close and restart Firefox after you change these prefs.

    security.tls.version.min = 0 (1 will disable SSL3 and only enable TLS)
    security.tls.version.max = 2 (0 will disable TLS 1.0 and higher, leaving only SSL3 enabled)
    
    0 means SSL 3.0, 1 means TLS 1.0, 2 means TLS 1.1, 3 means TLS 1.2 etc.
    
  • How to access the bios?

    I am trying to install a new OS, how to access the bios on my HP Pavilian dv8?

    Hello:

    You should be able to access the BIOS by pressing the F10 key as soon as you see the HP welcome screen.

    Paul

  • I don't see how to access my e-mail account in Firefox. Help!

    I just switch to Firefox and do not see how to access my e-mail account, which is with Comcast. I'm missing a few very basic step and need help.

    http://Xfinity.Comcast.NET/

    You cannot use the E-mail button on this page, just above my profile XFINITY?

  • How to access the BIOS on a Pavilion Elite e9237c with mouse and keyboard wireless?

    I have a desktop computer Pavilion Elite e9237 with a wireless keyboard and mouse. I tried to access the BIOS by pressing F10 at startup with no luck, and I can't access any of the other menus for the start-up eiither. I don't have a PS/2 port on my computer, so I can't get a wired keyboard and mouse. Does anyone know how to access the BIOS with this configuration?

    I bought a USB keyboard and he answered in the same way... No bios access. I then studied why it did not work and discovered that it was the way in which he has been connected to the computer. I had initially plugged into a USB hub when he was not working and I moved it directly into a USB port and it works! I plugged my keyboard wireless directly into the USB port and it works too! Thanks for your help... I wouldn't have thought of it if it wasn't for to recommend you the USB keyboard.

  • How to access the firefox on laptop Office keeping all the features?

    How to access the firefox on laptop Office keeping all tabs and bookmarks?

    Hello

    You may be able to do this in Firefox Sync configuration on both devices. Please see for detailed instructions.

Maybe you are looking for

  • When I enter the web address "honeymark", I redirected search convertglobal

    When I use IE8, I can go directly to honeymark. Firefox goes to the site of honeymark, and then reconnects to a fruitless search for convertglobal.

  • Tecra A4: Bad DVD Firmware? Burning speed only 2 x

    Hello!I have a laptop Tecra A4 with a Matsu * a s UJ - 831 (firmware: 1.02) DVD burner.The speed of this burner is 8 x dvd - r dvd + r. But the new media in the market can only burn through 2 x speed.I tested different media e.g. Verbatim, TDK, Fuji

  • Applet JIT does not

    Hi team, Okay, so what we have observed in our network is that flow-export sometimes causes high interface utilization and as a workaround, we remove and re-add flow export commands. Now there are short burstd of traffic as well, so I want to add a c

  • No sound: Inspiron 600 m, windows xp home sp2

    someone reformatted this laptop 4 months ago and reinstall all the drivers, audio device is not read now. tried reinstalling the drivers from the site of sigmatel and the utility disk dell does not. during installation of utilities disk driver, he sa

  • Install Windows 7 Professional 32 bit - on a 64-bit of Windows 8 for dual boot computer

    Is this possible? When I get to the part where the installation is asking me to select a partition, it indicates that the drive must be in NTFS format. Windows 8 says that they are formatted in NTFS. No idea why I get this error? Help for this type o