EditCellAt() with mouseclick is not working for first row of the jtable

Hi All,
I have extended JTable.changeSelection() & editCellAt() methods to force the text to select when focus is brought to the cell.
I have a page which has both editable and non-editable columns. when I do a mouse click on FIRST ROW of the editable cell and type the value, The value is not displayed in the cell. when I click on any other editable field in the page, The typed value is displayed in the cell. In the first row of the cell, only the first attempt is not working. When I remove the editCellAt() call in changeSelection(), it works as expected.
But, If I reach the FIRST ROW editable cell using TAB key instead of Mouse click and type the value, its working fine.
Kindly suggest me what could be the problem in my code. I think something wrong in editcellat() or mouseclicked/released or focusgained in our versions of JTable or jtextfield.
Kindly let me know if you need any more functions of my version of implementation.
Thanks In advance.
My JTable Version of editCellAt:
     public boolean editCellAt(int row, int column, EventObject e) {
          try {
               if (getCellEditor() != null && !getCellEditor().stopCellEditing()) {
                    return false;
               if (!isCellEditable(row, column)) {
                    return false;
               if (isShowStarRow() /*&& !starRowAdded*/) {
                    VSDataControl ds = getDataSource();
                    if (ds != null) {
                         VSResultSet rs = ds.getResultSet();
                         if (rs != null) {
                              if (row == rs.getRowCount()) { // This is the star row
                                   // Go to the last record
                                   if (row > 0) {
                                        try {
                                             rs.getRowAt(row + 1, true);
                                             rs.last();
                                        } catch (Exception ex) {
                                             return false;
                                   if (ds.insert() == null) {
                                        return false;
                                   currentRow = row + 1;
                                   starRowAdded = true;
               TableCellEditor editor = getCellEditor(row, column);
               if (editor != null && editor.isCellEditable(e)) {
                    editorComp = prepareEditor(editor, row, column);
                    if ( editorComp instanceof VSGridChoice && lastKeyEvent != null ) {
                         VSGridChoice choice = (VSGridChoice) editorComp;
                         choice.handleMissingCharEvent( lastKeyEvent );
                    if (editorComp instanceof VSChoiceBase && lastKeyEvent != null ) {
                         VSChoiceBase hack = (VSChoiceBase)editorComp;
                         hack.addMissingChar(lastKeyEvent);
                    lastKeyEvent = null;
                    if (editorComp == null) {
                         removeEditor();
                         return false;
                    editorComp.setBounds(getCellRect(row, column, false));
                    add(editorComp);
                    editorComp.validate();
                    editorComp.requestFocus();
                    setCellEditor(editor);
                    setEditingRow(row);
                    setEditingColumn(column);
                    editor.addCellEditorListener(this);
                    return true;
               return false;
          } catch (Exception ex) {
               showValidationError(e, ex);
               return false;
     public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
          super.changeSelection(rowIndex, columnIndex, toggle, extend);
                editCellAt(rowIndex, columnIndex);
                       if (getEditorComponent() != null)
               if (getEditorComponent() instanceof CustomJTextField)
                    ((CustomJTextField)getEditorComponent()).selectAll();
      }

i will suggest you to override your requetFocus()
like.
public void requestFocus()
        super.requestFocus(); // may be panel or container.
        textPane.setSelectionStart(0); // textpane is the editor for the cell.
        textPane.setSelectionEnd(textPane.getText().length());
    } Gud luck.

Similar Messages

  • My icloud mail has not worked for 2 days.  the tech support people say they dont even know there is a problem.

    My mail has not worked for two days - in the US.  The tech support people on the phone claim they don't even know there is a proplem.  Anyone know whats going on? 

    http://www.apple.com/support/icloud/systemstatus/
    People reading this forum are just other users like you (who frankly already know there are a lot of frustrated users out there and cannot tell you anything you won't see in the above link).  Send your feedback to http://www.apple.com/feedback/icloud.html

  • Custom url scheme not working (for first time) IOS applicaiton

    i have created one distribution application also register custom URL scheme. First time after I installed application, and try custom URL link, it does not work.
    However if I lunch the application manually it will prompt me below mentioned message
    Are you sure you want to open the application ... from the developer iphone distribution ... ?
    i will click on continue, and after that custom URL link works fine with my application.
    Can Custom url link launch the application directly on installation (without manually launch application and contiue)?
    is there any settings, so we can make the prompt message off. So it will not prompt message.
    also i had tried to create new application from another enterprise account, and deploy on other server; then it do not prompt that message, but unable to figure out the reason .
    Thanks

    Are you exactly following the guidance in the iOS App Programming Guide for Implementing Custom URL Schemes? Do you get the same message the first time, no matter whether app has been loaded or not? Are you really using iOS 4 per your profile?
    "If your app is not running when a URL request arrives, it is launched and moved to the foreground so that it can open the URL. The implementation of your application:didFinishLaunchingWithOptions: method should retrieve the URL from its options dictionary and determine whether the app can open it. If it can, return YES and let your application:openURL:sourceApplication:annotation: (or application:handleOpenURL:) method handle the actual opening of the URL.

  • SelectBooleanCheckbox not working for mult rows, Attn: Shay, Simon, Frank

    I converted some input texts my detail table to selectBooleanCheckBox. Input texts have "y" or "n". However, my selectCheckBox showed no checkboxes for either "y" or "n". Anything special about this?

    Here is a snippet of my code. Actually, it works as long as I have a single row. It starts failing on multiple rows.
    Let us say, I have two fields "Create" and "Read" (values "y" or "n" in the database table).
    When I have one row, I have the checkboxes checked fine (A "y" is shown as a checked field). If, however, I have two rows, the selection for the first row shown on the page seems to be propagating to all rows. It is almost like it dioes not understand there are two rows. However, all the inputtexts corresponding to the rows have correct values. I made sure I selected the correct field from Data Controls and drooped them in the details column area. If I replace the selectBooleanCheckBox with "inputText", the values are shown fine on the page even if there are multiple rows.
    <af:table value="#{bindings.SecPagePermissionView1.collectionModel}"
    <af:panelHorizontal binding="# {backing_PagePermissions.panelHorizontal1}"
    id="panelHorizontal1">
    <af:selectBooleanCheckbox value="#{bindings.SecPagePermissionView1Cr.inputValue}"
    label="#{bindings.SecPagePermissionView1Cr.label}"
    binding="#{backing_PagePermissions.selectBooleanCheckbox3}"
    id="selectBooleanCheckbox3"/>
    <af:selectBooleanCheckbox value="#{bindings.SecPagePermissionView1Read.inputValue}"
    label="#{bindings.SecPagePermissionView1Read.label}"
    binding="#{backing_PagePermissions.selectBooleanCheckbox4}"
    id="selectBooleanCheckbox4"/>
    </af:panelHorizontal>
    <af:panelHorizontal binding="#{backing_PagePermissions.panelHorizontal3}"
    id="panelHorizontal3">
    </af:panelHorizontal>
    </af:column>
    </af:table>

  • Hide "more" button in a list view, only works for first item in the list

    I have the following code in a list view that outputs several dozen items in a web app.  The code only works for the first item, how can I make it loop through and execute the test for each item in the list view?  The {tag_hide more button} is a checkmark field that yields a numeric 1" if checked otherwise yields a numeric "0".
    <div id="more-option">
            <p class="right"><a href="{tag_itemurl_nolink}" class="btn btn-small btn-very-subtle">More &rarr;</a></p>
          </div>
          <div class="more-selection" style="display: none;">{tag_hide more button}</div>
          <script>
    if ($(".more-selection").text() == "1") {
        $("#more-option").hide();
    </script>

    What's the URL for the site where you are using this?  Offhand, it looks like it should work with your first example so you are either placing the script before those elements are loaded or you might try wrapping your current javascript inside the:
    $(document).ready(function() {
    --- your existing javascript here
    This make sure the code runs once all the html is loaded on the page.  Without seeing a URL and debugging with the js console in Chrome I can't give you a solid answer.
    But, I do know that you can probably do this with a lot less markup.  Once we figure out what the actual problem is I have a better solution mocked up for you on jsfiddle.
    When looking at my HTML code on jsfiddle, please realize I setup some dummy HTML and removed your tags and added actual values which would be output by your tags.  The main thing I did was remove the whole div.more-selection and instead, added a "data-is-selected" attribute on your div.more-option element.  Then, in my javascript for each div.my-option element on the page, we loop through them, find the value of that data attribute and hide that div if it's less than 1 (or 0).
    Here's the fiddle for you to look at:  http://jsfiddle.net/thetrickster/Mfmdu/
    You'll see in the end result that only two divs show up, both of those divs have data-is-selected="1".
    You can try pasting the javascript code near the closing </body> tag on your page and make sure to wrap my js inside a <script> tag, obviously.  My way is neater on the markup side.  If you can't get it to work it's likely a jquery conflict issue.  My version is using the $(document).ready() method to make sure all the code is loaded before it runs.
    Best,
    Chris

  • "Resend" option is not working for specific user. "The Operation Failed" Exchange 2010 Outlook 2013

    Hi Everybody. I have a weird one for you.
    I have a user that gets an "operation failed" message whenever trying to use the "resend" option on any email (It's the one right under recall). I had tested up and down on her machine. Exchange 2010 Outlook 2013
    Ran in safe mode, recreated her profile, disabled virus scanning, repaired office. (weird, the font just changed sizes on me)
    After all of this I tested on other computers, other users seem to be able to "resend" just fine. However her account does not work on any computer I try, internal or external to the network.
    It looks more like a profile issue.
    She's a very active archivist, so she only has 486MB of space used by her mailbox.
    It's well under quota.
    It's been really puzzling me.
    MCSE 2003, Exchange. MCTS Vista, 7. Administrator of awful, neglected website http://timssims.net

    Hi Timssims,
    Since there is only one user in the org has this issue, it seems an issue on the Outlook client side.
    I suggest asking Outlook Forum for help so that we can get more professional suggestions.
    For your convenience:
    https://social.technet.microsoft.com/Forums/office/en-US/home?forum=outlook
    However I also have some suggestions for your reference:
    1. If this issue occur on Cached Mode, I suggest turning to Online Mode for testing.
    2. Please also paste the detailed error message if "operation failed" is not the
    complete information.
    3. If still not works after perform operations above (including suggestions from Outlook Forum), I suggest re-creating a new mailbox for the specific user just as Martin suggested.
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • CreateRowFromResultSet not called for first row

    Hi all,
    Jdev Version: 11.1.1.7.0
    I have an XML stored in DB as  a CLOB. I fetch this XML as a CLOB (using clobdomain) in my VO and need to populate a few other transient attributes. I attempted to achieve this by overriding (as per blog entry) method 'createRowFromResultSet'. I observe a weird behaviour where this method does not get invoked for the first row alone.
    A while back, I see another member suffer from a similar issue - forum thread. Is this a bug that appears when using clob and overriding this method?
    Thanks in advance,
    Srini

    Hi,
    we have the same problem. The method createRowFromResultSet() is not called for the first row. We don't have a CLOB. We have a primary key of type Raw. Maybe this is causing the problem.
    We are using JDev 11.1.1.6.
    Regards,
    Linda

  • HT5017 does not work for first login screen after boot

    I did not move the home folder to /var because I am not sure it will be backed up by time machine, but in any case, the first log-in screen keeps showing all accounts.  10.8

    I updated to 3.6.4 and when I went to NetFlix to watch the next show of a series, it said
    something like
    Installation complete, restart your browser.
    I restarted browser, same problem. Restarted comp. Same problem.
    I updated Adobe Flash 10.1, still same problem.
    But able to watch some vids on other sites, but full screen gave me the big blank white screen with audio only, had to click around in the dark ( so to speak) to find the minimize button.
    I did a System Restore to before the Firefox and Adobe updates.
    I then did not update Firefox as recommended and went to NetFlix and wellah, i can view the movies again.
    And Full Screen is fine.
    I then experimented and updated Firefox only, went to NetFlix and got same msg with no viewable shows.
    So did a System Restore once more.
    Staying at 3.6.3 for a while longer until I know I can watch my movies.
    I don't own a TV, so this is my only form of an occasional escape.
    I do hope this is figured out soon.
    With what I have done, it seems to be Firefox, Not Flash.
    Good Luck to us all.

  • Sustain not working for first bars of exported track

    I recorded a song using the onscreen keyboard and the sustain key. All tracks play fine with sustain in GB, however when I export the track the first few bars play without the sustain. I have no idea why this would be since it's a loop so all bars should have the sustain info recorded. Have tried messing around with all the mastering settings to no avail. Help!

    i will suggest you to override your requetFocus()
    like.
    public void requestFocus()
            super.requestFocus(); // may be panel or container.
            textPane.setSelectionStart(0); // textpane is the editor for the cell.
            textPane.setSelectionEnd(textPane.getText().length());
        } Gud luck.

  • Rule with DoesNotContain qualifier not working for CATEGORY

    I try to use the DoesNotContain qualifier on a CATEGORY field.
    I tried the following rule:
    (CATEGORY DoesNotContain "Archived")
    And receive this Error Msg: "Error in Rule. Invalid Operator for Datatype"
    But the following rule works fine
    (CATEGORY Matches "Archived")
    But I need the negated expression... any ideas?

    Try this
    !(CATEGORY Matches "Archived")
    as you must be doing this from some sort of program, just add the
    exclamation mark before the opening bracket
    Cheers Dave
    Dave Parkes [NSCS]
    Occasionally resident at http://support-forums.novell.com/

  • Firefox 5.0 not Working for Multiple Users Sharing the Laptop

    Hello All,
    I upgraded Firefox from 3.15 to 5.0 using my user ID (admin) in Vista Business SP1. The same copy of Firefox 3.15 also used to work fine under my son's user id. The new install of 5.0 works fine under my user id but immediately freezes under my son's id. I reinstalled 5.0 in the same location under my son's user id but no change.
    I can get Firefox 5.0 to work under my son's login by running it as administrator but then only my bookmarks, etc. load. None of his profile or bookmarks are present.
    Any ideas on how to fix this?
    Thanks...
    Neil

    Google needs to update the Google Toolbar program for Firefox 5.0.
    The Google Toolbar '''7.1.20110512W''' version does work pretty good in Firefox 5.0 by using the Compatibility Reporter extension. But not every feature works 100%.<br />
    https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    http://googlesystem.blogspot.com/2011/06/enable-google-toolbar-in-firefox-5.html
    Google Labs has been working on a GTB 8 version, but it looks like it isn't made for Firefox - just for Internet Explorer. <br />
    http://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588#toolbar_info <br />
    So, maybe Google isn't going to be supporting Firefox any longer. That might be a move to force Google Toolbar users over to Google Chrome, which I believe has all those features built-in.

  • My i message will not work for only one contact the rest will

    my iphone will send i messages to everyone else but one

    iWork '09 is still available from the likes of Amazon.
    Your experience is why I never trusted downloaded versions when there's a physical DVD available.
    It may be possible to reactivate with your code, but I can't advise you as to how.

  • HT1430 this is not working for me - which is the home button

    The sound went off on my games, etc. How does one get the sound back? I tried what iPad said about turning off and on and nothing happened

    1. Double-click the Home button (the round button) and swipe Task Bar to the right
    2. Check the volume and mute settings
    http://i1224.photobucket.com/albums/ee374/Diavonex/6d3191ba.jpg

  • 'Select ALL' not working for WD ABAP ALV

    Hi all,
    I have a web dynpro application with a tab strip with 9 tabs. Each tab has an ALV embedded in it. Each ALV is mapped to the same  node in component controller. When the application is executed 'Select ALL' works for first ALV on the first tab. However if i select a different tab i get the select all option on the left hand corner but it does nothing when chosen.
    I also tried creating custom button on ALV toolbar for this functinality. Here i am looping over all elements of the node (bound to ALV) and using method  set_selected( abap_true ) ( method of if_wd_context_element ). This also works for first ALV on the
    first tab. However again get the same issue if i choose any other tab.
    Node cardinality : 0.... n
    Node selection :  0.....n
    ALV selection mode set to MULTI using method SET_SELECTION_MODE( CL_WD_TABLE=>E_SELECTION_MODE-MULTI ) of cofig class cl_salv_wd_config_table.
    All your inputs/suggestions to resolve this issue will be greatly appreciated.
    Thanks,
    Vivek Priyadarshi

    Hi Aditya,
    Thanks for your reply. I am using 9 comp. usage of SALV_WD_TABLE to display 9 alv and all are mapped to the same comp. controller context node. The context node has the master structure with all fields, based on the chosen tab i am populating this context node with records and setting config model for ALV accordingly.
    I tried your trick, clicked on select all on first ALV (all records chosen, works correctly here) then chose the second tab on tabstrip, however records in the new (second) ALV were not selected. When i clicked 'Select all' it did nothing, no records were chosen ( original issue ).
    Did you invalidate the common node when you navigate between tabs?In my case i am populating this node with new data every time i navigate between tabs.
    One new thing i noticed. On the first tab i am able to select individual rows by clicking on the row selection buttons on the left edge of every row. However when i go the second tab clicking on row selection button it does not get selected, only way to select a row in this case is by doing CLTR+click, something doesn't feel right about this application.
    I am going to create a new context node to check if sharing a common context node is causin this issue.
    -Vivek

  • My charger is not working for my computer.

    My charger is not working for my computer. The green light does not turn on. Is it possible that there is something wrong with my computer and not just my charger? Ive tried using another charger and the same thing happened, no green light.

    phelpy wrote: Ive tried using another charger and the same thing happened, no green light.
    Does not sound so good.
    Start here:
    http://support.apple.com/kb/ts1713
    If you are still under warranty,  no fee.
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

Maybe you are looking for

  • Beginner's question

    i started to work with labview newly, the task im tryin to do is the following : i have a microcontroller and i wanna know if it is alive or not .. simply am tryin to open a port (com) and to ping the microcontroller using the functions (.dll provide

  • PeopleTools 8.49 PeopleSoft Database Cannot Connect with MS SQL Server 2005

    Folks, Hello. I am working on PeopleSoft PIA. My system is Windows Server 2003, MS SQL Server Express 2005 Standard, PeopleTools 8.49. I am setting up PeopleSoft Database \PsMpDbInstall\setup.exe and got the errors as follows: Error: Setup fails to c

  • Regarding workflor archiving

    Hi all, we are in process starting workflow archiving and the scenario as below adding a dedicated application server to the existing setup due to huge data and planning to run archiving jobs in the particular server only. ran couple of Test jobs, in

  • I think If you are up...you will get your preorder

    I have talked to several people that don't even have a clue that preorder is on the 3rd.  They know its being released, but no clue about pre-order.  It might seem like the iphone will sell out in 5 minutes, but that because everyone who posts on her

  • Error during installing Adobe LifeCycle Designer

    Hi all, I am trying to install Adobe LifeCycle Designer 8.1 , already downloaded all files from service marketplace. But while running set up,getting below error message: The SAP Front-End Installer executable is unable to process the XML files.Resta