Add row with focus - almost there

Hi
I've managed to make some inroads into my JTable functionality.
My current problem is setting the focus to a cell in a newly added row, allowing the user to begin editing immediately.
I have managed this to an extent, in that when I add the first new row then I need not click inside the first cell of the row in order to begin editing.
However, if I then add another row the focus remains with the last cell that I edited and not with this new row.
I then have to click in, or tab to, my newly added row in order to begin editing.
The code that adds the row is shown below:
    private void btnAddItemActionPerformed(java.awt.event.ActionEvent evt)                                          
        JobBreakdown.this.myModel.addRow();
        int rowCount = jTable1.getRowCount();
        jTable1.changeSelection(rowCount-1, 0, false, false);//Ensures the scroll bar moves when row added
        jTable1.requestFocus();
    } As usual, if anyone can provide some help or any advice it would be very much appreciated.
Thanks
GB
Edited by: greenockboy on Apr 21, 2008 3:55 PM

As usual, if anyone can provide some help or any advice it would be very much appreciated.As usual...
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.

Similar Messages

  • Version 6 & 7 always start with the "Almost there" message. How do I stop the message?

    When I start Firefox on one computer, the first tab opened is always an "Almost there" welcome message (http://www.mozilla.org/en-US/firefox/2.0.0.6/whatsnew/). This is not the home page which also opens in another tab. This happens in all accounts on this computer, running Windows XP SP3 Professional. I have uninstalled and re-installed the software. I have attempted to delete all associated files. I have attempted to delete all entries in the registry. This problem has existed since sometime in version 5. How do I stop this? Thank you for your time and assistance.

    See these articles for some suggestions:
    * https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    * https://support.mozilla.com/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    * http://kb.mozillazine.org/Preferences_not_saved

  • Add Rows with a Button

    I'm using the helpfile example to "Create a table that grows using the button object" and when I get to point about adding script to the button object's click event, I select JavaScript as the language and add:
    Table.Row1.instanceManager.addInstance(1);
    But when I exit out of that, the Click event now reads "Click*" and the script also shows up in the FormCalc field. Deleting it from the FormCalc field also deletes it from the JavaScript field.
    I have no clue what I'm doing wrong, so feel free to beat me over the head with something obvious.
    Thanks,
    Smitty

    Thanks Paul,
    My button has focus, then I add the code: Table1.Row1.instanceManager.addInstance(1); in the JavaScript language bar for the click event, but still no joy when I try it in Preview.
    Once I add it the code also appears when FormCalc is selected and "Click" has an asterix appended to it: "Click*"
    Asiye,
    I have forwarded you a copy.
    Thanks to you both,
    Smitty

  • Add rows with vLookup

    I have a spreedsheet which is used to give estimates.  One table with colums of items and their prices.  The second table is to lookup those prices and add them to the estimate.
    I have used vLookup which does the job.  The problem is that you do not know how many items (rows) an estimate might have.
    At the present, when I press enter in the last column, a new row is created but the vLookup formular is not coppied to that new row (cell).
    Can this be done?

    Hi Derek,
    Here is what I have here:
    The formula in C2 is:
       =VLOOKUP(B2,'Item/Price'::A:Price,2,FALSE)
    Or if you turn off 'Use header names as labels' in Preferences: 
       =VLOOKUP(B2,'Item/Price'::A:B,2,FALSE)
    Glitches seem to creep in to legacy documents created in Numbers 2.3 and opened in Numbers 3.0. Sometimes what works to clear these up is to clear a cell by selecting it and hitting 'delete' then reentering the formula or value.
    SG

  • Making a table add rows with a formula?

    Hi
    I would like to know if the following is possible.
    Lets say I have a table (Table1) and another table (Table2).
    Table1 will contain a name and an amount so each rows has two cells.
    Table2 will contain information from Table1 but filled in at appropriate places. The issues here is as follows. If i create a template for this I cannot ahead of time know how many rows Table1 will contain since this will vary depending on the circumstances. However Table2 should be protected but for that to work I would have to find a way for table2 to creat the appropriate rows needed depending on how many rows are in table1. Is this at all possible or is this beyond the scope of Numbers?
    If my questions is unclear in any way the please feel free to ask me to clarify.
    Thanks

    I never type $C$4 in the posted formula.
    Is it so difficult to copy paste the posted formula ?
    (1) In the table which you describe, values are in rows 1, 2, 3 which are standard rows.
    As the Barry's answer was with tables embedding an header row, I did the same.
    As my formula assumes that the two tables have an header row it's perfectly normal that it fails.
    May you make the effort to download iWork Formulas and Functions User Guide and read the description of the used formulas ?
    (2) As you replaced $C$1 by $C$4, in your document, the formula is trying to sum values which are lower than Row 4 so it's logically returning 0.
    Here is the document which was used to build the formula.
    In cell A1 of Tableau 2b, the formula is :
    =SI(PETITE.VALEUR(Tableau 1b :: E;LIGNE())=99999;"";SOMME(DÉCALER(Tableau 1b::$C$1;PETITE.VALEUR(Tableau 1b :: E;LIGNE())-1;0;1;2)))
    In English it would be :
    =IF(SMALL(Tableau 1b :: E,ROW())=99999,"",SUM(OFFSET(Tableau 1b::$C$1,SMALL(Tableau 1b :: E,ROW())-1,0,1,2)))
    In Swedish I assume that it would be :
    =OM(MINSTA(Tableau 1b :: E;RAD())=99999;"";SUMMA(PASSA(Tableau 1b::$C$1;MINSTA(Tableau 1b :: E;RAD())-1;0;1;2)))
    This time, be fair enough to :
    (a) temporarily rename your main table as Tableau 1b
    (b) apply copy & paste !
    When you will check that it behave well, reset the table's original name.
    The formula will automatically reflect the change.
    Yvan KOENIG (VALLAURIS, France) vendredi 24 février 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • Flex Table Add Row Issue with Dynamic Entry Lists in Visual Composer

    All,
    Your help would be kindly appreciated in resolving an 'Add Row'-issue within a Flex Table that uses Dynamic Entry Lists in Visual Composer. The issue here is as follows :
    When I use a [Local Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=O5hrG2aMxWZ84Mu1211193041]to populate a row field, the initial row and all next rows are emptied upon 'insert row', they loose their selected values and also the entry list values ('pull-down menus') are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    The initial row does [show the entry list values |http://www.postyourimage.com/view_image.php?img_id=2HybmEHAuQYs9cg1211192766]from the Local Dynamic Entry List based on the dynamically assigned input value; upon 'insert row' the entry lists are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    When using a [Global Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=m5p2KYuBb442dTq1211193501]to populate the row fields the Flex-table behaves normally as expected. Unfortunately with a Global Entry List it is not possible to dynamically assign a input value. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=U96V0zENCCyO3gA1211193157].
    Please also see the [issue summary image|http://www.postyourimage.com/view_image.php?img_id=06xti08tIEfely1211195178] I made to visualize the issue.  What I basically would like to know is whether this is a 'known issue' or not, or that it is an issue that can be fixed or whether there is an alternative workaround available ... I'm using Visual Composer 7.0 and the Portal is at SP 13.
    Many thanks,
    Freek

    Hi,
    you should be able to assign a dynamic value with global entry lists as well. If you say @myParam as dynamic value. VC will indicate in red letters, that the field @myParam is unknown. However, it will work, as long as @myParam is known in the form or table where you use the entry list.
    I have never heard of the problem that entry lists are emptied after "insert"-event.
    Kindes Regards,
    Benni

  • Weird Problem with Add Row Button in Master Detail Page

    I have a page that was created with a Master Detail Wizard. When I click the Add Row button on our Production Environment, the row counter increments BUT no blank row shows on the screen.
    In our Development Environment, when I click the Add Row button, a blank row appears as expected. Thinking there was some problem with the production app, I exported the Dev version and imported into Production. Still no blank row.
    Thinking perhaps it had something to do with the data, I copied our production application data back into the development application tables. Still, the development app creates the blank row where the production version does not.
    I even used the same browser window for both environments and still get the same results. This was working fine in production then just stopped one day.
    The only clue I have is that the Add Row WILL work if the Master Record has no details or less than a page worth. It seems to happen when the detail records are more than one page worth. Also, when I click the Add Row button, it goes to the last page of the list (say three pages of 10, 10, 6) but no blank row shows up. Again, works fine in the development environment no matter how many pages.
    Any ideas or suggestions why this is happening? Could there be some environment setting that is causing this to happen?

    I have a page that was created with a Master Detail Wizard. When I click the Add Row button on our Production Environment, the row counter increments BUT no blank row shows on the screen.
    In our Development Environment, when I click the Add Row button, a blank row appears as expected. Thinking there was some problem with the production app, I exported the Dev version and imported into Production. Still no blank row.
    Thinking perhaps it had something to do with the data, I copied our production application data back into the development application tables. Still, the development app creates the blank row where the production version does not.
    I even used the same browser window for both environments and still get the same results. This was working fine in production then just stopped one day.
    The only clue I have is that the Add Row WILL work if the Master Record has no details or less than a page worth. It seems to happen when the detail records are more than one page worth. Also, when I click the Add Row button, it goes to the last page of the list (say three pages of 10, 10, 6) but no blank row shows up. Again, works fine in the development environment no matter how many pages.
    Any ideas or suggestions why this is happening? Could there be some environment setting that is causing this to happen?

  • Flex Table Add Row Issue with Dynamic Entry Lists

    All,
    Your help would be kindly appreciated in resolving an 'Add Row'-issue within a Flex Table that uses Dynamic Entry Lists in Visual Composer. The issue here is as follows :
    When I use a [Local Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=O5hrG2aMxWZ84Mu1211193041]to populate a row field, the initial row and all next rows are emptied upon 'insert row', they loose their selected values and also the entry list values ('pull-down menus') are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    The initial row does [show the entry list values |http://www.postyourimage.com/view_image.php?img_id=2HybmEHAuQYs9cg1211192766]from the Local Dynamic Entry List based on the dynamically assigned input value; upon 'insert row' the entry lists are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    When using a [Global Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=m5p2KYuBb442dTq1211193501]to populate the row fields the Flex-table behaves normally as expected. Unfortunately with a Global Entry List it is not possible to dynamically assign a input value. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=U96V0zENCCyO3gA1211193157].
    Please also see the [issue summary image|http://www.postyourimage.com/view_image.php?img_id=06xti08tIEfely1211195178] I made to visualize the issue.  What I basically would like to know is whether this is a 'known issue' or not, or that it is an issue that can be fixed or whether there is an alternative workaround available ... I'm using Visual Composer 7.0 and the Portal is at SP 13.
    Many thanks,
    Freek

    Hi,
    you should be able to assign a dynamic value with global entry lists as well. If you say @myParam as dynamic value. VC will indicate in red letters, that the field @myParam is unknown. However, it will work, as long as @myParam is known in the form or table where you use the entry list.
    I have never heard of the problem that entry lists are emptied after "insert"-event.
    Kindes Regards,
    Benni

  • Add column with row number to table

    Hi,
    to a table view I'd like to add a new column that contains the row number for each row.
    I have many data sources (twelve) and with the union operator I create one output dataset. The output data is sorted by the arrangement of the input ports of the union operator.
    Is there a way to add a column with its corresponding entry number?
    Regards, FT

    I have a similar question to the original post. It seems your answer will fill the new field in all rows with the same value. But, what if we want an actual row number?
    I am simply looking to add a row number to a table. I only have one data source. The business scenario is that the output of the data service is sorted in descending order on value. I want to be able to select the first 10 (i.e. the top 10 items based on that value).
    Even if I can solve my business scenario without using a row number field after the sort, it seems like a technique that would come in handy. 
    Any ideas? I'm pretty new to using Visual Composer so I may be missing something obvious.

  • Issues with Advance Table Add Row New Row not work in some scenarios.

    Hi,
    Wondering if there's any issue with Advanced Tables where it does not create any rows. I don't know if anyone tried this or not. I have one OA Page with Advanced Table and a button that when clicked open a new OA Page in a POP-UP Window. The pop-up page conatins one textbox where u enter a data and this gets saved in one of the VO's transient attribute. Now on the ase page if you don't click a button to open a pop-up page you can Add New Rows in the Advanced Table by clicking Add Row Button. But as soon as you open a popup window and close it Add New Rows button doesn't work and is not creating any new rows. Basically page stops working. Both the POP-UP and the base page share the same AM but have different controllers.
    POP-UP page is a custom page that I open giving the Destination URI value in the button item and target frame _blank.
    I even tried creating rows programmatically for Advance Table but this too doesn't work once u open a pop-up. Also I have used pageContext.putTransactionValue in the pop-up page and am checking and removing this in the base page.
    Any help is appreciated.
    Thanks

    anyone

  • Problems with updatable Report - add rows

    Hello,
    I've an updatable report with about 650 rows.
    When I press the button "add rows" there is no empty row displayed.
    Is there a limit of rows for the updatable report?
    The report row limit is 1000 and the rows per page are 50.
    Thanks in advance
    Ulrike

    Hello Aiman,
    First ensure that your app is not pointing to .NET framework 4.0 client install.  I believe you are talking about VS2010 and CR4VS2010.
    You need to go to properties of the project --> 'Application' tab --> Target framework --> select frame work 4.0.
    You should be able to see the viewer in reporting section. Note # 1529493 have the details. Check:
    http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/f64f7c55-bbda-42f9-9d6e-a3c1e8f56300
    Hope it helps!
    Thanks.
    Edited by: A G on Nov 24, 2010 8:37 PM

  • How do I create an "Add Row" button (add instance with click activity)

    I've been looking through a couple of examples, but the xml is lost on me. I need to learn how to do this for myself because it'd help me out on so many forms. There're forms I just simply cannot do without this function.
    Where I get lost is the javascript linking the button to the specific table. I've been trying to use this I found in an example:
    <event activity="click"><
    script contentType="application/x-javascript">SAPS350a.Page1.TableData1.Table1.Row2.instanceManager.addInstance(1);</script></
    event>
    Now, I'm a complete newbie, so I'm sure someone can point out to me exactly what's wrong, but I dont know what "SAPS350a" means nor can I figure out where the label "TableData1" connects to.
    If anyone can explain this in a "add rows for dummies" fashion, I'd be greatly appreciative.
    See attached an example of one of the fields I need to repeat.

    Hi Liz. You shouldn't really be playing in the xml. Especially if you are a newbie . You could corrupt the whole form if you do something wrong and you probably wont be able to rectify it. Scripts must be added in the script window. In your post, the 'SAPS350a.Page1...' is the path to the row of the particular form that you copied that code from. I have added a button to your form. have a look at the script to see what i have done.

  • Issue with empty value of LOV of first row after clicking on add row button

    JDeveloper 11.1.14
    I have a page with table-form layout.
    In the form I have two detail tables on the same page (tabbed).
    I have an issue with using model-choicelist LOV's in the detail tables.
    I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
    I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
    After saving the new row I get the following error on the screen:
    Error: a selection is required. --> first row
    Does anyone have a suggestion how to solve this issue?

    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?

  • Is there a way to add rows to a table in a fillable PDF?

    I have created a fillable form, but the table I've created only has 9 rows. I'd like to be able to expand the rows on demand. If they're needed, then the user could add rows to the table as needed. It's an expense form, so the rows need to be there when there are multiple expenses, but not there when there are only a few expenses. Any/all help is appreciated. Thanks!

    here's more background infomation... I have some audits setup on my database for one of my users. Every quarter I have an automated job that runs that creates a usage/statics report for this person using data in aud$. at the end of the job I export the aud$ table and truncate it. However last quarter I found that there was a mistake in my report and my export did not run properly thus my audit data was gone. i also have full datapump exports that run daily but found that aud$ was not there. so that is why I thought I'd like to include sys.aud$ in the full datapump exports.
    i understand why other sys tables would be left out of a full export but aud$ data cannot be reproduced so to me it makes sense to include it in a full export.
    don't worry, we run our true backups using rman which is eventually how I got the aud$ data back by creating a copy of my database up until the time of the truncate. however this was quite time consuming.

  • Problem with a table that user can add rows to

    I have a form that has a table with header.  I have included a button that users can click to add rows to the table.  I have gotten a few forms back where for some reason the header row has been repeated.  I haven't been able to recreate this on my end and my users can't identify exactly what they are doing to get those extra header rows.  I have included screen shots of the problem pages here.  I would love to upload the form since I believe my issue is with the script, but can't seem to do that.  I'm signed in to adobe.com, but when I go to new and documents and upload a file, everything is greyed out.  Am I missing something that would enable me to upload the document? Specific instructions would be appreciated.
    Thanks!

    Hi,
    For both/all tables the HeaderRow should not be set to repeat (see the Object > Binding palette). Go to the HeaderRow in the hierarchy (for each table) and untick the "Repeat Row.."
    That should solve the problem.
    Niall

Maybe you are looking for

  • How do i switch all my info over to my new apple id?

    My sister and I have been sharing an apple id now for a while and now because of complications we need our own account each.That includes she has her own icloud and i have my own.She lives 90 miles away so i dont have access to her close up.She has a

  • FWSM Active/Standby in VSS mode

    hello, i do have two 6500 in VSS mode , and one FWSM module on each 6500, i want to configure these modules as Active/Standby, how do i start , should i  follow this (not in VSS mode): http://www.cisco.com/en/US/docs/security/fwsm/fwsm32/configuratio

  • Finder shows my pics, but iPhoto says No Items..

    Hello, I hope someone can help me with this problem. I just transferred my photos from my pc to the folder "iPhoto" on my iMac. When I open Finder, my picture files are there, but when I open "iPhoto" and the Library is highlighted, there are no pics

  • Material Ledger -- WIP values

    Hi,   We have material ledger functionality active and want to extract the WIP values based on the Production Order. Currently we are executing transaction Code CKMLWIPDISP for viewing the WIP details and the values in object currency and controlling

  • Plus sign not working anymore for distribution group

    Without our Outlook client it was possible to make a New E-mail, enter a part of the distribution group, pressing control-k to force lookup the group and it was resolved. With the plus sign you can expand the requested ditribution group. Now this is