Add New Row in Table on click of a button

Hi All,
I am using JDeveloper 11.1.5
I have a af:table with a detailFacet. In this detailFacet there is an af:commandButton. On click of this commandButton I want a new row to be added to the table programmatically.
In my Backing Bean I have following code for my button:
public String cb1_action() {
// Add event code here...
//RowKeySetImpl rowKeySet = new RowKeySetImpl();
CollectionModel tableModel = (CollectionModel)t1.getValue();
JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
// DCDataRow rw = (DCDataRow)tableIteratorBinding.getRowSetIterator().createRow();
// tableIteratorBinding.getRowSetIterator().insertRow(rw);
Row lastRow = tableIteratorBinding.getNavigatableRowIterator().last();
Row newRow = tableIteratorBinding.getNavigatableRowIterator().createRow();
newRow.setNewRowState(Row.STATUS_INITIALIZED);
int lastRowIndex = tableIteratorBinding.getNavigatableRowIterator().getRangeIndexOf(lastRow);
tableIteratorBinding.getNavigatableRowIterator().insertRowAtRangeIndex(lastRowIndex+1, newRow);
tableIteratorBinding.setCurrentRowWithKey(newRow.getKey().toStringFormat(true));
AdfFacesContext.getCurrentInstance().addPartialTarget(t1);
return null;
On running this ,I get an Exception some thing like UnsupportedOperationException.
Please help me to find where I am wrong.

Take a look at this post which could provide solution for your use-case:
http://mjabr.wordpress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/
Thanks,
Navaneeth

Similar Messages

  • Add new row in table between two rows - OATableBean

    Hi,
    I have a requirement where I need to add a new row between two rows. Lets say I have a table with 5 rows. I am envisioning having an icon (table switcher) on the row #1, which when clicked will insert/create a new row between rows #1 and #2 like #1.5, something that can be achieved in core forms. In core forms, when we click the add button, it immediately creates a new row before the current row ( and pushes other rows down). Is that possible with OATableBean. Please let me know if you have any ideas.
    Thanks,
    Ravi.

    Hi,
    I used following code to insert the row in the end
    public void createNewRow()
    XXEGASRLinesVOImpl vo =getXXEGASRLinesVO1();
    Row row1 ;
    int i;
    Row row[] = vo.getAllRowsInRange();
    row1 = vo.createRow(); //vo.createRowSet("10");
    vo.insertRowAtRangeIndex(row.length,row1);//.insertRow();
    row1.setNewRowState(Row.STATUS_INITIALIZED);
    Check if it works for you, you have to modify it to meet your requirement.
    Regards,
    Reetesh Sharma

  • Create a new row in a table without using add new row button

    I want to add a new row to the table without using the add new row button of the table. I'm not able to display default row in the table. Though if click on apply the record appears after saving in the database. Any thoughts how to implement this functionality.

    Here is what you have to do.
    1) You have to handle this in processRequest()
    2) In the AM code , u need to check if there is already a row exisit or vo is blank
    if (vo.getFetchedRowCount() == 0)
    // first time
    vo.setMaxFetchSize(0); // THIS IS REQUIRED.
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    else
    //If already rows are there then you suppose to insert in the end
    // i assume you would have execute your vo
    YourVORowImpl row= (YourVORowImpl)vo.getRowAtRangeIndex(0);
    vo2.insertRowAtRangeIndex();
    It should work.

  • How to ADD new Row In ADF Table?

    Hello!
    I need to insert a row in table when clicking on the "New", can someone help me? Citing some examples? I'm lost.
    My table is called tableArchive, and I need to add a line on it.
    This table is a list called listArchive, which is associated to this table.

    On the button drag drop createInsert operation from DataContol .
    go to data control->open your table VO-> open operatin inside that.-> drag drop the createInsert.Put id of button into partial trigger of table.make button autosubmit to true.
    see this
    Creating a New Row Using an ADF Iterator Binding
    Unwinding ADF: How to add a new row at the end of the ADF Table

  • Add new row to a table

    Hello!
    I'm using JDev 11.2 and I'm trying to add a new row to a table object (using create insert)
    the catch is this-
    and the new empty row that will appear- I want a value set instead of one of the values- so the user can choose which value to insert
    do you know how can this be done?
    (just to be clear- i know how to add a value set, I know how to add new row- dont know how to make the new row contain value set field)
    tnx for your time
    Talya

    If you use a model driven list of value on the attribute in question this should work automatically.
    Have you setup a LOV on the attribute? Have you (on the attribute) checked that the ui-hint is set to selectOneChoice?
    Timo

  • How to add new row at the top of the advance table.

    Hi,
    I have one advanced table.
    I want to add new rows in advanced table. I can able to add rows using the AddMoreRows button in the footer of the advanced table.
    This adds the row at the end. But I want to add the row at the top.
    How to achive this? Please suggest.
    Thanks & Regards,
    Raja

    Hi,
    Yes you can do it...
    Just set the add Rows automatically property to False of Add Row Button
    and then in processForm Request capture the addRows event
    and invoke a method in AM and then create a new Row in VO.
    Use this code...it will insert row at the top...
    if("addRows".equals(event))
    am.invokeMethod("addrows");
    public void addrows()
    AddressesVOImpl vo1 = getAddressesVO1();
    AddressesVORowImpl row1 = (AddressesVORowImpl)vo1.createRow();
    vo1.insertRowAtRangeIndex(0,row1);
    vo1.setCurrentRow(row1);
    Thanks,
    Gaurav

  • How to add new rows in Advanced Table along with attribute value?

    Hi,
    I have one advanced table that contain one messageChoice and messageTextInput field.
    I want to add new rows in advanced table. I can able to add rows using the AddMoreRows button in the footer of the advanced table,
    but I want to add attribute value(contactId) each time when new row created.
    contactId I am getting from pageContext.getParameter("contactId")
    How to achive this? Please suggest.
    Thanks & Regards,
    Sunita

    Hi,
    There are two ways to do it.
    1. Use create method of entity object, create method fires whenever you creates new row.
    2. Handle the event raised by addanotherrow button and write logic there to initialize contactid as you are getting contactid from pageContext so I will suggest you to use this method.
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    //write your logic here to default the contact id
    Hope this will help.
    Regards,
    Reetesh Sharma

  • Problem with deleting a new row in table

    Hi
    I'm using JDev 11.1.1.2.0
    Please someone tell me if he/she experience the same issue:
    - I have an simple entity with PrimaryKey other than RowID. I have a ViewObject on top of the Entity.
    - From this view I create Editable table and add createInsert and Delete buttons.
    This is one of the most common scenarios.
    Now when I click createInsert a new blank row is added to the table. I enter it's primary key (because is mandatory) and move selection to some other row (let say X).
    When I go back and select my new Row and press Delete -> it is not deleted but the row X is deleted.
    This is because the table is not refreshed and it cant select the new row.
    How can I deal with this problem?
    Thanks
    Angel

    I tried with adding my selectionListener method like this:
            Object next = selectionEvent.getAddedSet().iterator().next();
            Object prev = selectionEvent.getRemovedSet().iterator().next();
            System.out.println(prev + " " + next);      
            DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding iter = (DCIteratorBinding)bc.get("TestDopSyotvIterator");
            FacesCtrlHierBinding object1 = (FacesCtrlHierBinding)bc.get("TestDopSyotv");
            FacesCtrlHierBinding.FacesModel collectionModel = (FacesCtrlHierBinding.FacesModel)object1.getCollectionModel();
            collectionModel.makeCurrent(selectionEvent);I add new row, enter data and change selection. Then the system.out prints the right keys of the rows.
    But when I go back to the new added row, the system.out prints "null" for the "next" value (that means the rowKey was lost).
    Any ideas how to fix this?

  • Null Pointer Exception When Adding New Row on Table

    Hello JheadStart Team
    I have used detail group with table layout , when I am clicking on AddRow button on detail table , I encounter NulllPointer Exception . I have traced the code and fount that in JhsCollectionModel when adding new row following
    condition occurs :
    DCIteratorBinding ib = getRangeBinding().getIteratorBinding();
    int rangeSize = ib.getRangeSize();
    int rowsInRange = ib.getAllRowsInRange().length;
    because getAllRowsInRange is Null then the error raise.
    My JheadStart ver is 10.1.3.3.85 .
    Detail Group with table layout setting is :
    Use Table range=true
    Show New Row at top=true
    New Rows:empty
    Show Add New Row Button :true
    Regards

    Given the build you are using, I assume you are an Oracle employee.
    Is this correct? if so, please post your question to the [email protected] mailing list.
    Steven Davelaar,
    JHeadstart team.

  • Adding new rows to table - using TableRowSorter & RowFilter

    Hi all,
    I have a table where the user can add new rows by selecting a JButton. I have added a text box which allows the user to search for a String value and this filters the table contents and this is all working fine...But when I go to add a new row I get the following exception:
    java.lang.IndexOutOfBoundsException: Invalid range which seems to originate from DefaultRowSorter.rowsInsertedCould someone please give me any ideas to why this is happening, maybe the number of rows that are in the table orginally is set to x and when I add a new row the TableRowSorter is expecting that number not x + 1 which is added due to the button being pressed?
    Seems like I need to update the TableRowSorter to inform it that a new row has been added or something similar to that,
    Thanks,

    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.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • Best method to add new rows

    Hi,
    I am new to apex and would like your suggestions as to the best method to add new row to a table. I do not want to use the wizard because there are many tables in the db. From reviewing this forum, the suggested method is to create the report with a form, the user clicks the 'create' button and it opens up to a new form for data entry. There is a 'submit' button to commit the changes to the table. When/How do I create the PK? Is it at the page render when the new form is opened or in page process when all the fields are committed? I tried to add the 'insert into table..' in the page render to create the new PK but I received oracle error. Am I missing a step? Thanks very much.
    Judy

    Good Morning,
    I have a second question to ask about Inserting rows..I was successful with the sql statement in adding a row to the parent table. Now I need to insert a row in the related child table. There are approx 5 child tables where I need to be able to add rows.
    My questions as to the proper sequence to do this:
    1. do I execute the Insert for the parent table first?
    2. then have the user click the button to add info for the child table and then click another button that does the insert into the child table? At this point, is this where I reference the parent table(fac_seq.currval)?
    INSERT INTO CONTACT(cnt_pk, fullname, street1, city, state, zip, phone, title)
    VALUES (CNT_SEQ.nextval,FAC_SEQ.currval,
    NVL(:P36_FULLNAME, 'No Data'),
    NVL(:P36_STREET1,'No Data'),
    NVL(:P36_CITY, 'No Data'),
    NVL(:P36_STATE,'CA'),
    NVL(:P36_ZIP,'00000'),
    NVL(:P36_PHONE,'555-1212'),
    NVL(:P36_TITLE,'No Data'));
    3. is it proper procedure to have separate insert statements or is it better to have 2 insert statements?
    INSERT INTO FACILITY(fac_pk, fac_type, fac_name, street1, city, state, zip, state_or_tribe, tribe_yn)
    VALUES (FAC_SEQ.nextval,
    NVL(:P211_FAC_TYPE, 'N'),
    NVL(:P211_FAC_NAME,'No Data'),
    NVL(:P211_STREET1,'No Data'),
    NVL(:P211_CITY, 'No Data'),
    NVL(:P211_STATE,'CA'),
    NVL(:P211_ZIP,'00000'),
    NVL(:P211_STATE_OR_TRIBE,'CA'),
    NVL(:P211_TRIBE_YN,'N'));
    INSERT INTO WELL(wel_pk, fac_fk, cnt_fk, geo_fk, well_state_uk, name,site, high_priority_yn,aqui_exempt_yn, well_in_swa)
    VALUES (WEL_SEQ.nextval, FAC_SEQ.currval, CNT_SEQ.currval, GEO_SEQ.currval,
    NVL(:P47_WELL_STATE_UK, '09DI'),
    NVL(:P47_NAME, 'No Data'),
    NVL(:P47_SITE,'No Data'),
    NVL(:P47_HIGH_PRIORITY_YN, 'N'),
    NVL(:P47_AQUI_EXEMPT_YN, 'N'),
    NVL(:P47_WELL_IN_SWA,'U'));
    **I am confused as to how to approach the process of adding rows to a child table. Please clarify for me or direct me to a link that has detailed documentation.
    Many thanks,
    Judy

  • How to add new row and update existing rows at a time form the upload file

    hi
    How to add new row and update existing rows at a time form the upload file
    example:ztable(existing table)
    bcent                      smh            nsmh         valid date
    0001112465      7.4                       26.06.2007
    0001112466      7.5                       26.06.2007
    000111801                      7.6                       26.06.2007
    1982                      7.8                       26.06.2007
    Flat file structure
    bcent                       nsmh         valid date
    0001112465     7.8     26.06.2007  ( update into above table in nsmh)
    0001112466     7.9     26.06.2007  ( update into above table in nsmh) 
    000111801                     7.6      26.06.2007 ( update into above table in nsmh
    1985                      11              26.06.2007   new row it should insert in table
    thanks,
    Sivagopal R

    Hi,
    First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
    Then :
    Loop at it.
    *insert or modify as per your requirement.
    Endloop.
    Regards,
    Srilatha.

  • Error with "Add new Row" button in Master detail VO

    Hi,
    Am having a header VO , Forecast HeaderVO and a child VO
    ForecastLineVO, now forecastHeaderVO has two bind condition attached to it,and when we run header Vo line VO will automatically execute as they are linked by a view link.My child Vo is attached to a advance table, which has a ADD Another Row button,Now when i press the button for the case where no header is is there it shows me a error"Failed to find or invalidate owning entity".
    Below am giving the coding what i have written in the AM to handle the Add New Row button,
    public void createForecastTarget(String month, String year,String fortnight,String forecastmonth,String forecastyear)
    ForecastLineVOImpl vo1=getForecastLineVO();
    ForecastHeaderVOImpl vo=getForecastHeaderVO();
    System.out.println("Start");
    vo.setWhereClauseParam(0,month);
    vo.setWhereClauseParam(1,year);
    //vo.setWhereClauseParam(2,fortnight);
    vo.setWhereClauseParam(2,forecastmonth);
    vo.setWhereClauseParam(3,forecastyear);
    vo.executeQuery();
    if (!(vo1.isExecuted()))
    throw new OAException("ASF", // Message product short name
    "MIS_SEARCH_PENDING");
    // We need to do this on a VO that has not been queried before we insert
    // our first row. We don't want to do it for subsequent inserts.
    System.out.println(vo.getFetchedRowCount());
    if (vo.getFetchedRowCount() == 0)
    // vo.setMaxFetchSize(0);
    int rownum = vo.getFetchedRowCount() ;
    OARow row = (OARow)vo.createRow();
    int rownum1 = vo1.getFetchedRowCount() ;
    System.out.println("In between");
    OADBTransaction transaction = getOADBTransaction() ;
    Number forecastid = transaction.getSequenceValue("MIS_FORECAST_HEADER_S");
    Number forecastlineid = transaction.getSequenceValue("MIS_FORECAST_LINE_S");
    System.out.println(forecastid+" "+forecastlineid);
    row.setAttribute("ForecastId",forecastid);
    row.setAttribute("DataEntryMonth",month);
    row.setAttribute("DataEntryYear",year);
    row.setAttribute("DataEntryFortnight",fortnight);
    row.setAttribute("ForecastMonth",forecastmonth);
    row.setAttribute("ForecastYear",forecastyear);
    vo.insertRowAtRangeIndex(rownum,row);
    vo.clearCache();
    transaction.commit();
    // Required per OA Framework Model Coding Standard M69
    row.setNewRowState(row.STATUS_INITIALIZED);
    OARow row1 = (OARow)vo1.createRow();
    row1.setAttribute("ForecastId",forecastid);
    row1.setAttribute("ForecastLineId",forecastlineid);
    System.out.println("forecast id"+forecastid);
    vo1.insertRowAtRangeIndex(rownum1,row1);
    // Required per OA Framework Model Coding Standard M69
    row1.setNewRowState(row1.STATUS_INITIALIZED);
    else
    int rownum2 = vo1.getFetchedRowCount() ;
    System.out.println(rownum2);//+vo1.getCurrentRow().getAttribute(1))
    System.out.println(vo.first().getAttribute("ForecastId"));
    OARow row2 = (OARow)vo1.createRow();
    row2.setAttribute("ForecastId",vo.first().getAttribute("ForecastId"));
    OADBTransaction transaction = getOADBTransaction() ;
    Number forecastlineid1 = transaction.getSequenceValue("MIS_FORECAST_LINE_S");
    row2.setAttribute("ForecastLineId",forecastlineid1);
    // row2.setAttribute("DeleteAttr", "N");
    vo1.insertRowAtRangeIndex(rownum2,row2);
    // Required per OA Framework Model Coding Standard M69
    row2.setNewRowState(row2.STATUS_INITIALIZED);
    System.out.println("forecast line id"+forecastlineid1);
    Now while debugging i found out that am getting the error in the if block
    in the code
    OARow row1 = (OARow)vo1.createRow();

    Hi,
    Summit ,again am getting the error and i think am getting it in the line when am trying to create one for line VO
    as OARow row1=(OARow)vo1.createRow();
    Below am giving the stack trace
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1142)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1294)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2396)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
         at mis.oracle.apps.asf.dcp.frcst.webui.ForecastDealerCO.processFormRequest(ForecastDealerCO.java:158)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    oracle.apps.fnd.framework.OAException: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:985)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:692)
         at mis.oracle.apps.asf.dcp.frcst.webui.ForecastDealerCO.processFormRequest(ForecastDealerCO.java:158)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Please help.

  • How can I add new row/column into existing jTable?

    Hi add!
    Can you help me how can I add new row/column into existing jTable?
    Tnx in adv!

    e.g
    Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
    their handlers are:
    add new row:
    //i supose u already have
    DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
    //and   
       JTabel jtable = new JTable(tablemodel);
    // Handler (row)
    jbtAddRow.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent e) {
          if(jtable.getSelectedRow() >= 0 )
              tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());  
           else  
                tablemodel.addRow(new java.util.Vector());
        });to add new columns its the same but inside actionPerformed method:
    ask for e.g "Whats the name for the new column"
    then,
       tablemodel.addColumn(nameOfColumn, new java.util.Vector());   Joao
    Message was edited by:
    Java__Estudante

  • Issue with ADD NEW ROW button

    Hi,
    When I click 'ADD NEW ROW ' button, an empty row is getting created as the last but one column.
    I want the new row should be add at last. (as the last row). The code I am using :
    Row row = vo.createRow();
    vo.last();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Can anybody please tell me how to get it.
    Thanks,
    Swaroop

    Hi Shiv,
    I just added a 'Add New Row' submit nutton.
    In Controller I added the following code:
    if (pageContext.getParameter("Addrow") != null)
    am.invokeMethod("createrow",null);
    In AM code I've written:
    public void createrow()
    OAViewObject vo = (OAViewObject)getEntityshift2VO1();
    Row row = vo.createRow();
    vo.insertRow(row);
    vo.last();
    row.setNewRowState(Row.STATUS_INITIALIZED);
    --Swaroop                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for