Creating a new row in a JTable

How do i make a new row in a JTabel?

is there a line something like: newRow(); but anyway here is the code i have so far thanx for the help:
class UserSettings extends JFrame implements ActionListener {
  private JMenuBar menu = new JMenuBar();
  private JMenu Settings;
  private JMenuItem exit;
  private JButton sset;
  String[] columnNames = {"users","passwords"};
  Vector dat = new Vector();
  private JTable usertable;
  public UserSettings() {
    setSize(new Dimension(350, 350));
    setTitle("User Setings");
    Settings = new JMenu("Settings");
    menu.add(Settings);
    exit = new JMenuItem("Exit");
    exit.addActionListener(this);
    Settings.add(exit);
    sset = new JButton("Save settings");
    sset.addActionListener(this);
    try {
      BufferedReader userin = new BufferedReader(new FileReader("users/userp.txt"));
      String su;
      while ((su = userin.readLine()) != null) {
        String[] uspa = su.split(" ");
        dat.add(uspa);
    catch (FileNotFoundException ioe) {
      JOptionPane.showMessageDialog(null, "Iternal Error, contact [email protected] if the error persists", "", JOptionPane.WARNING_MESSAGE);
    catch (ClassCastException ioe){}
    catch (NullPointerException ioe) {}
    catch (IOException ioe) {
      JOptionPane.showMessageDialog(null, "Iternal Error, contact [email protected] if the error persists", "", JOptionPane.WARNING_MESSAGE);
    String[][] data = new String[dat.size()][];
    for(int x = 0; x < dat.size(); x++) {
      data[x] = (String[])dat.get(x);
    usertable = new JTable(data, columnNames);
    JScrollPane scrollpane = new JScrollPane(usertable);
    usertable.setPreferredScrollableViewportSize(new Dimension(50, 500));
    JPanel pane = new JPanel(new GridLayout(0, 1));
    getContentPane().add(scrollpane);
    getContentPane().add(sset, BorderLayout.SOUTH);
    setJMenuBar(menu);
  public void actionPerformed(ActionEvent e) {
    if (e.getSource() == sset) {
         int count = usertable.getRowCount();
         if (count == 1) {
         if (count == 2) {
         if (count == 3) {
      try {
           FileWriter uname = new FileWriter("users/usertest.txt");
           String sname;
           uname.write("test");
           uname.close();
      catch (IOException ioe) {
           JOptionPane.showMessageDialog(null, "Error saving you file, if error persists contact [email protected] or reenstal", "", JOptionPane.WARNING_MESSAGE);
      dispose();
    if (e.getSource() == exit) {
      int exitask = JOptionPane.showConfirmDialog(UserSettings.this, "Are you sure you want to exit? Any unsaved settinging changes will be lost!!");
      if (exitask == JOptionPane.YES_OPTION) {
        dispose();
Thanx again

Similar Messages

  • How to create new rows in a JTable dynamically?

    I want to add new rows to a JTable dynamically based on my resultset from the database .
    How to do ?
    Please help me
    Thanks in advance

    Thank u for ur reply .But still i need to clarify something.
    I've used the below code to create a basic table within my frame.
    Object[][] data = {      {"dilipp", "r",      "early", "10","20"}};
    String[] columnNames = {"First Name", "Last Name", "payment", "from", "to"};
    table = new JTable(data, columnNames);
    after this i connect to database and query .The values returned are to be populated in the table created above through say a button "Next" month.
    now my button event goes like this :
    public void actionPerformed(ActionEvent e)
         if (e.getActionCommand().equals("next"))
    here i need to add a new row for the values
    How to add here ?
    please tell me

  • While creating a new row in table,the total data present in table is coming

    Hi,
    From search page,i click add button,it goes to next transaction page.In transaction page i drag and drop one VO in table and in form also.But in that transaction page,The table is coming with data and a new row is also able to insert.But i don't want the previous data whatever present in table in create a new row time.Please give me the solution.
    Thanks in advance
    Sravanthi

    Not sure I understand what you are trying to do.
    If you have a table and a form based on the same data on one page you see the already existing data in the table. If you don't want to see the existing data in the table while entering a new row, the simplest solution would be to
    a) hide the table after the use hits create new row or
    b) navigate to an other page which only shows the form
    Timo

  • Create a new Row in an advanced table in an advanced table

    Hi,
    I am handling the master detail relationship. For this i have used advanced table in an advanced table. I am facing a problem while creating a new row in the inner advanced table.
    I have a Display Sequence column in the inner advanced table. I want to handle the logic for displaying the value of this attribute. As per dev guide i have attached the view link and for handling the Add New row event i am using the below code
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    This is working fine. The challenge i am facing is for creating a new row. Below is the code given in dev guide
    // get a handle to inner tableOATableBean innerTable =
    (OATableBean)webBean.findChildRecursive("InnerTableBean");
    // create an enumeratorOAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, innerTable);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    for (int i = 0; i < rowsInRange.length; i++)
    Row nextRow = (Row) rowsInRange;
    // In case you want to add new rows in this RowSet, you can do the same
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("SomeAttr", "SomeValue");
    innerRowSet.insertRow(newRow);
    The Above code creates a new Row in all the master records.
    How do i identify that the add new Row event has been triggered for which master record?
    Can any body please help me on this. I am stuck from a long time and am unable to find the appropriate solution.
    Thanks in advance
    Raj Papdeja

    Hi,
    Following is the code written in PFR,
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    System.out.println("sublineDetailsTableBean::"+sublineDetailsTableBean);
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    System.out.println("lineTableFooterBean::"+sublineTableFooterBean);
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Inside Add New Row Button Event for the Sub Lines");
    strValueParam = (String) pageContext.getParameter(VALUE_PARAM);
    System.out.println("strValueParam=>"+strValueParam);
    ViewLink vl = am.findViewLink("GEPSCSTaskLineToSublineVL1");
    System.out.println("View Link=>"+vl);
    if(vl != null)
    OAViewObject vo = (OAViewObject) vl.getSource();
    if(null != vo)
    GEPSCSTaskLineItemsVORowImpl voRow =
    (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    /*OAViewObject vo = (OAViewObject) am.findViewObject("GEPSCSTaskLineItemsVO1");
    GEPSCSTaskLineItemsVORowImpl voRow = (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Line No::"+LineNo);*/
    // Getting the LineNo as null
    /*int intRowCount = vo.getRowCount();
    if(intRowCount > 0)
    System.out.println("Sublines are already present");
    GEPSCSTaskLineItemsVORowImpl tasklineVORow =
    (GEPSCSTaskLineItemsVORowImpl)vo.getCurrentRow();
    Number lineNo = (Number) tasklineVORow.getLineNo();
    System.out.println("LineNo=>"+lineNo);
    Number lastLineDispSequence = null;
    // Method to set the display sequence
    //am.invokeMethod("createNewSublineRow");
    // create an enumerator*/
    OAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, sublineDetailsTableBean);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    intRowCount = rowsInRange.length;
    System.out.println("intRowCount=>"+intRowCount);
    if(intRowCount == 0)
    System.out.println("No Rows present");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(1));
    innerRowSet.insertRow(newRow);
    else if(intRowCount > 0)
    System.out.println("Rows are already present");
    Row nextRow = (Row) rowsInRange[intRowCount-1];
    lastLineDispSequence = (Number) nextRow.getAttribute("DisplaySequence");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(lastLineDispSequence.intValue()+1));
    innerRowSet.insertRow(newRow);
    break;
    When i try to fetch the Line No which is the primary ID of the Parent VO, it always returns me the LineNO of the first Row and not of the parent row for which i have clicked the Add new Subline button of the Child record
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    Is there any way to fetch the primary ID of the row for which i have selected the Add new Subline button
    Thanks
    Raj Papdeja

  • Create a new Row in VO

    Hi All
    How to create a new row in VO programatically
    I'm using jd 11.1.1.4
    I'm executing a VO and get a row, so I want to assign that row as a new row in the VO and store it in the data base table
    pls tell me how to do this.
    Thanx

    Hi,
    In your backing bean
    public void createRowMethod(){
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("voIterator");
    ViewObject vo = iterBind.getViewObject();
    Row rw = vo.createRow();
    //set the default attributes
    rw.setAttribute("attribute",value);
    vo.insertRow(rw);
    }

  • How to create a new row for a VO based on values from another VO?

    Hi, experts.
    in jdev 11.1.2.3,
    How to create a new row for VO1 based on values from another VO2 in the same page?
    and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
    Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
    How-to declaratively create new table rows based on existing row content (20-NOV-2008)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    I have tried:
    1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
    2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
    3.add: Create insertinside Createwithparams->Nameddata(amount),
    4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
    On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
    java.lang.NumberFormatException: For input string: "Amount"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    Can anyone give some suggestions?
    Thanks in advance.
    bao
    Edited by: user6715237 on 2013-4-19 下午9:29

    Hi,CM,
    I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
    My principal requirement is as follows:
    1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
    --so it's better to implement it in UI rather than in EO.
    2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
    --little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
    In order to get full information for the requirements of my use case, can take a check at:
    How to set default value for a VO query bind variable in a jspx page?
    (the end half of the thread: I have a more realworld requirement similar to the above requirement is:
    Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
    Regards
    bao
    Edited by: user6715237 on 2013-4-19 下午11:18
    JAVE->JAVA

  • Problem creating a new row when using tabbed regions

    I am new to JHeadstart and ADF and have been using the evaluation version of JHeadstart (in JDev 11.1.1.3) to judge its efficacy for a new significantly-sized application. As part of that evaluation I have created a small application (you can do this with HR schema using say the Departments table) with a single entity and VO. On JHeadstart I have then placed some of the fields into multiple Item regions within a Tabbed region on the same page and below the Group (layout style Table, Table Overflow Style below With Splitter). Existing rows display fine and I can view the data on the separate tabs.
    However, if I try to create a row, I can fill in the data on the main region, but if I fill in data on the first tabbed region I cannot switch to the next tab without an error being generated.
    e.g. using Departments - fill in DepartmentId and DepartmentName on main region, fill in ManagerId on first tabbed region and try to switch to second tabbed region to fill in LocationId:
    Missing mandatory attributes for a row with key null of type HRModule.DepartmentsView1
    Attribute DepartmentId in HRModule.DepartmentsView1 is required.
    Attribute DepartmentName in HRModule.DepartmentsView1 is required.
    If you save, then you can navigate.
    You can also demonstrate something similar (different error message but probably the same root cause) on the myJHSTutorial demo. If you navigate to an employee off the regions page and try and create a new employee (using the '+' button below the 'Employees' label), then the tabs are not refreshed and any attempt to change the tabs results in an error
    Failed to validate a row with key oracle.jbo.Key[999 ] in HRModule.EmployeesView3
    Attribute Salary in HRModule.EmployeesView3 is required.
    Salary must be between 6000 and 12000 for this job.
    The JHS devguide does not help. Any thoughts? I can send the HR sample if you wish.

    OK, I was able to reproduce this. The problem is that when you switch tabs, a partial page request is send to the server which does not include the items filled in the table row itself, hence these items are not updated in the underlying view object row.
    Solution is to have a partial trigger at the table or group level listening to tab events. We will add that to the next release, but you can also apply the fix yourself by adding the following lines to the stackedRegionContainer.vm template:
    #if (${JHS.current.pageComponent.tableLayout} && !(${JHS.current.pageComponent.hasOverflowInline}))
    ## when creating a new row in a table, and using overflow right/below, when switching overflow tabs
    ## the items filled in the table itself must also be processed as part of JSF model update phase, to
    ## prevent required item error when clicking another tab in overflow area
    ## we can enforce this by making the whole group listen to tab events
    #ADD_CUR_GROUP_PARTIAL_TRIGGER("#REGION_ID()Tabs")
    #end
    Add these lines just before the line starting with
    <af:${elemName}
    Steven Davelaar,
    JHeadstart team.

  • Problem while creating a new row

    I am trying to create a new row in FulfillmentLineEntryResultVORowImpl which will be within the CheckAvailabilityOutputVORowImpl.
    For that I am trying to do the following coding and I am getting the "NullPointerException" while creating the "flrow".
    Please look in the code and suggest me the correct way.
    CheckAvailabilityOutputVOImpl outputVO = getCheckAvailabilityOutput1();
    CheckAvailabilityOutputVORowImpl outputRow = null;
    outputRow = (CheckAvailabilityOutputVORowImpl)outputVO.createRow();
    FulfillmentLineEntryResultVOImpl fle = getFulfillmentLineEntryResult1();
    FulfillmentLineEntryResultVORowImpl flrow = (FulfillmentLineEntryResultVORowImpl)fle.createRow();
    flrow.setErrorCode("26");
    fle.insertRowAtRangeIndex(0, flrow);
    and
    public CheckAvailabilityOutputVOImpl getCheckAvailabilityOutput1() {
    return (CheckAvailabilityOutputVOImpl)findViewObject("CheckAvailabilityOutput1");
    public FulfillmentLineEntryResultVOImpl getFulfillmentLineEntryResult1() {
    return (FulfillmentLineEntryResultVOImpl)findViewObject("FulfillmentLineEntryResult1");
    }

    Hi,
    I am using transient VO.
    The code that i mentioned earlier is to create the dummy response for the web service in error condition.
    For normal condition we are getting data from XML and by using readXML I am generating row nicely.
    The piece of code for normal scenario where it is working nicely is...
    Document doc = sendMessage("CheckAvailabilityInput", headerNode);
    CheckAvailabilityOutputVOImpl outputVO = getCheckAvailabilityOutput1();
    outputVO.readXML(doc.getDocumentElement(), -1, getXslForReadXML());
    if (AppsLogger.isEnabled(AppsLogger.FINE)) {
    Node headerNode1 = (XMLNode)outputVO.writeXML(-1, XMLInterface.XML_OPT_ALL_ROWS | XMLInterface.XML_OPT_ASSOC_CONSISTENT);
    try {
    Writer sw = new StringWriter();
    ((XMLNode)headerNode1).print(sw);
    } catch (IOException e) {
    AppsLogger.write(this.getClass(),
    "Couldn't convert the VO to xml",
    AppsLogger.FINE);
    outputRow = (CheckAvailabilityOutputVORowImpl)outputVO.getRowAtRangeIndex(0);
    And The xml that I am using is like below....
    <?xml version="1.0" encoding="utf-8"?>
    <checkAvailabilityOutput xmlns:op="http://xmlns.oracle.com/apps/scm/orderPromising/orderPromising/promisingServices/types/">
    <PromisingSystem>DOO-OP</PromisingSystem>
    <PromisingInstance>Instance</PromisingInstance>
    <PromiseDate>2012-08-22</PromiseDate>
    <FulfillmentLineEntryResult>
    <FulfillmentLineReply>
    <FulfillmentLineIdentifier>FID-003</FulfillmentLineIdentifier>
    <NumberOfAltOptions>0</NumberOfAltOptions>
    <DefaultAvailabilityOption>
    <OptionRank>0</OptionRank>
    <OptionSummary>0</OptionSummary>
    <FulfillmentLineResult>
    <FulfillmentLineIdentifier>FID-003</FulfillmentLineIdentifier>
    <TotalPrice>8000</TotalPrice>
    <TotalProfit>-392000</TotalProfit>
    <TotalMargin>-98</TotalMargin>
    <TotalValue>-392000</TotalValue>
    <NumberOfSplits>0</NumberOfSplits>
    <NumberOfSubstitutions>0</NumberOfSubstitutions>
    <FillRate>100</FillRate>
    <NumberOfAtpItems>1</NumberOfAtpItems>
    <NumberOfCtpItems>0</NumberOfCtpItems>
    <SourcingRule></SourcingRule>
    <ResultDetail>
    <SplitLineIdentifier></SplitLineIdentifier>
    <Customer>CUST_ID_001</Customer>
    <CustomerSite>CUST_SITE_001</CustomerSite>
    <InternalSalesOrderDestOrg>
    <OrgId></OrgId>
    </InternalSalesOrderDestOrg>
    <PromisingStatus></PromisingStatus>
    <RequestedDate>2012-06-02</RequestedDate>
    <PromisingType>Ship</PromisingType>
    <ExpectedArrivalDate>2012-06-01</ExpectedArrivalDate>
    <ExpectedShipDate>2012-06-01</ExpectedShipDate>
    <ExpectedPickDate>2012-06-01</ExpectedPickDate>
    <RequestedItem>ITEM_CODE_001</RequestedItem>
    <ExpectedAvailableItem>ITEM_CODE_001</ExpectedAvailableItem>
    <ExpectedAvailabilityOnRequestedDate>0</ExpectedAvailabilityOnRequestedDate>
    <ExpectedAvailableQuantity>200</ExpectedAvailableQuantity>
    <ExpectedAvailableQuantityUOM>EA</ExpectedAvailableQuantityUOM>
    <ExpectedShipFromOrg>
    <InstanceId></InstanceId>
    <OrgId>HYDERABAD</OrgId>
    </ExpectedShipFromOrg>
    <ExpectedDropShipSupplier></ExpectedDropShipSupplier>
    <ExpectedDropShipSupplierSite></ExpectedDropShipSupplierSite>
    <ExpectedMode></ExpectedMode>
    <ExpectedService></ExpectedService>
    <ExpectedCarrier></ExpectedCarrier>
    <CarrierCalendar></CarrierCalendar>
    <ExpectedDemandClass></ExpectedDemandClass>
    <ExpectedTotalFulfilmentCost>400000</ExpectedTotalFulfilmentCost>
    <ExpectedShippingCost>0</ExpectedShippingCost>
    <ExpectedMargin>-98</ExpectedMargin>
    <Price>8000</Price>
    <Profit>-392000</Profit>
    <Value>-392000</Value>
    <LineFillRate>100</LineFillRate>
    <ErrorCode></ErrorCode>
    <ErrorMessage></ErrorMessage>
    <PeggingDetail>
    <ItemId>ITEM_CODE_001</ItemId>
    <OrgInfo>
    <InstanceId></InstanceId>
    <OrgId>HYDERABAD</OrgId>
    </OrgInfo>
    <ShippingCalendar>Calendar1</ShippingCalendar>
    <ReceivingCalendar>Calendar2</ReceivingCalendar>
    <ManufacturingCalendar>Calendar3</ManufacturingCalendar>
    <ATPDetail>
    <Quantity>200</Quantity>
    <QuantityUom>EA</QuantityUom>
    <ATPCost>400000</ATPCost>
    <ATPMode>3</ATPMode>
    <LeadTime>0</LeadTime>
    <RequiredQuantity>200</RequiredQuantity>
    <RequiredDate>2012-06-01</RequiredDate>
    <AllocationRule></AllocationRule>
    <DemandClass></DemandClass>
    </ATPDetail>
    </PeggingDetail>
    </ResultDetail>
    </FulfillmentLineResult>
    </DefaultAvailabilityOption>
    </FulfillmentLineReply>
    </FulfillmentLineEntryResult>
    </checkAvailabilityOutput>

  • How do you Copy a row to create a new row in the same table?

    Hi,
    We have a PurchaseOrderHeaderView object and on click of Copy Purchase Order we want to copy a row in PURCHASE_ORDER_HEADER table to create a new row. We don't want to copy the primary key only the remaining fields.
    Regards
    Madhuri

    If you use ADF BC, you can create a new row programatically via createRow and use a sequence to create the Id and use the "original" row (probably the current row in the view object) to copy the values from to newly created row. Then use insertRow and commit to create the copied row.
    Ronald

  • Using the Form javascript.addrow() to pass values while creating a new row?

    Version: 4.1.0
    DB: 11g
    Theme- scarlet 21
    Hi,
    I have a standard tabular form with the add, delete, submit buttons. Now when we hit the Add button, it creates a new row in the form. I had a requirement such that the user selects a row using the standard checkbox and then when he hits add, it should create a new row, and also, copy the contents of the selected row to the new row.
    Is this possible? Any suggestions please? I am thinking that I need to create a pl/sql process under Add button to check if the checkbox is selected, and if yes, then maybe run the javascript addrow(not sure if it can be done) and then try to populate the values.
    Thanks!
    Sun
    Edited by: ryansun on Oct 4, 2012 12:34 AM
    Edited by: ryansun on Oct 4, 2012 12:46 AM
    Edited by: ryansun on Oct 4, 2012 12:46 AM

    Hi Joni,
    Thanks. I am not familiar with JQuery, is there some link where such a logic is implemented? Atleast a basic one of adding a new row, and traversing and capturing the values? In forms we could do it using cursor but not sure how to do it in Apex.
    In my case the requirement is straightforward. If there is a table with three rows and have a standard form in APEX with the add, delete and submit buttons along with the radio checkbox in a tabular form,
    If I select a row and then hit the add button, a new row should be added and the values of the previous row should be passed.
    Would you be having a link to any such demo or documentation on how this is done, would be very helpful.
    Thanks!
    Sun

  • Can we create a new row in a table using a down arrow

    Hi,
    I am using jdeveloper 11.1.1.6.
    For one of my project, I have a requirement where i need to create a new row in table using a down arrow. My client does not want to use mouse clicks. They want to use keyboard as much as possible.(Fast data entry).
    Is it possible to create a new row using down arrow. Any pointers will be helpful!
    Thanks,
    Umesh

    you can try this thing
    steps
    - capture downkey event - may b this help http://www.qualitycodes.com/tip/1/capturing-keys-with-javascript.html
    if not google more
    -then call from javascript call java method - https://blogs.oracle.com/jdevotnharvest/entry/how-to_call_server_side_java_from_javascript
    -then create new row of table VO .....

  • Need to create a new row in table with same data as Primary key, but new PK

    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kale

    user9970447 wrote:
    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kalesomething like
    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')

  • How can I add a new row in a JTable dynamically?

    Dear Sir(s)
    I want to add a new row in a Jtable as I press enter key the time focus is on the last cell of the row? pls help

    TomDooley wrote:
    Hello,
    ...I write directly to a cvs file ...my loop slows down to 0.2 Hz
    Writing a series of 5 values to a file should not take so long. There is probably something wrong in the way you are saving your data. May be you should post a simplified version of your vi, so we could see how to improve your code.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to create multiple new rows in ADF Table?

    Hello,
    being new to ADF Faces/BC I managed to display data in an ADF Table and create new entries using the "CreateInsert" operation (one at a time).
    Now, the next task is to create multiple new rows at the same time, set some default values and display the new rows in the ADF table. Then the user will enter additional data and commit the new rows.
    Where do I step in? In the EntitiyImpl? Can this be handled declaratively or do I have to implement custom method(s) in the AM?
    Thanks
    Gerald

    Hi John,
    I'm still getting the following error
    Error(94,144): method getValue() not found in class javax.faces.el.ValueBinding
    What should it be casted to?
    The code in backing bean is like this..
    package view.backing;
    //import com.test.model.TestAppModuleImpl;
    import javax.faces.component.html.HtmlForm;
    import javax.faces.component.html.HtmlPanelGroup;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    //import javax.faces.event.FacesListener;
    //import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.component.core.data.CoreColumn;
    import oracle.adf.view.faces.component.core.data.CoreTable;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.adf.view.faces.component.core.nav.CoreCommandButton;
    import oracle.adf.view.faces.component.core.output.CoreMessages;
    import oracle.adf.view.faces.component.html.HtmlBody;
    import oracle.adf.view.faces.component.html.HtmlHead;
    import oracle.adf.view.faces.component.html.HtmlHtml;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    //import oracle.jbo.server.ViewObjectImpl;
    //import view.utils.EL;
    public class MultipleInsert1 {
    private HtmlHtml html1;
    private HtmlHead head1;
    private HtmlBody body1;
    private CoreMessages messages1;
    private HtmlForm form1;
    private CoreTable table1;
    private CoreColumn column1;
    private CoreInputText inputText1;
    private CoreColumn column2;
    private CoreInputText inputText2;
    private CoreCommandButton commandButton1;
    private HtmlPanelGroup panelGroup1;
    private CoreCommandButton commandButton2;
    public void setHtml1(HtmlHtml html1) {
    this.html1 = html1;
    public void createMultiRows(ActionEvent actionEvent) {
    DCBindingContainer dc = (DCBindingContainer) FacesContext.getCurrentInstance().getApplication().createValueBinding("#{bindings}").getValue();
    DCIteratorBinding iter = dc.findIteratorBinding("TestView1Iterator");
    ViewObject vo = iter.getViewObject();
    for (int i=1; i<=5; i++) {
    Row newRow = vo.createRow();
    newRow.setAttribute("Id", i);
    ApplicationModule am = vo.getApplicationModule();
    am.getTransaction().commit();
    vo.executeQuery();
    Do I need to import something else?
    Thanks,
    Shri.

  • Creating a New Row Using an ADF Iterator Binding without primary key value

    I dropped a Create action onto a DataAction which forwards to a UIX entry page which contains an enabled Commit button. Part of the primary key value is held in a session bean and it is also current in another view on the model side, but I am unable to access this value to set the EntityImpl primary key attribute.
    Upon submission the following error message is returned from the model:
    ORA-01400: cannot insert NULL into ("GTR"."EMPLOYMENT"."ACCOUNT")
    I would like to accomplish this with databinding and not create a custom create method on the application model. Is there a way to update the binding value for the new row in cache before the submission? Any advice would be welcome.

    I should add that I want the user to enter every attribute value, except for the account number. It must be possible to create a new row and have the account number supplied to the bindings another way.

Maybe you are looking for

  • Itunes 10.5.1 Completly not working in Win7 (64bit)

    This has been a total disaster update for me.  I am running Win7 (64bit) with all my windows updates current.  I went ahead and updated Itunes to 10.5.1. That was a severe mistake.  Itunes crashes every time I start the program.  I notice that genius

  • Option to install on other than C:

    Hi, I just signed up for CS Cloud. When I download the apps, they all seem to install, by default, on my C: I can't have that. My C: is just a startup drive and there's not much space left. Now, I have 2 other 2TB drives with lots of space on them an

  • Bottom border of tab bar is missing in active tab

    I tried Classic Theme Restored and most of it works well, but it's like I have to choose between every tab having a very small border (tabs not on top 1), or tabs having a thick gray border like in 16... EXCEPT the actie tab. (tabs not on top 2.) Can

  • Is there a terminal out there for me?

    I'm sure this has been discussed several times before, but I want to find the right terminal for me. So, this is not another "which xyz-app is best?" thread, but rather a question if I have overlooked something. My candidates so far: konsole Terminal

  • Ios 5 - what will happen when i update my iPhone? Will i loose my contacts?

    When i hit update in iTune for my iPhone 4 to update to ios 5, its says this... Does this mean I will loose all my contacts and calendar? photos? thanks