Creation of new Row in Tree Table

We are creating a new row using CreateListener which is written in Bean, after creating the row, we are adding it to the iterator and the new row is not getting highlighted and focus is not in new row in the table by default. It takes an click to make it editable. 'setActiveRowKey()' method didnot help here which is used in the af:table component to achieve the same.
Any pointers regarding this issue would be helpful..
Thanks,
Shruthi

Hi Max:
According to what you described, it's really wierd. An ADF table is Surrounded by a panelCollection or not doesn't matter in terms of CreateInsert operations, I think. Also each step you said OK doesn't mean that step is 100% problem free towards your final goal. For example, when you drag and drop and ADF table onto a JSF page, you forget to turn on 'row selection', it will be OK, you won't get any error message, but later on when you find that you need to turn it back on, you have to go back to JSF page source, to manually added codes to do so.
The simpliest solution and quickest one is to reinitiate a clean ADF project and do it all over again. It's simple straightforward in my view. Probably don't use PanelCollection first, just drop your ADF table on a form, or af:panelForm, but make sure your table and 'CreateInsert' button is surrounded by a form, otherwise, when you click on 'CreateInsert', nothing will happen. When everything works, then probably back it up and replace your form or af:panelForm with panelCollection. See how it goes.
Thanks,
Alex

Similar Messages

  • New Row in a Table View

    Hi,
    I need to add a new row to a table without using any NEW button. The first column in my table is a drop down . Whenever user selects a value in drop down a new row should be created .
    Also am not able to see drop down options throughout my tableview , Only for created rows am able to see drop downs. How do i activate that ?
    Plz help me....
    Regards,
    Divya

    HI
    GOOD
    go through this link,hope this ll help you to solve your problem
    http://help.sap.com/saphelp_nw2004s/helpdata/en/28/4bae407e69bc4ee10000000a1550b0/content.htm
    thanks
    mrutyun^

  • Problems with adding a new row in my table

    Im an ADF beginner but I thought it would be simple to to do some basic CRUD stuff in ADF. Im now even struggling when i try to add a new row to my table.
    Seems that the primary key id is not set correctly...
    could someone help?

    Hi,
    Have a look to this page CREATE SEQUENCE
    Regards,
    Sébastien
    Creating a Sequence: Example
    The following statement creates the sequence customers_seq in the sample schema oe. This sequence could be used to provide customer ID numbers when rows are added to the customers table.
    CREATE SEQUENCE customers_seq START WITH     1000 INCREMENT BY   1 NOCACHE NOCYCLE;

  • Problem in adding a new row in a table.. plsss hlppp

    Hi Friends,
    I have a table defaulted to 4 rows. I have a add button to add a new row in the table.
    When i have already 4 rows in table, and when i click add its adding that 5th row correctly( and i used set_lead_selection for this new row ).
    But i want to automatically make a next page once i hit the ADD button here. Each time now i m hitting next page then only  able to see hte 5th row. I need once ADD is clicked, i want to see the 5th row visible..
    Can someone tell me how to code or do this
    thanks friends,,,
    Niraja

    hi niraja,
    Plz refer to the following code:
    method onactiononadd .
    node_material type ref to if_wd_context_node.
    elem_material type ref to if_wd_context_element.
    stru_material type sflight.
    node_material =  wd_context->get_child_node( name = 'ANNA' ).
    elem_material = node_material->get_element(  ).
    if ( elem_material is initial ).
    call method node_material->create_element
    receiving
    element = elem_material.
    endif.
    call method elem_material->get_static_attributes
    importing
    static_attributes = stru_material .
    call method node_material->bind_structure
    exporting
    new_item = stru_material
    set_initial_elements = abap_false.
    endmethod.
    i hope it helps
    regards
    arjun

  • Addig a new row in a table in Ess/cats

    Hello all,
    I am working on Ess/cats application.
    By default it is displying me 8 rows.I have to put a button to add a new row in the table.
    but i could not find a way to add a new row.
    Thanks and Regards.
    Punit Pawar

    Hi,
    In the onAction of button Add one more element in node which is bounded to the table. You can use following code.
    public void onActionAddRow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionAddRow(ServerEvent)
           IWDNodeElement element = wdContext.node<Node_Name>().create<Node_Name>Element();" Here Node_Name is the name of node which is bounded to your table.
           wdContext.node<Node_Name>().addElement(element);
        //@@end
    I hope it helps.
    Regards,
    Rohit

  • 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.

  • 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 to adf table progrmatically

    Hi,
    I have a bean with a list and correspoding getter & setter methods inside it.
    I created a datacontrol out of the bean and I am displaying af:table in the ui
    binded to this list.
    Ex:
    public class StudentBean {
    private List<Student> students;
    // getter & setter methods.
    jsp
    <af:table value="#{bindings.students.collectionModel}" var="row"
    rows="#{bindings.students.rangeSize}"
    emptyText="#{bindings.students.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.students.rangeSize}"
    rowBandingInterval="0"/>
    How to add a new row programitically to this adf table.
    I dragged and dropped 'Create' from operations menu on to jsp.
    But on click of that.no new row is being added to the current table.
    On click of a button in u.i I want to add a new row to the table.
    Thanks,
    Praveen

    Hi,
    The source code is as below.
    <af:table value="#{bindings.students.collectionModel}" var="row"
    rows="#{bindings.students.rangeSize}"
    emptyText="#{bindings.students.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.students.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.rscGroupsQuery.queryDescriptor}"
    queryListener="#{bindings.rscGroupsQuery.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.rscGroups.collectionModel.selectedRow}"
    selectionListener="#{bindings.rscGroups.collectionModel.makeCurrent}"
    rowSelection="single" id="t1"/>
    <af:commandButton actionListener="#{bindings.Create.execute}"
    text="Create" disabled="#{!bindings.Create.enabled}"
    id="cb1" partialTriggers="t1"/>
    Please let me know where am I doing wrong?
    On click of this button,it is not adding a row dynamically.
    Thanks,
    Praveen

  • Focusing a field/column in the new row of adf table

    Hi all,
         I am using JDeveloper 11.1.2.4.0. and UI-Shell Template in Main application and sub applications are added to this master application as ADF library jar files. Application is working fine.
    I am trying to focus to make focus on a column in the newly created row in one of the sub application by referring the below link
    http://adfnbpel.wordpress.com/2013/08/14/focusing-a-fieldcolumn-in-the-new-row-of-adf-table/
    I created a single application and found that its working
    But in my application focus is not working.
    When i checked the java script by using FireBug console it is found that comp = AdfPage.PAGE.findComponent(‘”+inputId+”‘); is getting as "undefined" , where inputId = table.getClientId(facesCtx) + “:” + rowId + “:” + “it3″; I am getting the exact row id also. When i tried with by passing the table id as input id like inputId = table.getClientId(facesCtx) ; the fire bug console then showing the table id. So its sound strange.
    What may be the cause of not able to find the input text it3 by using findComponent ?
    Is any body can suggest a solution for this.
    Thanks in advance,
    Gijith

    Hi,
    read up about "findComponentByAbsoluteLocator" in http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    or check ...
    AdfPage JS doc
    Frank

  • How to append new rows in a table with Javascript ?

    Hi ,
    I'd like to append new rows in a table dynamically using javascript?
    Do some of you have already done this before ?

    Rui's answer will create copies of the entire table.  There may be times where thsi is what you want, but you asked about creating new rows.  If your new row is a copy of one of your existing rows, then you could use
    _RowName.addInstance(1);
    (the underscore at the beginning invokes the instance manager).  Is this what you're looking for?

  • 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

  • Please help! (creating new rows in a table)

    Hi guys.
    I have the following table:
    Guest ID | visit ID | start date | end date | days | total amount | avg amount
    1234.......| 6750...| 01/01/08...| 20/01/08 | 20....| $2000.........| $100
    Avg amount = amout per day = days/total amount
    I need to figure out a way of summing up all the profits from, say, last 3 weeks, 2 months etc.
    To do that, I am thinking of breaking up each stay period by days.
    i.e. to create a new row in a table for each day.
    So, for this example, we'd have 20 new rows,
    with same guest iD and visit ID,
    start date and end date are the same because we only count one day...
    Guest ID | visit ID | start date | end date | days | total amount | avg amount
    1234.......| 6750...| 01/01/08 ..| 01/01/08 | 1.......| $100............| $100
    1234......| 6750....| 02/01/08 ..| 02/01/08 | 1.......| $100..........| $100
    etc
    The question is, is there any way to make oracle do this?
    As in, to create new rows (maybe in a new table?)
    Any help/ideas would be appreciated!
    I am using Oracle SQL Plus 8.1.7.0.0

    I have used all_objects to populate multiple records as you are living in stone age :-)
    SQL> drop table temp;
    Table dropped.
    SQL> create table temp (
      2             Guest_ID integer primary key,
      3             visit_ID integer,
      4             start_date date,
      5             end_date date,
      6             days integer,
      7             total_amount integer,
      8             avg_amount integer);
    Table created.
    SQL> insert into temp values (1234, 6750, '01/jan/08', '20/jan/08', 20, 2000, 100);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select t.guest_id,t.visit_id,t.start_date+rownum-1 start_date,t.start_date+rownum-1 end_date, 1 as days, avg_amount as total_amount, avg_amount
      2    from temp t,
      3         (select 1
      4       from all_objects,
      5           (select (end_date - start_date) + 1 day_count
      6              from temp t
      7             where guest_id = 1234)
      8        where rownum <= day_count);
      GUEST_ID   VISIT_ID START_DAT END_DATE        DAYS TOTAL_AMOUNT AVG_AMOUNT
          1234       6750 01-JAN-08 01-JAN-08          1          100        100
          1234       6750 02-JAN-08 02-JAN-08          1          100        100
          1234       6750 03-JAN-08 03-JAN-08          1          100        100
          1234       6750 04-JAN-08 04-JAN-08          1          100        100
          1234       6750 05-JAN-08 05-JAN-08          1          100        100
          1234       6750 06-JAN-08 06-JAN-08          1          100        100
          1234       6750 07-JAN-08 07-JAN-08          1          100        100
          1234       6750 08-JAN-08 08-JAN-08          1          100        100
          1234       6750 09-JAN-08 09-JAN-08          1          100        100
          1234       6750 10-JAN-08 10-JAN-08          1          100        100
          1234       6750 11-JAN-08 11-JAN-08          1          100        100
      GUEST_ID   VISIT_ID START_DAT END_DATE        DAYS TOTAL_AMOUNT AVG_AMOUNT
          1234       6750 12-JAN-08 12-JAN-08          1          100        100
          1234       6750 13-JAN-08 13-JAN-08          1          100        100
          1234       6750 14-JAN-08 14-JAN-08          1          100        100
          1234       6750 15-JAN-08 15-JAN-08          1          100        100
          1234       6750 16-JAN-08 16-JAN-08          1          100        100
          1234       6750 17-JAN-08 17-JAN-08          1          100        100
          1234       6750 18-JAN-08 18-JAN-08          1          100        100
          1234       6750 19-JAN-08 19-JAN-08          1          100        100
          1234       6750 20-JAN-08 20-JAN-08          1          100        100
    20 rows selected.Thanks,
    Karthick.

  • Make only the new row in a table editable and other rows display mode.

    Hiii all,
    I am working on the component GSWISET, there is a table view for substitutes, the requirement is to show all the rows in the table view in display mode. Whenever the user clicks the button (Add employee), a search popup triggers and the user selects an employee from that and it will come as a new row in the table view. Here I need to be able to make only the new row editable and all the other rows in display mode.
    Could you please suggest a way to achieve this. Thanks for your time..

    Hi,
    Try with  the code below in.htm page
    data: lv_displaymode  TYPE string.
      IF controller->view_group_context->is_view_in_display_mode( controller ) = abap_true.
        lv_displaymode = 'X'.
      ELSE.
        lv_displaymode = ' '.
      ENDIF.
    if lv_displaymode = 'X'.
    <chtmlb:tableExtension tableId = "Substitutes"
                           layout  = "FIXED" >
      <chtmlb:configTable actions               = "<%= controller->gt_button %>"
                          id                    = "Substitutes"
                          onRowSelection        = "select"
                          selectedRowIndex      = "<%= substitutes->SELECTED_INDEX %>"
                          selectedRowIndexTable = "<%= substitutes->SELECTION_TAB %>"
                          table                 = "//Substitutes/Table"
                          width                 = "100%"
                          selectionMode         = "<%= substitutes->selection_mode %>"                    
                          visibleFirstRow       = "<%= substitutes->VISIBLE_FIRST_ROW_INDEX %>"
                          usage                 = "ASSIGNMENTBLOCK"
                          headerText            = "<%= controller->gv_header_text %>" />
    </chtmlb:tableExtension>
    else.
    <chtmlb:tableExtension tableId = "Substitutes"
                           layout  = "FIXED" >
      <chtmlb:configTable actions               = "<%= controller->gt_button %>"
                          id                    = "Substitutes"
                          onRowSelection        = "select"
                          selectedRowIndex      = "<%= substitutes->SELECTED_INDEX %>"
                          selectedRowIndexTable = "<%= substitutes->SELECTION_TAB %>"
                          table                 = "//Substitutes/Table"
                          width                 = "100%"
                          selectionMode         = "<%= substitutes->selection_mode %>"
                          allRowsEditable       = "TRUE"
                          visibleFirstRow       = "<%= substitutes->VISIBLE_FIRST_ROW_INDEX %>"
                          usage                 = "EDITLIST"
                          headerText            = "<%= controller->gv_header_text %>" />
    </chtmlb:tableExtension>
    endif.
    Regards,
    Gangadhar.S
    Edited by: gangadhar rao on Dec 24, 2010 12:49 PM

  • Table Creation of new rows in editable mode

    Hello,
    I'm using Jdev11g.
    I create a JSF page with a table, I add a button connected to CreateInsert bindings.
    Everything works fine but I want that when a new row is created on the table, the new row must be in editable mode.
    Thank's

    Hi Max:
    According to what you described, it's really wierd. An ADF table is Surrounded by a panelCollection or not doesn't matter in terms of CreateInsert operations, I think. Also each step you said OK doesn't mean that step is 100% problem free towards your final goal. For example, when you drag and drop and ADF table onto a JSF page, you forget to turn on 'row selection', it will be OK, you won't get any error message, but later on when you find that you need to turn it back on, you have to go back to JSF page source, to manually added codes to do so.
    The simpliest solution and quickest one is to reinitiate a clean ADF project and do it all over again. It's simple straightforward in my view. Probably don't use PanelCollection first, just drop your ADF table on a form, or af:panelForm, but make sure your table and 'CreateInsert' button is surrounded by a form, otherwise, when you click on 'CreateInsert', nothing will happen. When everything works, then probably back it up and replace your form or af:panelForm with panelCollection. See how it goes.
    Thanks,
    Alex

  • How to highlight a row in tree table - jdev 11.1.2

    Hello:
    Given a key, I want to highlight (select/set currency) the corresponding row in a tree table. I thought the following code would highlight the row in the tree table that corresponds to the key, but nothing is highlighted in the tree table. ie---> treeTable.setSelectedRowKeys(selectedRowKeys); What am I doing wrong? Thanks much.
    public String cb1_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Next");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    DCBindingContainer bc = (DCBindingContainer) getBindings();
    DCIteratorBinding iter = (DCIteratorBinding) bc.findIteratorBinding("DDF1Iterator");
    RowKeySet selectedRowKeys = new RowKeySetImpl();
    ArrayList list = new ArrayList();
    Row r = iter.getCurrentRow();
    Key k = r.getKey();
    list.add(k);
    selectedRowKeys.add(list);
    treeTable.setSelectedRowKeys(selectedRowKeys);
    AdfFacesContext adfc = AdfFacesContext.getCurrentInstance();
    adfc.addPartialTarget(treeTable);
    }

    Hello:
    Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
    If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
    Thanks for the help.

Maybe you are looking for

  • I have to erase and sync my iphone to an other itunes account will i lose everything ?

    My old laptop has broken down and i am no longer able to use my itunes on there. I have another laptop with itunes installed on it but my iphone 4 is not synced to it. I need to erase and sync my data to be able to update my phone and i want to know

  • Create PDF's in an older Version

    Dear Sir or Madam, our company works with an interface for PDF forms. The fields of a form are automatically recognized. For option fields are the possible element values selectable. That works fine with forms made with the Distiller 7.0. Newly we bo

  • [SOLVED] OS X Internet Sharing to arch over ethernet

    I previously had this working with arch's gateway set to the mac's ip and both subnet mask the same, but now OS X just shows the cable as unplugged. Any recommendations on how to set my rc.conf? Last edited by shnooks (2011-08-01 20:06:38)

  • APERTURE: Small preview images do not show the changes.

    excuse my lousy english... Problem with Aperture: Small preview images do not show the changes. I use Aperture 3 since August 2010. By November and 10 projects later it ran normally. Since the project 11 are in the preview images shown (on the bottom

  • File vault problem

    I recently ran file vault for my computer. I didn't realize that I had interrupted the process and I am now completely locked out. I know that I need the software disc, but I am currently deployed and do not have the disc. Any other solutions?