ItemFocusOut not catching  "TAB" key in Datagrid edited cell?

In DataGrid, "keyUp" can catch "TAB" key when it is pressed,
but the Keyboard event has less information needed. I tried
itemFocusOut, but it seems DataGridEvent would not catch it. Any
tips on how to make "TAB" key generate DataGridEvent or similar
event?
Platforms with this issue: WIN-XP/JDK-1.6/Air-1.5/FLEX
SDK-3.2
Thanks!
-Herbert

Let me rephrase like this:
In our application, a DataGrid’s edited cell has
“itemEditEnd” and “itemEditBeginning”
handlers defined. However when a “TAB” key is pressed
to navigate from one editable cell to another editable cell, none
of the above handlers can catch this special key stroke event.
Our intention is to make “TAB” key to emit an
event that can be caught by above handlers. Or, in other words, we
would like make “TAB” key to be similar(in the sense of
generating events) to that of “Enter” key when pressed.

Similar Messages

  • JTable tab key navigation with JComboBox Cell Editors in Java 1.3 & 1.4

    Hello - this is one for the experts!
    I have a JTable which has an editable JComboBox as one of the cell editors for a particular column. Users must be able to navigate through the table using the tab key. After editing a cell a single tab should advance the cell selection to the next column and then the user should just be able to start typing to populate the cell.
    However, i've come across some really frustrating differences between the Swing implementation of JDK1.3.1_09 and JDK 1.4.2_04 which means this behaviour is very different between versions!....
    1. Editing Cells and then advancing to the next column using tab.
    Using standard cell editors (based around JTextFields) in 1.3.1 the user has to press tab twice to traverse to the next column after editing. However, in 1.4.2 a single tab key is enough to move to the next column after editing.
    2. Editable JComboBox editors and and advancing to the next column using tab.
    Using JDK 1.3.1, having entered some text in the editable combo it takes 2 tabs to transfer the selected cell to the next column. With 1.4.2 a single tab while editing the editable combo ends editing and transfers the selection out of the table completely?!?
    With these 2 issues I don't know how to make a single tab key reliably transfer to the next cell, between java versions. Can anyone please help me?!??!
    (i've attached test code below which can be run in both 1.3 and 1.4 and demonstrates the above behaviour.)
    package com.test;
    import java.awt.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class TableTest4 extends JFrame {
         private JTable table;
         private DefaultTableModel tableModel;
         public TableTest4() {
              initFrame();
          * Initialises the test frame.
         public void initFrame() {
              // initialise table
              table = new JTable(10, 5);
              tableModel = (DefaultTableModel) table.getModel();
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              table.setRowHeight(22);
              JScrollPane scrollPane = new JScrollPane(table);
              getContentPane().add(scrollPane);
              JButton dummyBtn1 = new JButton("Dummy Button 1");
              JButton dummyBtn2 = new JButton("Dummy Button 2");
              // initialise frame
              JPanel btnPanel = new JPanel(new GridLayout(2, 1));
              btnPanel.add(dummyBtn1);
              btnPanel.add(dummyBtn2);
              getContentPane().add(btnPanel, BorderLayout.SOUTH);
              // set renderer of first table column to be an editable combobox
              JComboBox editableCombo = new JComboBox();
              editableCombo.setEditable(true);
              TableColumn firstColumn = table.getColumnModel().getColumn(0);
              firstColumn.setCellEditor(new DefaultCellEditor(editableCombo));
         public static void main(String[] args) {
              TableTest4 frame = new TableTest4();
              frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
              frame.pack();
              frame.setVisible(true);

    Run the above code in 1.3 and 1.4 and you can see that after editing a cell, the tab key behaviour works differently between versions.
    I don't believe by adding a key listener to the cell editors will have the desired effect.
    I've read other posts and from what i've read it looks like the processKeyBinding method of the JTable can be overridden to manually handle key events.
    Has anyone done this to handle tab key presses so that the same java app running under 1.3 and 1.4 works in the same way ??? I would really appreciate some advice on this as its very frustrating !

  • Under v33, 2 Win 8.1 PCs sync well; a WinXP PC communicates its bookmarks + bookmark folders, but not its tabs; a Win7 Starter Edition PC syncs nothing in & out

    I just want to report inconsistencies in synchronizing 4 machines. ALL four were introduced to syncing in the last week or so under the latest Firefox. No account was open under the older sync method.
    3 machines below run Firefox 33.0. The Windows XP machine runs Firefox 32.
    Two Win 8.1 PCs sync well between each other (can see each other's tabs and bookmarks).
    A Win7 Starter Edition PC syncs nothing in & out, even though the Sync icon turns when clicked on.
    A WinXP PC communicates its bookmarks and bookmark folders to the Win8 PCs, but NOT its tabs. After the commands HISTORY | TABS FROM OTHER DEVICES in the Win8 PCs, no tab from the XP computer shows up, even though the XP computer has open active tabs.

    * How do I turn on sync logs:
    # Open about:config and turn on: services.sync.log.appender.file.logOnSuccess and services.sync.log.logger.engine.bookmarks
    # Restart Firefox and look at: about:sync-log
    # Logs and error messages will be located here
    Please also use pastebin.mozilla.org for sharring any errors that relate to this issue.
    Thank you.

  • Why i am unable to catch the 'TAB' key press?

    hi
    i have an application where i have 2 text fields and one button in order say t1, t2 and b1.
    on tabbing t1 cursor moves to t2 and on tabbing t2 cursor moves to b1 and on tabbing b1 cursor moves to t1.
    now when i press tab button on any of the component i have written a keyListener for that to catch 'TAB' key using the comparision
    if( e.getKeyCode() == KeyEvent.VK_TAB )
    but its not catching the tab key pressed on any of these 3 components....
    why like this...
    i want to catch the press of 'TAB' key and write some action for it... but unable to catch the 'TAB' key press.
    anyone could help me in this....
    thanx in advance,
    -Soni

    I seem to remember this question being asked before. I think the answer was that the FocusManager intercepts the TAB key. I don't remember the solution but you can try searching the forum.

  • How to recognize "tab" key?

    hi all,
    i wrote an editor using swings. To provide input through console, i used the event handlers for keyboard events like
    keypressed(), key released()etc.. i also provided some tool bar for opening a file, saving etc. i was able to define the action for almost all the keys on the keyboard, except for some keys. i was unable to get the control of tab key. when i am pressing a tab key, the control is movig on toll bar options only. the conrol is not getting int the frame, on which i used to display the text.
    what i finally require is that how can i get the control of 'tab key' and how can i define some actions that are to be performed on pressing tab keys.
    i will be thankful if any body can help me in this regard.
    bye one and all,

    Try overiding the method isManagingFocus:
    public boolean isManagingFocus() {
    return true; //in order to catch TAB key
    in your text area.
    Netta

  • AdvancedDatagrid Tab Key issue

    Hello, I have an advancedDatagrid which contains many editable column (InpuText) and each column has an itemrender. I see that the normal TAB key navigation behaivor disapear, can any one told me what's the best way to keep the Tab (shift+Tab) navigation behaivor between editable cells ? Thank you

    I am having a simular problem. The software I am training
    requires the user to use tab between fields. I changed the shortcut
    key on text entry boxes. Somewhere on this forum (I cannot find it
    now) I found a workaround that had me change the HTML file
    Between the writeDocument <object> </object>
    tags, add the following '<param name="SeamlessTabbing"
    value="false">'+
    when I publish without quiz reporting this worked fine. (it
    matches the html of the other lines in the writeDocument But when I
    publish with quiz reporting in AICC the HTML codes between the
    writeDocument is different.
    '<param name=quality value=high> \n'+
    I altered the code I show above to match the html written by
    captivate with no results. Any thoughts?

  • Not able to use the Tab key to Tab indent when within a text edit window...

    Two questions please... First one is above for the tab function. In Safari I just need to press control+option+tab to indent a tab within a text edit box on a website. This function is being used more via cloud and mobile capability.
    Second... I can, in Safari, Copy and paste a site with tables. Works great in Safari. When I try to do this in FF I lose the formatting of the tables and it just give plain text without the tabled fields.
    I would love to use FF because the compatibility if much greater than Safari, but... I need my functionality as well to do my work to the best and quickest ability.
    Thank you

    Help About says I'm on 20.0.1
    Up until last week, I was able to use the tab key when typing emails and other multi-line text boxes.
    Suddenly the behavior of the tab key changed. This isn't the first time. It's been quite a while ago that the function of the tab key changed from indenting to moving around the page, then after some time it changed back to indenting.
    Can we get this fixed and leave it alone, please?
    I may give one of those add-ins a try, but my problem with add-ins is that they break when FF is patched or upgraded, then I'm left with out the solution they provide.
    Can we just fix Firefox, please?
    Thanks,
    Frank
    P.S. Another potential fix I came across suggested starting FF in safe mode to see if the problem goes away. It does not. It seems to be a change to FF that appeared after an update last week. On or just befor 24 Apr.

  • DATAGRID FOCUS ISSUE: Focus got lost, while moving from one cell to another cell using tab key.

    Problem: Focus got lost, while moving from one cell to another cell using tab key.
    Example: In an AdvanceDataGrid, there are three columns having custom ItemRenderer with Spark TextInput control (editable=true & focusEnabled=true).
    When I try to move the focus in with in 2nd, 3rd & 4th column using tab key, focus got lost. Most of the time it’s working, but some time it doesn’t work. There’s no clue as to how may rows/columns the focus has jumped to; or whether the focus has gone out of the data grid altogether.
    Observations: I am not sure whether this problem is because of custom component implementation or it is because of some issue related to Flex Component.
    It only occurs when we perform some actions like some server call, some complex logic execution etc. at the focus out event of itemrenderer.
    There is one property of datagrid i.e. editedItemPosition which contains row & column index of datagrid. On the focus out event, it gets null when focus got lost. We tried to set it, but it didn’t work.
    Steps Performed:-
    1. Currently focus is in 2nd column i.e. Apply to #.
    2. Once I press tab key from 2nd column, it goes to 3rd column which is correct.
    3. Now if I press tab key from 2nd column i.e. Payment #, focus should go to 3rd column, but it goes out of data grid and set the focus of button which is outside data grid.

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Bjtable+%2Btab+%2B%22enter+key%22&col=javaforums

  • Text Entry with Tab Key not advancing to next slide

    I am using Captivate 1 to create a screen that has a text
    entry requiring the user to press the Tab key as the Shortcut Key.
    The users are having to press the Tab key multiple times to get the
    course to advance to the next slide. There does not seem to be a
    rhyme or reason to which text entries this occurs in, nor does
    there seem to be a pattern to the number of times or forcefulness
    in which the Tab key must be pressed, though more aggressive key
    presses have yielded better results. Sadly, requesting the users
    bang the Tab key with as much force as they can muster is not a
    viable option.
    Here are things I have tried:
    Decrease length of slide
    Increasing active time of the text entry
    Adding/removing playback control
    Deleting and recreating text entries
    If anyone has any idea what can be done to correct this
    problem, it would be much appreciated.

    Hi berrylicious877
    The following has worked for me in Cap1, so try it and see:
    Add the text entry box and include the submit button.
    Make the submit button transparent and edit text to a full
    stop at the smallest available font size (Captivate won't accept a
    submit button without something typed in and a full stop is the
    smallest thing available display wise)
    On the submit button, set the shortcut key to "Tab".
    My reasoning was that the shortcut key on the text entry box
    "activates" the box, thus allowing input and the shortcut key on
    the "submit" button "deactivates" the box so that the slide can
    move on as required.
    Please let us know if this helps.
    Andrew

  • Pressing tab key within table not scrolling to next input field

    Hi All,
    I have a table with editable and read only fields. I have more than 20 columns. When the tab Key is pressed it scrolls only to the editable fields that are in the visible screen. It does not scroll the table to the right to the next input field.
    However if I change the screen size so that the scroll bar is required for the browser then it will scroll across moving the browser scroll bar, moving the cursor to the input field that was not visible. Again it does not go further moving the scroll bar within the table to the next editable field to the right.
    The table has been set to scrollable with the scrollable column count set to 8.
    We are using explorer 8 on 7.01
    Is it possible to have the tab key move from input field to input field scrolling the table to the next input field if it is not visible yet?
    Thanks
    Bruce

    What you describe sounds like the correct functionality.  If you set a scrollable column count, only the visble rows are actually rendered on the client side.  When you use the horizontal scroll bar, you are triggering a server side event to retrive the next set of visible columns.  Therefore the browser doesn't actually know anything about non-visible columns and hence the tab can't go to them.
    When you increase the number of visible columns (or don't set anything for visible column) you render al the columns on the client side and use the browser scrolling.  Therefore the tab works.

  • Why is the itemRenderer null after a tab key in my DataGrid ?

    Hello all,
    I progress in my Flash application Thanks to all for your help !
    But now, I have a very strange problem:
    In my DataGrid, when I click on an item to edit it, in the ITEM_EDIT_BEGINNING event, the DataGridEvent.itemRenderer is set and has the correct value.
    When I use the TAB key, I go on the next column, the ITEM_EDIT_BEGINNING on the newly selected field is triggered, but in that case, the DataGridEvent.itemRenderer is null.
    I need that itemRenderer to have its x, y, width and height.
    Do you have an idea why it's null ?
    Thanks for all

    You may want to feedback to Apple
    http://www.apple.com/feedback

  • TAB key for lyrics in score editor not working anymore!

    I have been editing music for score printing in LOGIC for ever. Suddenly the TAB key won't take me to the next note, but finishes the inputting. I never get beyond the first syllable! I have even disabled the key command for TAB in other editors to make sure they don't clash - but no change. Can anyone help?
    Christoph

    Have you tried without memory card to se if same result in case of possible corruption?
    Suggest that you backup essential data with Nokia Suite and return device to "Out of box" state by keying in *#7370# followed by 12345 (default Nokia lock code unless altered by user).
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Tab key does not work properly in Assessment mode

    I am predominatly using Adobe Captivate for software simulations and assessment purposes. 
    I've seen similar items posted on the forums and noted this appears to be a common problem with a solution, to edit the HTM file with the code  so.addParam("seamlessTabbing", "false"); see post http://forums.adobe.com/message/5283597#5283597.
    I tried this with a file that was published without the need for SCORM compliance and it worked fine.  Once the requirement was introduced for SCORM compliance (and to publish as a Zip file), this does not work as the code is different in the HTM file.
    My file has the following code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <!-- Copyright [2012] Adobe Systems Incorporated.  All rights reserved -->
    <html lang="en">
    <head>
      <link rel="stylesheet" type="text/css" href="captivate.css" />
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Enter Billable Time - Assessment</title>
      <!-- Include external JS files -->
      <script language="JavaScript1.2" src="standard.js"    ></script>
      <script language="JavaScript1.2" src="scormdriver.js"  ></script>
      <script language="JavaScript1.2" src="SCORM_utilities.js"  ></script>
      <script language="JavaScript1.2" src="Utilities.js"   ></script>
      <script language="JavaScript1.2">
       //Register event handlers
       window.onkeypress    = CheckForDebugCommand;
       window.onload    = OnloadActivities;
       window.onbeforeunload  = Finish;
       window.onunload   = Finish;
       document.onkeypress   = CheckForDebugCommand;
      </script>
    </head>
    <body>
       <div id = "CaptivateContent">
        <noscript>
         This course requires JavaScript to be enabled in your browser.
         Please enable JavaScript, then relaunch the course.
        </noscript>
       </div>
    </body>
    </html>
    How could I edit this to disable the "seamless tabbing" referred to in the original article to make the TAB key work as intended.
    Thank you.

    This is from my e-book:
    http://www.infosemantics.com.au/troubleshoot-adobe-captivate
    Notice that the procedure for Seamless Tabbing in Cp6 with SCORM is different to that for normal non-LMS courses.
    Implementing Seamless Tabbing in Cp6
    All Captivate versions up to and including Cp6 had Seamless Tabbing active by default and set in the HTM template code. But you can still turn it off by manually inserting some code into the published HTM file as follows:
    Navigate to your published Captivate content and open the HTM file in Notepad.
    Locate the line of code in the HTM file that starts with:
    var so = new SWFObject(
    Add the following code on the next line:
    so.addParam("seamlessTabbing", "false");
    Save changes to the file and test by running your project again in the browser.  You should now be able to use the TAB key without leaving your published content.
    Adding seamless tabbing to Cp6 SCORM support files
    Seamless tabbing in Cp6 SCORM projects is a little more complex because the templates are quite different to those used for normal content.  To control seamless tabbing in SCORM content you need to make the changes to the SCORM_utilities.js file in the Captivate install directory.
    Depending on whether you’re on 32bit or 64bit, you should be able to find it at one of these locations:
    32bit:
    C:\Program Files (x86)\Adobe\Adobe Captivate 6 (32 Bit)\Templates\Publish\SCORM\Default\js
    64bit:
    C:\Program Files\Adobe\Adobe Captivate 6\Templates\Publish\SCORM\Default\js
    Open the SCORM_utilities.js file in Notepad or another suitable plain text editor. Scroll down to the end of the code until you find the following lines:
    so.addParam("quality", "high");
    so.addParam("wmode", CONFIG.WMODE);
    so.addParam("bgcolor", CONFIG.BGCOLOR);
    so.addParam("menu", "false");
    so.setAttribute("name", CONFIG.SWFOBJ_NAME);
    so.setAttribute("redirectUrl", CONFIG.REDIRECT_URL);
    so.addParam("AllowScriptAccess","always");
    so.write(CONFIG.TARGET);
    Add the so.addParam("seamlessTabbing", "false"); code to this group and save the file.
    If you are currently unable to save changes to these template files, my gut feeling would be that it must have something to do with your user permissions. E.g. you are not an Administrator for your own PC. Is that possible?

  • Tab key selects cell for edit in JTable

    Hello,
    I've seen extensive posts on this forum for this problem, but no solution yet.
    I have a Jtable, with custom cellRenders and cellEditors. Some columns are editable, some are not.
    What I want to do, is when someone tabs to an editable cell, that cell immediately goes into edit mode. This means, it acts as if someone double clicked on it, or tabbed then clicked on it. Basically, I want it to ACTUALLY go into edit mode.
    Please do not respond by telling me how to make it look editable (highlighting, etc) and do not respond with mouseEvent solutions. Please do not respond by telling me to do table.editCellAt(row,col) because that does not kick in my custom editor, it uses the defaultCellEditor.
    So basic question:
    How to kick in editing when someone tabs to an editable cell?
    If you need code examples, please request and I will post.

    nmstaat,
    In JTable:
    Look into the processKeyBinding method. It takes a keyevent and matchs it with an InputMap, and the InputMap invokes an Action in the corresponding ActionMap.
    You will have to call yourJTable.getActionMap(), then alter the action that corresponds to the 'tab' key.
    For Further information, check the JTable API, its all there.
    Good Luck,
    Alex
    Here's the current map for the Metal look and feel:
    JTable (Java L&F)
    Navigate out forward | Tab
    Navigate out forward | Ctrl+Tab
    Navigate out backward | Shift+Tab
    Navigate out backward | Ctrl+Shift+Tab
    Move to next cell | Tab
    Move to next cell | Right Arrow
    Move to previous cell | Shift+Tab
    Move to previous cell | Left Arrow
    Wrap to next row | Tab
    Wrap to next row | Right Arrow
    Wrap to previous row | Shift+Tab or Left
    Wrap to previous row | Shift+Tab or Left
    Block move vertical | PgUp, PgDn
    Block move left | Ctrl+PgUp
    Block move right | Ctrl+PgDn
    Block extend vertical | Shift+PgUp/PgDn
    Block extend left | Ctrl+Shift+PgUp
    Block extend right | Ctrl+Shift+PgDn
    Move to first cell in row | Home
    Move to last cell in row | End
    Move to first cell in table | Ctrl+Home
    Move to last cell in table | Ctrl+End
    Select all cells | Ctrl+A
    Deselect current selection | Up/Down Arrow
    Deselect current selection | Ctrl+Up/Down Arrow
    Deselect current selection | Pgup/Pgdn
    Deselect current selection | Ctrl+Pgup/Pgdn
    Deselect current selection | Home/End
    Deselect current selection | Ctrl+Home/End
    Extend selection one row | Shift+Up/Down
    Extend selection one column | Shift+Left/Right
    Extend selection to beginning/end of row | Shift+Home/End
    Extend selection to beginning/end of column | Ctrl+Shift+Home/End
    Edit cell without overriding current contents | F2
    Reset cell content prior to editing | Esc

  • Adobe Staff Please Read - Tab Key Not Working in InDesign HTML5 based panel

    Tab Key Not Working in InDesign HTML5 based panel
    Instead of changing focus to next entry field when the tab key is pressed it hides the panel instead.
    UI Nightmare.

    I’m using editable text fields. When I hit tab nothing happens. Focus stays on current text field.
    Mike Baugh • Creative
    Director, Digital Production
    +1 240-662-4442 office
    +1 410-807-1633 mobile
    [email protected]<mailto:[email protected]>
    agency.discovery.com<http://agency.discovery.com/>

Maybe you are looking for

  • Change password in cm.properties?

    During my install of CM, I pointed it to the wrong database.  I can see in the cm.properties file that I can change the database name, but not sure how to change the password since it is encrypted.  Can someone please advise on how to change this pas

  • Auto emailing of PO's of  particular purchasing groups to common mail Id

    Hello All, There is a need to have all the PO's created with multiple purchasing groups to be sent to a common mail Id. For Example ,  there are various purchasing groups like PG1, PG2, PG3,....and so on & the need is to send all the PO's created wit

  • Where to see the EXPORT to memory id value

    Hi Experts,            I have exported some values to a memory id. in debug mode where can i see these values. any suggestions. Thanks in advance. poorna

  • How to Uninstall a failed Virtual Machine Management Server (x64) installation ?

    Dear Technet Team, I cannont uninstall the Virtual Machine Management Server (x64). Already tried it with the Installation Image. The Uninstalling process suddenly crashed without no error. I delete everything so far DB as well because it was never i

  • NWDS for 64 bit Windows 7

    Hi Folks, I want to install NWDS on my Windows 7 64-bit OS. I searched for suitable NWDS(like 7.0, CE7.1, CE7.2 along with their trial versions), but they were available only for 32-bit Windows. Can you please provide some links where I can download