Jdev11g: Possibility to determine component which has the focus ?

Hi,
we have a customer request to display (internal) informations about the field and the corresponding VO which has the cursor focus at the moment (for problem analysis purpose)
If the mouse cursor is in an input field and the user press a button or select a context menu he want to see this information e.g. in a popup.
Is it possible to determine the component ID of the field which has the focus? (hopefully the input field does not loos the focus if user opens e.g. the context menue)
If yes, whats the best way to find from the component ID to the corresponding VO?
11g, ADF BC
regards
Peter

Peter, sorry for the mix up.
getContextComponent(..) is one of my private helper methods for a special case. I think you don't need it in your case. Check the UIComponent you get back from actionEvent.getSource() if it's the input field you are looking for, if not check its parent.
In my method I walk down the component tree to get a special component I'm interested in.
Heres the code:    private UIComponent getContextComponent(UIComponent aUI)
        try
            UIComponent ui3 = aUI.getParent().getParent();
            Map<String, Object> attr = ui3.getAttributes();
            String obj2 = (String) attr.get("_launchId");
            UIComponent uiXXXX = JSFUtils.findComponentInRoot((String) obj2);
            if (uiXXXX.getChildCount() > 0)
                UIComponent uiC = uiXXXX.getChildren().get(0);
                return uiC;
            else
                return uiXXXX;
        catch (Exception e)
        return null;
    }Timo

Similar Messages

  • JSF: How to determine which element has the focus?

    Hi all,
    I have a JSP with some input fields and a text area. When I press "ENTER" the data I have entered should be saved. That works fine (I use JavaScript to catch the keyPressed-event). But when I want to insert a new line in the text area, I press ENTER too and this invokes the javascript function. So it�s not possible to insert a new line in the text area. And I don`t want to save the data when I�m just inserting a new line.
    is it possible to determine which element has the focus at the moment of pressing ENTER? if it`s the text area then I won�t save the data and inserting a new line is possible? Or how to say: "Insert an new line if the user presses SHIFT+ENTER" or something like that?
    I�m using JSC for my application and this is my JS-function:
    function checkIt(evt)      
    var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
         if (charCode == 13)
              document.getElementById('form1:bt_Save').click();
              return false;
              return true;
    I�m looking for something like that:
    if(charCode == 13) {
    if(document.getElementById('form1:textArea').hasFocus())
    doNothing...
    else {
    document.getElementById('form1:bt_Save').click();
         return false;
    thanks for any help

    Hi,
    I searched through many forums (js of course too) but
    I couldn�t find a solution. Everybody knows how to
    set the focus but not how to get it. We often use
    JSF/JSP with javascript and maybe somebody here has
    another approach to this problem (how to solve it
    using jsf itself or anything else)?Take easy. I just suggested to search in a JavaScript forum , in your question you didn't mentioned this. Good luck man.
    Cya.

  • I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my do

    I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my documents

    I just uninstalled it and am waiting for it to reinstall. I sincerely hope that I have not lost everything that I worked on so hard. Now that mobile me is gone, I have not been able to go between devices to transfer things. I was merely trying to take a document I had worked on and open it in pages, but it said my version was too old. When I updated, it wouldn't load. Now I cannot do anything. I hope that the reinstall fixes it without losing everything. Please advise!!! Yes, I am in panic mode.

  • I cannot add a Wi-Fi guest network. Gone to Utilities Airport Utilities and all get is an image/browser of my Airport Extreme. Looking for the browser which has the title Wireless but cannot find anywhere. I need help?

    I cannot add a Wi-Fi guest network. Gone to Utilities>Airport Utilities and all I get is an image/browser of my Airport Extreme. Looking for the browser window which has the title Wireless but cannot find anywhere. What am I doing wrong?

    Open AirPort Utility. The first screen looks something like this:
    Click on the AirPort Extreme and another screen will appear. Click Edit, then the window with the Wireless tab will appear.
    If you do not see these screens, you will need to start over and configure your AirPort again.

  • HT201342 How will this benefit me. I have a Mac computer that i upgraded to Mountain lion, a macbook pro and an iPhone 4s which has the latest software. all i want is simplicity and to have one email account which which will not duplicate everything 4 or

    I have been asked to set up an Icloud account by Apple.
    How will having another icloud email benefit me. I have my work email which is all i require, but had to set up a @me account to get email on my Macbook.
    I have a Mac computer that i upgraded to Mountain lion, a macbook pro and an iPhone 4s which has the latest software. all i want is simplicity and to have one email account which which will not duplicate everything 4 or 5 times.
    My notes are duplicated, i have to delete my emails individually on all devices so whenever i put my phone on, all the emails i have deleted at work re-appear on my phone and again the same thing happens on my Macbook pro. I seem to spend all my time deleting emails 3 times.
    Is there something simple in the set up of these that i am missing?
    Any help would be appreciated

    I have been asked to set up an Icloud account by Apple.
    How will having another icloud email benefit me. I have my work email which is all i require, but had to set up a @me account to get email on my Macbook.
    I have a Mac computer that i upgraded to Mountain lion, a macbook pro and an iPhone 4s which has the latest software. all i want is simplicity and to have one email account which which will not duplicate everything 4 or 5 times.
    My notes are duplicated, i have to delete my emails individually on all devices so whenever i put my phone on, all the emails i have deleted at work re-appear on my phone and again the same thing happens on my Macbook pro. I seem to spend all my time deleting emails 3 times.
    Is there something simple in the set up of these that i am missing?
    Any help would be appreciated

  • I have been editing a document on my MacBook Pro and iPad, which has the newer versions of Pages. Now, I cannot open on My MacBook. It says I need a newer version of OS. However, I'm not showing a newer version being availabe!!! Can anyone help???

    I have been editing a document on my MacBook Pro and iPad, which has the newer versions of Pages. Now, I cannot open on My MacBook. It says I need a newer version of OS. However, I'm not showing a newer version being availabe!!! Can anyone help???

    That is Pages for iPad v2.0, which Pages '09 v4.3 can't read.
    You need to either stick with the older version of Pages on the iPad or get Pages 5 for the Mac which is only available if you are running OSX 10.9 Mavericks.
    Unfortunately that is not the end of your woes because Apple has made iCloud convert the files to Pages 5 now, and Pages 5 has over 90 features deleted on top of doing a shocking job of converting older Pages files.
    Peter

  • I have a new hard drive on my imac  I want to sync my ipad(which has the files I lost when my old hard drive died), which holds the files I lost when my old hard drive died.  How can I sync my ipad with my new hard drive?

    My hard drive on my IMac died, so I have a new hard drive.  I want to sync my Ipad(which has the files I lost when my old hard drive died) back with my IMac. How can I sync my Ipad with my new IMac hard drive without erasing my legacy files on the Ipad at the same time?

    Copy everything from your backup copy of your cpomputer to your new hard drive.

  • I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA tbs around the house is this possible and if so which is the best NAS drive to buy???

    I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA tbs around the house is this possible and if so which is the best NAS drive to buy???

    ged2001 wrote:
    I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA TV's around the house is this possible and if so which is the best NAS drive to buy???
    i don't have any experience with DLNA TV's but i recently moved my iTunes library to a NAS. streaming content to airport express remote speakers and TV2 works great. however, i have all my gear hardwired to my time capsule (except the airport express) so i'm not sure how well streaming e.g. HD movies to TV over wifi works.
    i have a Synology DiskStation 411j and am very happy with it.

  • I need to get photos off a water damaged iPhone 3GS. Can I take out the component that has the photos (is this the main board?) and put it into another of the same phone to retrieve the photos? Please help

    I need to get photos off a water damaged iPhone 3GS. It spent time underwater, saltwater. I let it dry for a week, turned it on, the apple symbol came on, then it died. I need to retrieve my photos off it. Can I take out the component that has the photos (is this the main board?) and put it into another of the same phone to retrieve the photos? Please help

    You're talking about the logic board. The two most likely things to get toasted, with water damage, are the battery(it shorts out), & the logic board. The worst water damage would be salt water. I'm afraid your logic board is toast.

  • When I take my phone off charge in the morning I get an info box on the front which has the sound trumpet icon with a line through it and the word Mute.  The only way to get rid of it is to reboot the phone any ideas as to how I can stop this happening?

    When I take my phone off charge in the morning I get an info box on the front which has the sound trumpet icon with a line through it and the word Mute.  The only way to get rid of it is to reboot the phone any ideas as to how I can stop this happening?

    Hello cor-el, thanks for your reply. I changed my settings for downloads to desktop and it has appeared on there. When I double click I am asked which program I want to open file. I click firefox and another box "opening install" says I have chosen to open the file which is an application and do I want to save it. This is the only real option so I press save file. I get a box saying this is an executable file which may contain viruses - do you want to run. I press ok and the final box showing C drive file name and desktop appears stating application not found.
    This happens the same whenever I try to install.
    To my untrained eye the application is not being recognised as an application and I cannot work out how to get it to do that.
    My plugin is still showing as out of date.
    Is there anything you could suggest. Thanks for your time.

  • I'm not able to install windows 7 in my imac 21' which has the latest OSX 10.9  It keeps saying that I need a 64bit version of win7 which i actually have but it doesn't seems to be recognize as one.

    I'm not able to install windows 7 in my imac 21' which has the latest OSX 10.9
    It keeps saying that I need a 64bit version of win7 which I actually have but it doesn't seems to be recognize.
    Can someone help me out?
    Thank you

    To my knowledge there are no official MS Windows DVDs that contain both the 32 and 64 bit versions. There is a way to make a USB thumb drive that has both bit version on it but AFAIK this can't be done on a DVD disc even with a Dual Layer DVD disc.
    For the Windows installer to function, actually boot the system to the install routine, certain files have to be on a certain area of the DVD disc. If by chance you really do have a DVD disc that contains both bit versions your Mac is only seeing the 32bit version on that disc.
    You'll need to get a Real MS DVD of just the 64bit version or download the 64bit version ISO from My Digital Life and burn it to a DVD disc.
    Pedroapple wrote:
    In fact i'm using a DVD with both 32 and 64-bit win7. But it's the only one I have. I don't want to install the newest Win 8.
    So you're saying there is no solution for this?
    Thank you so much for your response.

  • Help needed to log into an Open Directory account which has the same username as the local account

    Hello,
    I have successfully setup a Mac OS X Lion Server and it is an Open Directory Master. On the server Ihave created an account with the name 'Connor'. I have numerous Macs (allrunning OS X 10.7 Lion) connected to this server but on one of the Macs thereis a local account with the name 'Connor' too (the local and networked accountshave different passwords). I want to log into the Open Directory account onthat mac. So, I have done an authenticated bind to the server, but when I go tolog in the password box shakes. I think the computer thinks I am trying to loginto the local account and not the Open Directory account. On Windows, I canlog into either the local accounts or the networked accounts by typing\LOCAL-COMPUTER-NAME\Connor. So, I was wondering if there was a similar commandto do this on Mac.
    I don't think I haveworded this very well, so if someone doesn't understand please ask me somequestion about the problem and I will try and explain it better.
    Any help would be greatlyappreciated,
    Connor

    Maybe I didn't make myself clear. I have used directory utility to do an authenticated bind to my server. I also have no problem logging into other accounts in the Open Directory. But, I just can't log into the account which has the same name both in the Open Directory and locally.
    Was there something I missed in Directory Utility? Could you please help me if this is so.
    Thanks for replying so quickly

  • The toolbar which has the go back button, refresh button, etc. is gone. How do I get it back?

    The tool bar which has the url of the page I am on, go back button, refresh button, etc. is gone. How do I get it back?
    == This happened ==
    Just once or twice
    == a couple weeks ago.

    The toolbar which has the view button is also missing.

  • I created a photo album on my iPhone 4s - edited photos etc. but I cannot figure out how to transfer it to my pc (using Windows 8).  The only folder in the iphone drive is the one which has the Camera roll photos :( Help please - I really need the photos!

    I created a photo album on my iPhone 4s - edited photos etc. but I cannot figure out how to transfer it to my pc (using Windows 8).  The only folder in the iphone drive is the one which has the Camera roll photos Help please - I really need the photos!

    The camera roll is not part of the sync process at all.
    You should be importing these photos to your computer regularly as you would with any digital camera.  Youc an organize them on your computer and sync the to the iphone if you wish.
    The photos sync from the computer to the iphone is one way.
    The iphone mirrors the selected content of the computer to which it is synced.

  • I have downloaded a movie which has the extension .m4v.  This will not play on my CD player and I can't find software to convert to a more universal DVD format.  Can anyone help?

    I have downloaded a movie which has the extension .m4v.  This will not play on my DVD player and I can't find software to convert it to a more universal format.  Can anyone help?

    If you've bought a film from iTunes then you can only copy it to a DVD or CD for backup purposes, you won't be able to watch it on a stand-alone DVD player.

Maybe you are looking for

  • Internet Services For ESS In ECC 6.0

    Hi Gurus, Actually i'm trying to find the ESS Internet Services in ECC 6.0. We are planning not to use Web Dynpro appl for the moment and to use ECC 6.0 with integrated ITS using the internet services. In ECC 6.0 under the transaction SE80 i'm serach

  • Filtering using data from a spreadsheet in WebI

    I need to convert a BO6.5 Full client report to a BO XI R3.1 WebI report.  The report needs to use data from an Excel spreadsheet to filter data from a universe, and in 6.5 this was achieved by creating a universe for the spreadsheet data and using '

  • Problem while uploading text file through portal into WebDAV repository .

    Hi all... I am not able to upload any file through portal onto my webDav repository for remote server however reverse is possible i.e. any document created at remote server is reflected in portal. Everytime when i try to upload file though portal , i

  • Shared objects failing

    Does anybody know why a Flash 7 projector file that saves shared objects would suddenly stop working? I have a multi-swf project that runs through a master projector (.exe) The master file loads in swf files as needed. Shared objects are saved to tra

  • LabVIEW constantly tries to install CVI 8.1 runtime engine

    I am testing LabVIEW on a VISTA laptop before we convert all our PC's from 2000 to VISTA. Software install looked OK including NI-DAQmx 8.72, I plugged my cDAQ-9172 in and MAX saw it correctly. As soon as I started a test panel the "CVI 8.1 Runtime E