TextInput loses focus after a collection.refresh()

Hi!
I have TextInputs inside AdvancedDataGridHeaderRenderers in my ADG making filters by columns.
But everytime I press a key (and collection.refresh() is called) to make the filter, the target text input loses focus after the call to the collection.refresh() method.
The ADG headers inputs have the same focusManager object of my parent IFocusManagerContainer, but they are inacessible by TAB (and they do not TAB to each other).
A note: My collection.refresh() method is called from inside my ADG override of commitProperties method.
Any ideas?
Thanks!

I'd first make sure you need to make a change that requires a refresh.
There are various ways to avoid/block refresh. It will depend on your needs.
There is an API on ICollectionView, there is making certain properties not
bindable and there is capturing and stopImmediatePropagation on the change
events themselves.

Similar Messages

  • JButton loses Focus after a KeyPressed Event

    Hello.
    I have a simple form with a few textfields and buttons, everyone of this components has a KeyPressed Event associated, but i pressed a key (ENTER) on a button, it loses the focus and the next button catch it (i have a specified order setted).
    The point is this only happens in the buttons, the textfields and receiving the event don't lose the focus.
    Can someone tell what is wrong ?
    Thank you.

    I tryed to make a minimalist example to post here, but i couldn't reproduce the error, so i went back to try figure out what i missed.
    I commented all the lines where i had button.setEnabled(..) and now works great, still don't know why, but it seems at some point the button loses the focus when is setEnabled(false)this is what i was doing:
    private void LoginOKButtonKeyReleased(java.awt.event.KeyEvent evt) {                                         
            if (evt.getKeyCode() == java.awt.event.KeyEvent.VK_ENTER)
               button.setEnabled(false);
               WorkerLogin worker = new WorkerLogin();
               worker.execute();
    public class WorkerLogin extends javax.swing.SwingWorker<LoginResposta, Void>
             * Main task. Executed in background thread.
            @Override
            public LoginResposta doInBackground()
             * Executed in event dispatching thread
            //@Override
            public void done()
                try
                    LoginResposta resposta = get();
                    button.setEnabled(true);
    }Edited by: noe.rocha on Feb 14, 2008 9:56 AM

  • Window Loses Focus After Modal Dialog is Dismissed

    hi,
    I need a JDialog to be opened when i click on a button in JFrame.and it should be modal so that user must not get control to its parent window and rest of the windows can be accessed.
    So, i tried setting property like setModalityType(Dialog.ModalityType.DOCUMENT_MODAL), but still unable to access all the windows not only its parent until the dialog gets closed.
    Another issue i was facing is when i close out the dialog i need to get the parent to Front of other windows in application. But in my case it was not happening.After closing the dialog, i am getting the last focussed window to front but not its parent. I tried calling getParent().toFront() in windowClosing() Listener of that dialog, But still not able to solve the problem.
    Hope someone understands my problems and give me solution.
    Hoping for quick response and thanks in advance.

    shrikanthhyd wrote:
    I need a JDialog to be opened when i click on a button in JFrame.and it should be modal so that user must not get control to its parent window and rest of the windows can be accessed.
    So, i tried setting property like setModalityType(Dialog.ModalityType.DOCUMENT_MODAL), but still unable to access all the windows not only its parent until the dialog gets closed.Perhaps you can fix this by calling the first dialog either without a parent or not as a JDialog but rather as a JFrame. Then the second dialog's modality will not impinge on the visibility of the original parent window. For instance:
    import java.awt.Dimension;
    import java.awt.Window;
    import java.awt.Dialog.ModalityType;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    class SwingFu2
        private JPanel mainPanel = new JPanel();
        public SwingFu2()
            mainPanel.setPreferredSize(new Dimension(400, 400));
            JButton showDlg1Btn = new JButton("Show Dialog 1");
            showDlg1Btn.addActionListener(new ActionListener()
                @Override
                public void actionPerformed(ActionEvent e)
                    showDlg1Action(e);
            mainPanel.add(showDlg1Btn);
        private void showDlg1Action(ActionEvent e)
            Window frame = SwingUtilities.getWindowAncestor((JButton)e.getSource());
            JPanel dlg1Panel = new JPanel();
            dlg1Panel.setPreferredSize(new Dimension(300, 300));
            JButton showDlg2Btn = new JButton("Show Dialog 2");
            showDlg2Btn.addActionListener(new ActionListener()
                @Override
                public void actionPerformed(ActionEvent e)
                    showDlg2Action(e);
            dlg1Panel.add(showDlg2Btn);
            //JDialog dialog1 = new JDialog(null, "Dialog 1", ModalityType.MODELESS); // either of these will work
            JFrame dialog1 = new JFrame("Dialog 1");  // either of these will work
            dialog1.getContentPane().add(dlg1Panel);
            dialog1.pack();
            dialog1.setLocationRelativeTo(null);
            dialog1.setVisible(true);
        private void showDlg2Action(ActionEvent e)
            Window window = SwingUtilities.getWindowAncestor((JButton)e.getSource());
            JPanel dlg2Panel = new JPanel();
            dlg2Panel.setPreferredSize(new Dimension(200, 200));
            JButton showDlg2Btn = new JButton("Show Dialog 2");
            showDlg2Btn.addActionListener(new ActionListener()
                @Override
                public void actionPerformed(ActionEvent e)
                    showDlg2Action(e);
            dlg2Panel.add(showDlg2Btn);
            JDialog dialog2 = new JDialog(window, "Dialog 2", ModalityType.DOCUMENT_MODAL);
            dialog2.getContentPane().add(dlg2Panel);
            dialog2.pack();
            dialog2.setLocationRelativeTo(null);
            dialog2.setVisible(true);
        public JPanel getMainPanel()
            return mainPanel;
        private static void createAndShowUI()
            JFrame frame = new JFrame("SwingFu2");
            frame.getContentPane().add(new SwingFu2().getMainPanel());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            java.awt.EventQueue.invokeLater(new Runnable()
                public void run()
                    createAndShowUI();
    Another issue i was facing I don't know on this one. Good luck.

  • Adobe Reader XI moves to background (loses focus) after printing

    I have noticed that if another window is open (windowed or maximized) and you print from Adobe Reader (windowed or maximized) then as soon as you send the doc to the printer, the other window will suddenly be in front of your adobe reader window and you will have to click the Adobe icon at the bottom to bring it to the front again.
    It's sort of minor but annoying for some people here and I was wondering is anyone else noticing this and does anyone have an idea how to stop the window from jumping to the back as soon as you print?
    Please help me!!!!!

    Thanks for your response. I found the problem 1/2hr after posting my question. It had to do with the setting after hitting the print que. After installing the Adobe Reader XI the setting for destination in the print window change to save as PDF. Before it was set to my default printer. I never knew that there was other places for these documents could go. Never had to use them either.
    Again thanks for responding.

  • Using web.show_document the first time makes new browser window lose focus

    Hi,
    In our application we use show_document(url, '_blank') to open our reports (as pdf) in a new window.
    Our environment is Application Server 10g Release 2 with Forms 10g Release 2 and jinitiator 1.3.1.22.
    The first time I call a report, the new browser window containing the pdf is shown but loses focus after about 1 second. The focus is then returned to the applet window. When calling a report again it always keeps the focus.
    After closing the applet window and restarting the application, the same thing happens: first report called loses focus, all others keep the focus.
    Does anyone have any idea why this is happening? We want the focus to stay on the new browser window every time...

    Hi Jeroen,
    I m also facing a problem something similar to yours. If you got any solution please let me know.
    Problem-
    Currently my application is running on Forms 9.0.4.2 and my form calls another third party which displays the image in image viewer in new browser. When user clicks on the button to display image, then I m using the following Code -
    -- Method: displayDocuments ([Ljava/lang/String;)Ljava/lang/String;
    FUNCTION displayDocuments(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JARRAY) RETURN VARCHAR2 IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
    RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'com/hli/imaging/adapter/LK_FormsImagingAdapter', 'displayDocuments', '([Ljava/lang/String;)Ljava/lang/String;', args);
    END;
    Image is displaying fine but the focus is staying on the newly opened browser. I want it to get back the focus to the forms window.Is this possible ???
    Thanks in advance
    Sai                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Second window loses focus

    Hi all,
    I set up a navigation between two wd applications within the portal. The navigation will open a new window once the user clicks a button in the first application. The navigation itself works well, however, the new window is always shown behind the portal page, in other words, it loses focus after it is opened.
    Does anyone know a way to bring the new window to the front?
    Thanks!
    Hart

    hello thomas!
    is this problem with the losing focus when you open a second window fixed now?
    can i set the focus in a new opening window manually?
    thanks for your help...
    peter

  • After recent update to ff 10 my ff loses focus when opening non-active window. ALready tried everything. Any sugestions?

    After update to ff10 widnows lose focus when migrating to a different window. tried all possible options and still the same even after recent update to 11. Any suggestions?

    After update to ff10 widnows lose focus when migrating to a different window. tried all possible options and still the same even after recent update to 11. Any suggestions?

  • Is there a way to keep the ADL open when testing CS5.5 Air apps after it loses focus?

    When I test Air applications (specifically targeting mobile) it seems that when the ADL (Air Debug Launcher) launches, it will automatically terminate the session when I click on anything else other than the ADL window.  I have been trying to use 3rd party application debuggers that provide improved memory diagnostics, but these debuggers only seem to be able to work when the application is launched through the Flash Player and not through the ADL.  Unfortunately, the Air specific code will only work in the ADL.  Is there some way to keep the ADL running even when it loses focus?  I have tried using the ADL from the Flash CS5.5 IDE as well as from the command line and both will terminate upon losing focus.

    - Transfer the app to the computer by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    - Connect the iPod to the computer and make a backup by right-clicking on the iPod under Devices in iTunes and selecting Back Up.
    - Restore the iPod from that backup. That should also update the iPod.

  • Firefox 3.6.8 does not recognize subsequent mouseclicks - window loses focus

    After updating to firefox 3.6.8 on my macbook pro (OS X 10.4.11) Firefox fails to recognize subsequent mouse clicks. You can access the page initially, but then it seems to lose focus and become unresponsive to mouse clicks until you do something to break the cycle (clicking on desktop, minimizing and resizing window, etc). I reinstalled Adobe Flash update using full installer, since others have suggested that as a possible cause, but no joy. The browser window still does not recognize mouseclicks after an initially successful page load. You can tab to the next window (for example, if you want to enter something in search) but you cannot CLICK to enter the search window, nor can you click on links on the page, etc. It is totally unresponsive.
    == This happened ==
    Every time Firefox opened
    == I updated Firefox to the version just before 3.6.8 -- then I updated to 3.6.8 to see if that fixed it -- it's still broken

    This started happening to me yesterday. All plugins are disabled, didn't help. All plugins uninstalled, didn't help. Downgraded to SP3, didn't help. I've also noticed this happen in Thunderbird, though it seems OK now.
    Sadly I've had to start using IE8 :(

  • Dynamic Action on "Get Focus" After Closing a Popup Window

    Hi,
    From one of APEX Application Pages I am calling a Popup Window where users can create a new record. In the Popup Window once the record is created and window is closed, I want to refresh the region on the main page to show the record created in the popup window.
    How do I create a dynamic action which will fire when the main APEX window gets the focus (after the popup window is closed). ?
    Any pointers will be greatly appreciated.
    Thanks & Regards,
    Ashish Agarwal
    http://www.asagarwal.com

    Assuming that you have a dynamic action in the parent page which refreshes the region
    <li> Make a note of the event which triggers your dynamic action, lets call this event A.
    <li> Create a JS function in parent page which triggers event A when called.
    For example if your Dynamic Action trigger is a button(id ="P100_REFRESH") press event
    Your JS function could be
    function Trigger_refreshRegion()
      $('#P100_REFRESH').click();
    The way in which you simulate the Dynamic action deoends on the firing event that you have used, so modify it appropriately.
    <li>Now in the pop up page, if you are closing the page in JS using smthing like window.close() or so,
    just call the parent page's refresh JS function there using the
      opener.Trigger_refreshRegion(); //whatever was the name of the function that you created.

  • Lose focus when tabbing out of autoSubmit text box in IE

    Hey,
    Using JDEV 11.1.1.4 I have a problem with tabbing from one textbox to another textbox in IE. Both text boxes have autoSubmit=true and to reproduce the problem it's like so:
    I type a value or edit the existing one into text box 1 and press Tab. The submit is done and focus is given to the second text box but only momentarily before it loses focus. The focus then is given to the window it would appear, because if I press Tab again it begins from the top of the page. This is only happening in IE (v8 is all I have tried so far). This ONLY happens when the value of the second box is null. If it has a value all works fine.
    I tried implementing various solutions including using the ExtendedRenderKitService to write javascript to the client from the bean to set focus on the text box after the partial render. The javascript is called and focus is set but then something else calls blur on it afterwards. I have verified this by putting a blur event listener on it and it gets called after I set focus on it from my own javascript!
    Has anyone experienced something similar? Just to note: It only happens in IE, and it only happens when the second text box is empty.
    Thanks,
    Ross

    Hey John,
    In reply to your message
    1). Tried on 11.1.1.6 to see if the issue is still there?Not really an option to try and upgrade and test if it works there.
    2). Made a simple test case removing as many variables as possible (e.g. do a simple screen with no DB interaction and only two fields) to see if it reproduces or it's something with your screen?Tried this an it works fine which means it is something unique to my code.
    3). Filed an SR at https://support.oracle.com with your test case
    As above it looks like it's not a problem with ADF so I will keep looking at it.

  • Word 2011 for Mac Book pro - I have found that my cursor disappears sometimes when I click on a toolbar function. I found out it is a bug, that the Mac loses 'focus'. I can correct it temporarily by clicking on Format - Font - Cancel. Any info?

    I have Word 2011 on a Mac Book Pro and have had problems with a dissapearing cursor - it makes editing tricky
    After googling it I found out that there is a bug where the Mac loses focus if you click away from the document - it also does this with italics according to other users.
    I had a play with it and found out that when I click on the toolbar in a document where this happens, the cursor disappears, e.g. changing font colour etc. And then, when I click on Format - Font - Cancel it returns
    I'd be interested if anyone else has a comment to add, please do
    thanks

    BTW (speaking as a Dad of 3 daughters in Grad school) if you don't already have and use a DropBox account, or some other similar online "cloud" based backup of your school documents, you should start doing so immediately. By keeping all of your important documents in the Dropbox folder on your computer, you have instant access to them from any other computer (or iPad), should you be w/o your computer while in for repairs (or if, God forbid, it is stolen). It's free for 2 GB of online storage, which is more than enough for a few years worth of Word documents, etc. (If you get other people to sign up via your email "invitation", then Dropbox gives you even more free storage space.) Every time you close a document, it is updated on the Dropbox servers (encrypted), if it is in the Dropbox folder (assuming you give it a few seconds to update before turning off your computer). Do a google search of "Cloud based storage comparisons" to compare the amount of free space each of the competing services give you.

  • I need to execute a formatted search when the field loses focus

    Is this even possible?  I do NOT want to force the users to press shift-f2 every time to validate/search on every field on the form.  This is absurd.  How can I trigger a formatted search on a field when it loses focus?
    I tried activating menu item #7425, but it's not executing the one on the field that loses focus, but a different one.  I guess it only works on the active field??
    I tried catching an earlier event, but after it executes the formatted search on the right field, it places the value on whatever field just gained focus instead of the one it was assigned to.
    Any ideas here?  We cannot force our users to press shift-f2 on all these fields!
    The only other idea I have is to not use a formatted search but instead try to create some sort of popup form with a grid and my own query.  There has to be an easier way, right?

    Bryan:
    I use the following on a KeyDown event for when the User tabs out of a field after entering data if the data they entered is not valid.  Perhaps you could try this in the LostFocus event:
    g_B1Connection.Application.SendKeys("+")
    Also, I have used this in the KeyDown event:
    DisplayLookup("txtWO0")
    Private Sub DisplayLookup(ByVal objText As String)
            Try
                WOItem = WOForm.Items.Item(objText)
                WOItem.Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                g_B1Connection.Application.SendKeys("+")
            Catch ex As Exception
                g_B1Connection.Application.MessageBox(ex.Message, "Ok", 1)
            End Try
        End Sub
    Thanks,
    EJD

  • Xkbmap option gets reset everytime X loses focus

    Hello,
    Since my last update (2015/02/05), the xkb option
    caps:swapescape
    gets removed everytime X server loses focus. By "lose focus", I mean switching to virtual console, triggering sleep, triggering suspend, etc.
    EDIT: This situation changed. Suspend and sleep no longer drops swapescape. Only virtual console drops it.
    Here is the output of setxkbmap -query before and after jumping to virtual console (ctrl+alt+f2):
    [22:52:57 ~]$ setxkbmap -query
    rules: evdev
    model: pc104
    layout: ca,us
    variant: multi,
    options: caps:swapescape,numpad:microsoft
    [22:53:00 ~]$ setxkbmap -query
    rules: evdev
    model: pc104
    layout: ca,us
    variant: multi,
    options: numpad:microsoft
    [22:53:05 ~]$
    The swapescape option got dropped. Another option I tried was to run:
    [22:53:05 ~]$ cat .speedswapper
    ! Swap caps lock and escape
    remove Lock = Caps_Lock
    keysym Escape = Caps_Lock
    keysym Caps_Lock = Escape
    add Lock = Caps_Lock
    [22:53:05 ~]$ xmodmap ~/.speedswapper
    While this successfully swaps esc and caps,  it does not stick (switching to console reverts the change)
    I'm not exactly sure how I could fix that. Is there a way I can execute some code every time X unhangs? Is there a way to punch in the esc <-> caps flip in the XKB layout map?
    Extra info:
    this is my .xinitrc file:
    setxkbmap -layout ca -variant multi -option caps:swapescape -option numpad:microsoft
    After boot, the caps:swapescape is not enables. A quick
    setxkbmap -option caps:swapescape
    applies the option.
    EDIT: This situation changed. Suspend and sleep no longer drops swapescape. Only going to virtual console drops it.
    Last edited by morphheus (2015-02-06 21:03:39)

    No success with the X config file: the appropriate keyboard loads, but not the swapescape option.
    I use an X config file to swap ctrl and caps. Are you sure you're doing it right?
    $ ls /etc/X11/xorg.conf.d/
    00-keyboard.conf 20-nouveau.conf 30-fonts.conf
    $ cat /etc/X11/xorg.conf.d/00-keyboard.conf
    # Read and parsed by systemd-localed. It's probably wise not to edit this file
    # manually too freely.
    Section "InputClass"
    Identifier "system-keyboard"
    Driver "evdev"
    Option "XkbLayout" "carpalx"
    Option "XkbOptions" "ctrl:swapcaps"
    EndSection
    The swapescape still gets cleared on switching to Virtual console.
    Presumably you're falling back to however you were doing it before, so it's no surprise it still gets cleared right?
    As to workarounds, I think your best option is to figure out why the right solution is not working. 1) may be more complicated than you expect; 2) definitely won't work; 3) a lot of time & effort for little reward.

  • Jframe lose focus with jdk 1.4 beta90

    My jframe has two JInternalFrame. One contains a jtree, another contains a jeditorpane. A jpopup menu will appear, after I click the jtree. After I finish the jpopupmenu action, my jeditorpane can not recieve any keyboard event. The only workaround is to switch to any other application, then click jeditorpane again.
    I trace the status of the JFrame.
    1. JFrame get focus
    2. after click jtree, JFrame lose focus
    3. After finish the jpopup menu action, JFrame should gain focus. but JFrame doesn't get that.
    How can I figure it out. Any advice would be highly appreciated.

    i believe it is a bug of jdk14

Maybe you are looking for

  • ADT Sequence help!

    public Document(String name) docName = name; // Read existing doc contents (if any) try File docFile = new File(docName); if (docFile.exists() && docFile.isFile() && docFile.canRead()) BufferedReader docFileReader; docFileReader = new BufferedReader(

  • HT204384 USB Port and SD card port not working

    My USB ports and my SD card port do not work. They have both worked previously, but now do not read anything on my new Mac Book Pro.

  • Oracle Report in a J2EE Architecture

    Dear All, I have for this architecture: - Database Layer Oracle 8i in future 9i - Application Server Tomcat is possible to integrate this architecture with a Oracle Report Server? If yes how to transform the architecture? Thank's bye

  • Changing application Name

    Hi.. I need to change the name of an application. For this I am doing the following steps: Under the src->packages folder... there is a file application.wdapplication. I am changing this file name to newapplication.wdapplication. Then I am importing

  • Saving iPhone Voicemails to iTunes

    How do you transfer, or save, iPhone (original) voicemails to iTunes?