Avoid body focus during tabbing

After opening Firefox and placing cursor in address bar, try pressing tab button. Now focus will set on each element like Address bar, Search window, body of the opened webpage. This is where im facing the problem. I don't want firefox to set focus on the body element while pressing tab i.e whole body gets focused. And also that does not make any sense , why the focus is setting to body of the page because we cant do any stuff by setting focus to the body of the element. I tried with other browsers , which works perfectly fine. But i like to stick to Firefox, the browser which i love the most. Being a developer i tried with lots of stuffs, but couldn't make out solution for it.Can u please provide the solution for it ? or the script which will avoid the focus of body element ?

If you keep pressing the Tab key then the other focusable elements on the web page get focus, so the cycle doesn't end with focusing the body element.

Similar Messages

  • How can we prevent JTabbedPanes from transferring focus to components outside of the tabs during tab traversal?

    Hi,
    I noticed a strange focus traversal behavior of JTabbedPane.
    During tab traversal (when the user's intention is just to switch between tabs), the focus is transferred to a component outside of the tabs (if there is a component after/below the JTabbedPane component), if using Java 6. For example, if using the SSCCE below...
    import java.awt.BorderLayout;
    import java.awt.event.FocusAdapter;
    import java.awt.event.FocusEvent;
    import java.awt.event.KeyEvent;
    import javax.swing.Box;
    import javax.swing.BoxLayout;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class TabbedPaneTest extends JPanel {
        public TabbedPaneTest() {
            super(new BorderLayout());
            JTabbedPane tabbedPane = new JTabbedPane();
            tabbedPane.addTab("Tab 1", buildPanelWithChildComponents());
            tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
            tabbedPane.addTab("Tab 2", buildPanelWithChildComponents());
            tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
            tabbedPane.addTab("Tab 3", buildPanelWithChildComponents());
            tabbedPane.setMnemonicAt(2, KeyEvent.VK_3);
            tabbedPane.addTab("Tab 4", buildPanelWithChildComponents());
            tabbedPane.setMnemonicAt(3, KeyEvent.VK_4);
            JPanel panel = new JPanel(new BorderLayout());
            panel.add(tabbedPane);
            JButton button = new JButton("Dummy component that gains focus when switching tabs");
            panel.add(button, BorderLayout.SOUTH);
             * To replicate the focus traversal issue, please follow these steps -
             * 1) Run this program in Java 6; and then
             * 2) Click on a child component inside any tab; and then
             * 3) Click on any other tab (or use the mnemonic keys ALT + 1 to ALT 4).
            button.addFocusListener(new FocusAdapter() {
                @Override
                public void focusGained(FocusEvent e) {
                    System.err.println("Gained focus (not supposed to when just switching tabs).");
            add(new JScrollPane(panel));
        private JPanel buildPanelWithChildComponents() {
            JPanel panel = new JPanel();
            BoxLayout boxlayout = new BoxLayout(panel, BoxLayout.PAGE_AXIS);
            panel.setLayout(boxlayout);
            panel.add(Box.createVerticalStrut(3));
            for (int i = 0; i < 4; i++) {
                panel.add(new JTextField(10));
                panel.add(Box.createVerticalStrut(3));
            return panel;
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    JFrame frame = new JFrame("Test for Java 6");
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    frame.add(new TabbedPaneTest());
                    frame.pack();
                    frame.setVisible(true);
    ... Then we can replicate this behavior by following these steps:
    1) Run the program in Java 6; and then
    2) Click on a child component in any of the tabs; and then
    3) Click on any other tab (or use the mnemonic keys 'ALT + 1' to 'ALT + 4').
    At step 3 (upon selecting any other tab), the focus would go to the component below the JTabbedPane first (hence the printed message in the console), before actually going to the selected tab.
    This does not occur in Java 7, so I'm assuming it is a bug that is fixed. And I know that Oracle suggests that we should use Java 7 nowadays.
    The problem is: We need to stick to Java 6 for a certain application. So I'm looking for a way to fix this issue for all our JTabbedPane components while using Java 6.
    So, is there a way to prevent JTabbedPanes from passing the focus to components outside of the tabs during tab traversal (e.g. when users are just switching between tabs), in Java 6?
    Note: I've read the release notes between Java 6u45 to Java 7u15, but I was unable to find any changes related to the JTabbedPane component. So any pointers on this would be deeply appreciated.
    Regards,
    James

    Hi Kleopatra,
    Thanks for the reply.
    Please allow me to clarify first: Actually the problem is not that the child components (inside tabs) get focused before the selected tab. The problem is: the component outside of the tabs gets focused before the selected tab. For example, the JButton in the SSCCE posted above gets focused when users switch between tabs, despite the fact that the JButton is not a child component of the JTabbedPane.
    It is important for me to prevent this behavior because it causes a usability issue for forms with 'auto-scrolling' features.
    What I mean by 'auto-scrolling' here is: a feature where the form automatically scrolls down to show the current focused component (if the component is not already visible). This is a usability improvement for long forms with scroll bars (which saves the users' effort of manually scrolling down just to see the focused component).
    To see this feature in action, please run the SSCCE below, and keep pressing the 'Tab' key (the scroll pane will follow the focused component automatically):
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.event.FocusAdapter;
    import java.awt.event.FocusEvent;
    import java.awt.event.KeyEvent;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTabbedPane;
    import javax.swing.JTextField;
    import javax.swing.JViewport;
    import javax.swing.SwingUtilities;
    public class TabbedPaneAutoScrollTest extends JPanel {
        private AutoScrollFocusHandler autoScrollFocusHandler;
        public TabbedPaneAutoScrollTest() {
            super(new BorderLayout());
            autoScrollFocusHandler = new AutoScrollFocusHandler();
            JTabbedPane tabbedPane = new JTabbedPane();
            tabbedPane.addTab("Tab 1", buildPanelWithChildComponents(20));
            tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
            tabbedPane.addTab("Tab 2", buildPanelWithChildComponents(20));
            tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
            tabbedPane.addTab("Tab 3", buildPanelWithChildComponents(20));
            tabbedPane.setMnemonicAt(2, KeyEvent.VK_3);
            tabbedPane.addTab("Tab 4", buildPanelWithChildComponents(20));
            tabbedPane.setMnemonicAt(3, KeyEvent.VK_4);
            JPanel panel = new JPanel(new BorderLayout());
            panel.add(tabbedPane);
            JButton button = new JButton("Dummy component that gains focus when switching tabs");
            panel.add(button, BorderLayout.SOUTH);
             * To replicate the focus traversal issue, please follow these steps -
             * 1) Run this program in Java 6; and then
             * 2) Click on a child component inside any tab; and then
             * 3) Click on any other tab (or use the mnemonic keys ALT + 1 to ALT 4).
            button.addFocusListener(new FocusAdapter() {
                @Override
                public void focusGained(FocusEvent e) {
                    System.err.println("Gained focus (not supposed to when just switching tabs).");
            button.addFocusListener(autoScrollFocusHandler);
            JScrollPane scrollPane = new JScrollPane(panel);
            add(scrollPane);
            autoScrollFocusHandler.setScrollPane(scrollPane);
        private JPanel buildPanelWithChildComponents(int numberOfChildComponents) {
            final JPanel panel = new JPanel(new GridBagLayout());
            final String labelPrefix = "Dummy Field ";
            final Insets labelInsets = new Insets(5, 5, 5, 5);
            final Insets textFieldInsets = new Insets(5, 0, 5, 0);
            final GridBagConstraints gridBagConstraints = new GridBagConstraints();
            JTextField textField;
            for (int i = 0; i < numberOfChildComponents; i++) {
                gridBagConstraints.insets = labelInsets;
                gridBagConstraints.gridx = 1;
                gridBagConstraints.gridy = i;
                panel.add(new JLabel(labelPrefix + (i + 1)), gridBagConstraints);
                gridBagConstraints.insets = textFieldInsets;
                gridBagConstraints.gridx = 2;
                textField = new JTextField(22);
                panel.add(textField, gridBagConstraints);
                textField.addFocusListener(autoScrollFocusHandler);
            return panel;
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    JFrame frame = new JFrame("Test for Java 6 with auto-scrolling");
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    frame.add(new TabbedPaneAutoScrollTest());
                    frame.setSize(400, 300);
                    frame.setVisible(true);
    * Crude but simple example for auto-scrolling to focused components.
    * Note: We don't actually use FocusListeners for this feature,
    *       but this is short enough to demonstrate how it behaves.
    class AutoScrollFocusHandler extends FocusAdapter {
        private JViewport viewport;
        private JComponent view;
        public void setScrollPane(JScrollPane scrollPane) {
            viewport = scrollPane.getViewport();
            view = (JComponent) viewport.getView();
        @Override
        public void focusGained(FocusEvent event) {
            Component component = (Component) event.getSource();
            view.scrollRectToVisible(SwingUtilities.convertRectangle(component.getParent(),
                    component.getBounds(), view));
    Now, while the focus is still within the tab contents, try to switch to any other tab (e.g. by clicking on the tab headers, or by using the mnemonic keys 'ALT + 1' to 'ALT + 4')...
    ... then you'll notice the following usability issue:
    1) JRE 1.6 causes the focus to transfer to the JButton (which is outside of the tabs entirely) first; then
    2) In response to the JButton gaining focus, the 'auto-scrolling' feature scrolls down to the bottom of the form, to show the JButton. At this point, the tab headers are hidden from view since there are many child components; then
    3) JRE 1.6 transfers the focus to the tab contents; then
    4) The 'auto-scrolling' feature scrolls up to the selected tab's contents, but the tab header itself is still hidden from view (as a side effect of the behavior above); then
    5) Users are forced to manually scroll up to see the tab headers whenever they are just switching between tabs.
    In short, the tab headers will be hidden when users switch tabs, due to the Java 6 behavior posted above.
    That is why it is important for me to prevent the behavior in my first post above (so that it won't cause usability issues when we apply the 'auto-scrolling' feature to our forms).
    Best Regards,
    James

  • JTabbedPane - traversing focus through tabs

    I would like to have focus traverse through tabs in a JTabbedPane. That is, when the focus is on the last component of a tab, hitting the key for forward focus traverse should bring up the next tab and focus on the first component on that tab. I'm already using a custom FocusTraversalPolicy on the panel containing the JTabbedPane, which handles focus traversal between the components on the tabs. This policy has no knowledge of which tab a particular component is on.
    I was hoping calling requestFocusInWindow() would automagically focus that tab, but it doesn't. Needless to say, having the focus traversal policy cycle through all the components (including those in non-selected tabs) doesn't work, either. Is there an elegant way to do this, without resorting to listening to key events, watching for the TAB key, and switching to the appropriate tab?

    Ok. here is my suggestion.
    When the focus is going to be transferred to the other tab use tabpane.setSelectedComponent(nextPanel), it will trigger traverse policy once again, but we will catch the fact that current component is JPanel and transfer it further to our field.
    Following code looks ugly:
    order.add(tf1);
    order.add(tf2);
    parentsForward.put(p,tf1);
    parentsBackward.put(p,b2);but this is a concept demonstration only, you can hide this piece inside TraversalPolicy implementation.
    Here is the full code:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    public class TabbedFocusExample extends JFrame  {
        public TabbedFocusExample()  throws HeadlessException {
            super("Tabbed Focus Test");
            setLayout(new FlowLayout());
            JPanel p;
            final JTabbedPane tp = new JTabbedPane();
            final JTextField tf1 = new JTextField(20);
            final JTextField tf2 = new JTextField(20);
            final JCheckBox cb1 = new JCheckBox("Option 1");
            final JCheckBox cb2 = new JCheckBox("Option 2");
            final JButton b1 = new JButton("Click me!");
            final JButton b2 = new JButton("Press me!");
         //stores real components, no container
         Vector<Component> order = new Vector<Component>();
         //stores (container,first_component_in_this_container) pair
            Map<Component,JComponent> parentsForward = new HashMap<Component,JComponent>();
         //stores (container,last_component_in_previous_container) pair
         Map<Component,JComponent> parentsBackward = new HashMap<Component,JComponent>();
            p = new JPanel(new FlowLayout());
            p.add(tf1);
            p.add(tf2);
            tp.addTab("Tab 1",p);
         order.add(tf1);
            order.add(tf2);
         parentsForward.put(p,tf1);
         parentsBackward.put(p,b2);
            p = new JPanel(new FlowLayout());
            p.add(cb1);
            p.add(cb2);
            tp.addTab("Tab 2", p);
         order.add(cb1);
            order.add(cb2);
         parentsForward.put(p,cb1);
         parentsBackward.put(p,tf2);
            p = new JPanel(new FlowLayout());
            p.add(b1);
            p.add(b2);
            tp.addTab("Tab 3", p);
         order.add(b1);
            order.add(b2);
         parentsForward.put(p,b1);
         parentsBackward.put(p,cb2);
         setFocusTraversalPolicy(new MyOwnFocusTraversalPolicy(order,parentsBackward,
                              parentsForward,tp));
            add(tp);
            pack();
            setDefaultCloseOperation(EXIT_ON_CLOSE);
        public static void main(String[] args) {
            new TabbedFocusExample().setVisible(true);
        public  class MyOwnFocusTraversalPolicy     extends FocusTraversalPolicy   {
         private Vector<Component> order;
         private JTabbedPane tabbedPane;
         private Map<Component, JComponent> parentsForward;
         private Map<Component, JComponent> parentsBackward;
            public MyOwnFocusTraversalPolicy(Vector<Component> order,Map<Component,JComponent> parentsF,
                                       Map<Component,JComponent> parentsB,JTabbedPane jtb) {
                this.order = order;
             this.tabbedPane=jtb;
             this.parentsForward = parentsF;
                this.parentsBackward = parentsB;
            public Component getComponentAfter(Container focusCycleRoot,
                                               Component aComponent) {
              JComponent nextComp = parentsForward.get(aComponent);
              if(nextComp!=null){ //aComponent is Container return first component in this Container
                   return nextComp;
                    int idx = (order.indexOf(aComponent) + 1) % order.size();
              nextComp = (JComponent)order.get(idx);
              int indexCurrent = tabbedPane.indexOfComponent(((JComponent)aComponent).getParent());
              int indexNext = tabbedPane.indexOfComponent(nextComp.getParent());
              if(indexNext!=indexCurrent){ //if next Component sits in next tab go to next tab
                   tabbedPane.setSelectedComponent(nextComp.getParent());
                    return nextComp;
         //same stuff but in opposite direction
            public Component getComponentBefore(Container focusCycleRoot,
                                                Component aComponent)  {
              JComponent prevComp= parentsBackward.get(aComponent);
              if(prevComp!=null){
                   return prevComp;
                    int idx = order.indexOf(aComponent) - 1;
                    if (idx < 0) {
                          idx = order.size() - 1;
                    prevComp = (JComponent)order.get(idx);
              int indexCurrent = tabbedPane.indexOfComponent(((JComponent)aComponent).getParent());
              int indexPrevious = tabbedPane.indexOfComponent(prevComp.getParent());
              if(indexPrevious!=indexCurrent){
                   tabbedPane.setSelectedComponent(prevComp.getParent());
                   return prevComp;
            public Component getDefaultComponent(Container focusCycleRoot) {
                return order.get(0);
            public Component getLastComponent(Container focusCycleRoot) {
                return order.lastElement();
            public Component getFirstComponent(Container focusCycleRoot) {
                return order.get(0);
    }

  • How to focus the tab in Firefox 3.6 (to move to beginning/end)

    I believe in previous versions of Firefox, when the tab was focused, you could use the keyboard shortcuts ctrl+end or ctrl+home to move the focused tab to either the end or beginning of your tabs. This functionality no longer seems to work, I believe because I can no longer actually focus a tab. Previously, but selecting the tab, I'd see a little box highlighting the text inside of the tab. I can still drag tabs to different locations, but being able to move them all the way to the beginning or end with a keyboard shortcut is a lot faster.
    == This happened ==
    Every time Firefox opened
    == I believe in 3.6

    Hello,
    I had this problem too. It seems to be a request since Firefox 3.5. You must have focus on tabs bar in order the shortcuts [Ctrl][Left] and [Ctrl][Right] work. You can read information about that here: https://bugzilla.mozilla.org/show_bug.cgi?id=462289
    I made a small plugin to provide new shortcuts to move tabs: https://addons.mozilla.org/en-US/firefox/addon/220875/

  • Z30 auto-focus during video recording after OS update 10.2.1.537

    Why the autofocus doesn't work when using the BB video camera. It is strange that it will autofocus when it is not recording (video camera). It was not like that before the OS update 10.2.1...
    When video recording moving persons or objects or even when u are moving the camera should autofocus automatically.

    yeah. In other words manual focus during video recording only.

  • [svn:bz-trunk] 5034: Avoid the NPE during server shutdown.

    Revision: 5034
    Author: [email protected]
    Date: 2009-02-22 05:59:29 -0800 (Sun, 22 Feb 2009)
    Log Message:
    Avoid the NPE during server shutdown.
    Modified Paths:
    blazeds/trunk/modules/core/src/flex/messaging/factories/JavaFactory.java

    I am modifying the correct httpd.conf file on the server, it just doesn't seem to work. - If I put the rewrite rules in the <Directory /> the rewrite works but it adds /Library/WebServer/Documents to the URL.
    I also tried putting the rewrite rules in <IfModule mod_rewrite.c> but that did not work either.
    mod_rewrite is enabled and running on the server.
    I will post the rewrite rules again in the code brackets. Sorry for the long post. - If some one can try them out on their Leopard Server to see if they can get them to work, it would be much appreciated. Again, these work on my Leopard Client but I can't get them to work on Server.
    -- The httpd.conf file posted above is just the default conf file found in /private/etc/apache2/
    <code>
    RewriteEngine On
    Options +FollowSymLinks
    RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301, L]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.php(.*)\ HTTP
    RewriteRule (.+)\.php(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.asp(.*)\ HTTP
    RewriteRule (.+)\.asp(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.aspx(.*)\ HTTP
    RewriteRule (.+)\.aspx(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.htm.(.)\ HTTP
    RewriteRule (.+)\.htm.(.)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.cfm(.*)\ HTTP
    RewriteRule (.+)\.cfm(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.bak(.*)\ HTTP
    RewriteRule (.+)\.bak(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.inc(.*)\ HTTP
    RewriteRule (.+)\.inc(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\..(.)\ HTTP
    RewriteRule (.+)\..(.)$ $1$2 [R, L]]
    <code>

  • Avoid jar generation during adpatch

    Hi gurus,
    I am applying bunch(many) of patches - upgrading to 11.5.10.2 from 11.5.10.
    man of the patches spending much time on jar generation step.
    what is the way to avoid jar generation during the adpatch and run the force jar generation using adadmin later stage.
    Generating product JAR files in JAVA_TOP -
    /u01/app/applmgr/11i/ipdtestcomn/java with command:
    adjava -mx512m -nojit oracle.apps.ad.jri.adjmx @/u01/app/applmgr/11i/ipdtestappl/admin/ipdtest/out/genjars.cmd
    Thank you.

    You can stop compiling JSP files by using nocompilejsp option (I do not think there is a way to stop generating the jar files).
    AD Command Line Options for Release R12 [ID 1078973.1]
    Oracle E-Business Suite Patching Procedures, Page 2-16
    http://download.oracle.com/docs/cd/B53825_08/current/acrobat/121adpp.pdf
    Thanks,
    Hussein

  • Drag URL from location bar focuses unwanted tab

    In all of the browsers I use, I'm constantly dragging URLs from the address bar to <elsewhere out of the browser, e.g. a folder>.
    ("Because that's the way I work, that's why.")
    In or out of ffox safe-mode, and no matter where I place the tabs bar, if the dragging path crosses a tab (i.e. the tab header where the page title is displayed), that tab is focused i.e. selected AKA activated.
    This is often a big performance hit (Definition: more of a hit than I'm willing to sustain), not to mention a d**ned annoyance.
    And the re-focus initiates pretty quickly.
    I'm not dragging particularly slowly. Definitely not hovering.
    I'd be happy even with a solution which simply lengthens the interval before this happens.
    I've searched about:config for 'delay', tried changing a couple of <not very plausible> candidates, no joy.
    Using ffox 36 after a very long time of not using ffox, so I can't say if this is long-standing ffox behavior.
    TIA
    p.s. -- I.T. guy who's been doing this since before the PC/XT. As such, reeeeaallly hoping for zero replies which mention 'reboot', 're-install', 'try older', 'try newer', 'virus', 'new profile', HJT, MWB, etc.
    IOW, hey, you kids get off my lawn.
    alt keywords URL Bar, Awesome Bar, icon, favicon, anchor, tabs toolbar, mouse, pointer

    Fred, cor-el...
    Another part of "the way i work" is that most of my windows, and especially the ones i use the most, are placed:
    -- tight against the right side of the desktop (actually, a few pixels past), so that i can just slam the mouse (pointer) against that side, and thereby
    land squarely on the scrollbar without any fine manual control; and
    -- tight against the top, so i can do likewise to bring a partly-covered
    window into focus by landing squarely on its title-bar. (The windows are
    all kept at dimensions that make them overlap, both left-to-right and
    top-to-bottom, so that the lower-left corners tend to form a top-left to
    bottom-right diagonal across the desktop. That way i can easily switch to
    any window by touching an unobscured part of either its title-bar or its
    bottom border.
    The short-and-wide windows are things with a lot of columns, like directory / file trees, spreadsheets, etc., and the tall-and-narrow
    windows are the text-dominated apps like browsers and editors.)
    I already do leave part of the desktop visible at the very bottom and the
    very left. So, i can easily drag links (or other items) from a page (or drag
    the URL), either to the desktop or to pretty much any window which i
    have open and un-minimized.
    The other factor is this: i keep the "taskbar" configured to appear only when i slam the mouse (without needing careful positioning) against the
    LEFT of the desktop (so the window titles are actually wide enough to be
    legible) -- and i do likewise for the browser, i.e. have the tab bar on the
    left so that the tab titles are wide & legible.
    So, it's difficult to do the dragging without either passing over an
    unfocused tab, or moving the mouse more slowly and carefully than i'd
    rather bother with (to avoid being slowed down). About the only thing
    which would consistently work, is to carefully drag to the top (or past
    the bottom) of the browser window, without crossing an unfocused tab,
    and then to the desired drop-point.
    As i mentioned in the O.P., it would be a lot easier if there were some
    way to just *slightly* increase the x-millisecond lag between the time
    the mouse first crosses a tab, and the time the focus is switched.
    As i said, i'm back on firefox (for about 2 months) after a long time away.
    And i don't have this problem on other browsers. I don't remember how long the "change-focus delay" was on Opera12 (maybe even infinite),
    but I just now tried it on Chrome 32, and it's about 500 msec if i pause
    over an unfocused tab, and about a full second if the mouse is constantly
    moving -- IOW, plenty of time for me to "pass through the neighborhood"
    without having to think about it.
    And here's irony: on SeaMonkey (2.33), it doesn't happen **at all**.
    Unfortunately, neither Chrome nor SM seem to have a reliable,
    non-kludgey way -- not even with extensions -- to have vertical tabs as an
    integral part of the browser window.

  • How to refresh a region during tab change

    Hi All,
    In my page I have two tabs.There is one region each in each tab.
    Tab 1 region is on top of Parent View Object and Tab 2 region is on top of Child view object. Relationship is one-to-one.
    In tab 1 region, If populate some attributes <of ParentVO> then, those attribute values will be copied to the Child View Object by calling an AM method from the tab disclosure listener.
    When I switch from tab 1 to tab 2 for the first time all the populated attributes < Parent VO in Tab1 > are getting copied to child VO and I can see those values in tab 2 <UI> .
    But after that when I switch back to Tab 1 and change some attributes and go to tab 2 then, the newly populated attributes are not shown in the second tab.
    But If I go to the next page and come back to the same page then in the second tab I can see all the newly populated attributes..
    refreshCondition of the task-flow is ifNeeded.
    In my disclosure listener I am trying to refresh the region binding programmatically. <AdfFacesContext.getCurrentInstance().addPartialTarget(regionbinding)>.
    But the region in tab 2 is not getting refreshed.
    Please Help...
    Am I missing some thing here...

    Thanks a lot for your response...
    Earlier I had tried #{true} as refreshCondition. But that didn't help. And I had tried changing an input parameter value by calling a bean method [toggleValue: which will toggle the parameter RefreshFlag ]
    and keeping the refresh Condition as ifNeeded. But in this case it didn't work. Earlier I had tried this approach and it was always working.
    Now I will try with the option you gave me.. Calling refresh method of UIXRegion. The method seems to be the exact one which I was looking for from the doc.
    The documentation says...
    refresh
    public void refresh(javax.faces.context.FacesContext context)
    Refreshes this region's model. This method calls RegionModel.refresh(javax.faces.context.FacesContext), and adds this region as a PPR target. This method must only be called during PhaseId.INVOKE_APPLICATION phase. A RegionNavigationEvent is always queued.
    So can I call this method on a tab disclosure listener..?
    Or Do I need to check for the Phase and call this method.. It would be great if you can make it a bit more clear.
    Do I need refresh or refreshCondition along with this approach..
    Thanks a lot..
    Abhilash

  • 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.

  • Cursor focus during a PPR event

    Hi,
    I have two messageTextInput columns (lets say text1 and text2) inside a table region. When a user enters a value in text1 and do a tab out, I fire a PPR event and set some attributes in my VO. The problem is: after it is done, the cursor focus does not move to text2, even though the user did a tab out after entering a value in text1. Cursor focus returns again to text1.
    Also, I do not want to do a page forward, so that processRequest is called again. That would be a costly operation for us. Please let me know if there is a way to regain cursor focus to the right textInput bean.
    Note: This is IE 7.
    Thanks. Much appreciate your inputs.
    Raja

    Raja see this thread, i have replied this some time back:
    Re: How to set focus on a textinput/poplist using PPR
    --Mukul                                                                                                                                                                                                                                                                                                       

  • Getting Focus using TAB key in TextArea

    Hi,
    When I move the focus into a TextArea with a TAB. The first pressed key is not displayed. Is this a bug..? if yes are there any workarounds..? I am using JDK1.4.1.
    I am pasting my sample program.
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends Frame implements KeyListener {
         public static void main (String args[]) {
              Test t = new Test();
         public Test() {
              TextField tf = new TextField(10);
              TextArea ta = new TextArea (10,5);
              tf.addKeyListener(this);
              ta.addKeyListener(this);
              this.add(BorderLayout.NORTH,tf);
              this.add(BorderLayout.SOUTH,ta);
              this.setSize(500,500);
              this.setVisible(true);
    public void keyPressed(KeyEvent kE) {
         System.out.println("KEY PRESSED");
    public void keyReleased(KeyEvent kE) {
         System.out.println("KEY RELEASED");
    public void keyTyped(KeyEvent kE) {
         System.out.println("KEY TYPED");
    Thanks,

    Quick bit of cut and paste here from an app that I've just modified + thrfr this is tested;- class EventKeyHandler implements KeyListener, ClipboardOwner{
         public void keyTyped(KeyEvent e){}
         public void keyPressed(KeyEvent e){                                        
            switch (e.getKeyCode()) {
               case 9: keyMethods(e.getSource(), e.getKeyCode());
                   break;
               // etc
         public void keyMethods(Object myObject, int i){
              JTextPane component = (JTextPane) myObject;
              if(!hasBeenDone[qCount]){
              StringBuffer temp = new StringBuffer(component.getText() );
                   if(i==9){
                        temp = temp.append("tab");
                        component.setText(temp.toString() );
                   }

  • JTable - loosing focus without tabbing out

    Hi all,
    I have a JTable and when the user goes to enter some text in a field I would like the value entered to persist to the underlying object as soon as the text is changed. This is without the user tabbing out of the JTable.
    Currently when a value is changed and the user hits a save button the value is not saved as the focus is still in the table, it all works fine as soon as the user enters the new value and tabs out of the table and then selects save,
    Does anyone have any suggestions?
    THanks,

    This can be done via your own TableCellEditor class. Create a TableCellEditor class. Implement KeyListener in this editor to save whenever the data is modified.
    You can set the default editor via setDefaultEditor() on JTable.

  • How to avoid clear record when tab pages changes

    Hi All
    I am using oracle forms 10g and db 10g.
    I have created a form with four tab pages. Namely "EXPENSE" , "AMOUNT_DETAILS", "SUPPLIER" , "ACCOUNT".
    When i enter a data in page 1 ie Expense and move to next page page2 "AMOUNT_DETAILS", and enters data in page3 "SUPPLIER" and when i come back to page1 "EXPENSE" and also Page2 "AMOUNT" the data get cleared in Tab pages. There is no data again i need to enter the data manually.
    Can any one suggest me how to avoid this clear data.
    Thanks & Regards
    Srikkanth

    Hi,
    Thanks once again for your quick response.
    I have checked it , i was working with oracle apps.Now i have entered all the datas in the four tab and press save button in the screen at that time also the data get cleared.Can you please tell is there any work around for this.
    regards
    Srikkanth

  • Open JTabbedPane with focus in tab

    I have a swing standalone app where general navigation is managed with something like this:
       private void addNewComponent(JComponent component) {
          JComponent panel = main.getDesktopComponent();
          main.setMainTittle(GlobalOptions.getTittle());
          panel.removeAll();
          panel.add(component, BorderLayout.CENTER);
          component.requestFocus();
          panel.validate();
          panel.repaint();
       } //EOF addNewComponentOne of this changed central panel's components is a JTabbedPane
    This pane has 3 tabs, each with full tree of containers and components.
    The problem is that when central app panel shows the JTabbedPane, the only way to focus in a component is by mouse click, after that i can use tab key to switch between components, including tabs from pane.
    I cant find a way to force focus so mouse click is not necesary.
    The component parameter in previous code has been a container in any part of app code I've seen it, so far, somewhere in each of this containers is a back button to mantain consistent the navigation. But I need to keep anytime the tab key navigation.
    Also while tab key is not working sometimes hot keys neither work, so fast keyboard navigation crashes completely.
    Is there a way I can fix this? tabs in JTabbedPane cant be selected as components, requestFocus in other components doesnt work, searching in the net shows posts with similar problems but says that it's a bug and need to change to jdk 1.5, I prefer to keep 1.4.2 version at least for a while since app is spreaded to many people and i dont control that.
    Thanks in advance for the help.

    You need to look into the new focus system. Focus always defaults the root of the default FocusTraversalPolicy. You need to define a policy. Then when the window opens focus will default to the tab if defined correctly.

Maybe you are looking for

  • Facing issue with for each loop in excel VBA

    Hi, I am using VBA . I am looping through each row and the column matches value,I am getting the value of  G column with the selected row.       Dim selectedCell As Range         Dim weekMinutes As Double         Dim rowNumber As Integer         usag

  • Conversions between character sets when using exp and imp utilities

    I use EE8ISO8859P2 character set on my server, when exporting database with NLS_LANG not set then conversion should be done between EE8ISO8859P2 and US7ASCII charsets, so some characters not present in US7ASCII should not be successfully converted. B

  • Transferring info from G4 to mini

    I have a G4 and have both system 9.2.1 and 10.3.9 loaded. My hard drive has been making funny noises so I bought a mini to transfer everything over because this was about the same price as getting my current hard drive fixed. I also liked the idea of

  • Blackberry desktop manager error code

    Hey every body can write here that blackberry desktop manager 4.7 error code and problems..and why? cause- results -..... Message Edited by melihlevent on 07-16-2009 04:21 PM best regard Blackberry support teams in linkedin ...join http://www.linkedi

  • Fields of Quality management table....

    Hi, I am unable to find the various fields in the QM related table. I have been given the Descriptions of the field and not the specific table where I can find the field. The fields are CT Priority,Quality Category,Present supplier,New supplier,Part