First row selected automatically in table

Hi Experts,
I have a table displayed in my view, but I found the first line of the table is always selected automatically, how can I change this?
I don't want any line of the table be selected automatically....
Please help me on this.
Thanks for your time!
Anna

Hi,
Check this.
The node to which u have bind ur table, click on th node.
go to property part(Bottom of screen)
Initialization Lead Selection : Uncheck this check box.
Regards,
Arvind

Similar Messages

  • How to disable first row selection in a table

    Hi,
    I have three tables which have master child relationship. I need to enable a button for each table based on row selection of corresponding table.But first row is being selected automatically and the buttons are enabled.
    what should i do in order to avoid first row selection in a table.I tried by removing selected Row Keys.But still i am getting the same problem.can anyone suggest on this.
    Thank You,
    Sukumar

    I know a hack but I don't recommend it, anyway here it goes:
    Remove selected Row Keys
    Change selectionListener from the default and create a custom action listener (You can call the default one inside of it) (Tip: use makeCurrent function in this PDF
    This will make sure that there is no selected row highlighted for the first time, but it actually means that the first row is selected, it's just not shown.
    This method is tested with 11.1.1.7

  • Table- Why first row Selected from itself

    Hi,
    i have a jspx that have some fields and a button ,
    the user should fill this fields with data then click the button
    the button pass those values to a function that call a Stored Proceudre in the DB
    then the last code in that button is to refresh a table (by execute param) that read the inserted data
    why everytime the table refreshed give me the data with the first row SELECTED!!!!!!!!
    i am using ADFBC + JSF
    thanks in advance

    Hi,
    hope you handled the case where a user hits submit - or performs some other action that is performed on the current row - because you are now in an unpredictable state. Ideally you disable all related command buttons until a user selects a row
    Frank

  • Reg Row Selection in a Table

    Hi All,
    I am facing a problem with row selection in a table. When I navigate from one screen to another in my application, the selected rows in the previous screen should be populated in the table in the next screen.
    If I have to use checkboxes inside the table for multiple row selection, how could I populate the table in the next screen with all the selected rows of the table from the previous screen.
    Also, is it possible to select multiple rows in a table without using checkboxes, and by selecting the "selection mode" of table as "multi", so that initially when the page is loaded no record (row) should be selected automatically.
    Please help me regarding this.
    Regards,
    Murthy.

    Hi,
    As Armin suggested you can use the inbuilt multiselection property of the table.
    For populating the selected values in a table in second view
    First view Context structure
    -EmpDetails (Table node) (cardinality 0..n,selection 0..n,intializeleadSelection - false)
    ---EmpID (table column)
    ---Name  (table column)
    Second View Context structure
    -DispalySelected (Table node)-EmpDetails (Table node) (cardinality 0..n,intializeleadSelection - false)
    --- ID(table column)
    --- Name(table column)
    create a navigation link form first view to second view
    In the InBoundPlug of second view
        wdContext.nodeDisplaySelected().invalidate();
        for(int i=0;i<wdContext.nodeEmpDetails().size();i++)
             if(wdContext.nodeEmpDetails().isMultiSelected(i))
                   IPrivateDisplayView.IDisplaySelectedElement ele = wdContext.nodeDisplaySelected().createDisplaySelectedElement();
                   wdContext.nodeDisplaySelected().addElement(ele);
                   ele.setID(wdContext.nodeEmpDetails().getEmpDetailsElementAt(i).getEmpID());
                   ele.setName(wdContext.nodeEmpDetails().getEmpDetailsElementAt(i).getName());
    <b>For multiselecting you have to use Ctrl tab</b>

  • How to dynamically display the data from a table base on row selection of another table in ADF

    Hi ,
    I have a requirement in ADF. I need to change the data of a table  based on row selection of another Table . Both the table have a Parent Child relationship between them. They have a common attribute say department_id.
                                                                                         For this I created bind variable in view object of employees table and wrote a where clause in the sql query using that bind variable. Then I created method for selection listener of department Table in java bean.
    My method is following
        public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    It is printing the selected value of department id from department table in the log. But it is not able to pass the value to employees view. It is showing the following error in the log
    "Definition DepartmentId of type Variable is not found in EmployeesView1."
    I will be very thankful if someone helps me to solve this errror or is there any other way to achieve the same requirement.
    Thanks
    Nilesh

    Note quite sure why you simply wont create a viewlink for the viewobject the tables are based on..
    The viewlink attribute will be based on the departmentId and it's a simple master detail relationship which automatically uses ppr.
    However, if both tables are on the same page; using your hack about;
    On the underlying viewobject, define a viewcriteria e.g. "listById" and set your bind variable here.
    I would bind table two to a RichTable component:
    RichTable t2;
    public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
                   refreshTable2(pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    private void refreshTable2(Number pallet){
    RichTable x=getT2();
    CollectionModel cm=(CollectionModel)x.getValue();
    JUCtrlHierBinding jcb=(JUCtrlHierBinding)cm.getWrappedData();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(jcb.getName()+"Iterator");
    ViewObject vo =dciter.getViewObject();
    ViewCriteriaManager vcm=vo.getViewCriteriaManager();
    ViewCriteria vc=vcm.getViewCriteria("listById");
    vo.applyViewCriteria(vc);
    vo.setNamedWhereClauseParam("DepartmentId",pallet);
    vo.executeQuery();
    AdfFacesContext.getCurrentInstance().addPartialTarget(getT2());

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Read first row of the internal table

    Dear All,
    Please let me know how to read the first row of the internal table?
    I used following read statement but it is not working
    READ TABLE t_cdhdr INDEX 1.

    Hi,
    i think you are not reading an internal table
    according to your code i think you are reading a type
    which may be declared as types...
    types are declared just for reference
    eg
    types: begin of t_cdhdr .
    include strucuture  cdhdr .
    types: end of t_cdhdr .
    types: t_it_cdhdr type standard table of t_cdhdr.
    data: git_t_cdhdr  type t_it_cdhdr.
    data: gwa_t_cdhdr type t_cdhdr.
    now have to fill the iternal table
    and
    read table git_t_cdhdr into gwa_t_cdhdr index 1.
    reward points if helpful
    thanks & regards,
    venkatesh

  • Reg Row Selection in a Table UI Element

    Hi All,
    Can anyone help me in writing code to select a row from a table.
    I need to read the data from a row selected in a table and print it in the next page of my application.
    I request anyone to send me some coding line on how to select a row from a table and read data from it.
    Regards,
    Murthy.

    Hi Narayana,
    Follow the steps.
    Step1: Create a WD Component.
    Step2:  Under Component Controller create a
    i)  2  Node “EmployeeInfo” and “EmployeeRecord”  with attribute “EmployeeName” and “Position”  of cardinality 0..n for both the node and a context attribute “WindowInstance” of type “com.sap.tc.webdynpro.services.session.api.IWDWindow”
    Step3: Go to the Diagram View. Do the mapping between “EmployeeView” and “Component Controller” and between “DisplayView” and “Component Controller”
    Step4: Design 2 Views layout
    i>EmployeeView
    Layout like
    Employee Name |                                  Employee Position
    EmployeeInfo.EmployeeName| EmployeeInfo.Position
    EmployeeInfo.EmployeeName| EmployeeInfo.Position
    DisplayResultButton
    ii>DisplayView
    Layout like
    Employee Name   |                      Employee Position
    EmployeeRecord.EmployeeName |    EmployeeRecord.Position
    EmployeeRecord.EmployeeName |    EmployeeRecord.Position
    CloseWindowButton
    Step5: Create 2 Windows
    1>EmployeeWindow
    2>DisplayWindow.
    Under “EmployeeWindow” add the “EmployeeView”
    and “DisplayWindow” add the “DisplayView”
    Step5: Associate action “DisplayResult” with the “DisplayResultButton” and use this code inside the Implementation of “EmployeeView”
    public void wdDoInit()
        //@@begin wdDoInit()
    //initialize nodes
    wdContext.nodeEmployeeInfo().addElement(wdContext.createEmployeeInfoElement());
    wdContext.nodeEmployeeRecord ().addElement(wdContext.createEmployeeRecordElement());
        //@@end
    public void onActionDisplayResult(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionDisplayResult(ServerEvent)
    try
    IPrivateDisplayView.IEmployeeRecordElement empRec =
    wdContext.createEmployeeRecordElement();
    int n = wdContext.nodeEmployeeInfo().size();
    int leadSelected = wdContext.nodeEmployeeInfo().getLeadSelection();
    // loop backwards to avoid index troubles     
    for (int i = 0; i < n ; i++) {
    if (wdContext.nodeEmployeeInfo().isMultiSelected(i) || leadSelected == i) {
    empRec.setEmployeeName(wdContext.nodeEmployeeInfo().getElementAt(i).getAttributeValue("EmployeeName"));
    empRec.setPosition(wdContext.nodeEmployeeInfo().getElementAt(i).getAttributeValue("Position"));
    wdContext.nodeEmployeeRecord().addElement(empRec);
    catch(Exception e)
    e.printStackTrace();
    IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
         "DisplayWindow");
    //        create the Window
         IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
         window.setWindowPosition(WDWindowPos.CENTER);
         window.setTitle("WindowTitle");
         window.setWindowSize(200,200);
    //        Save WindowInstance in Context
         wdContext.currentContextElement().setWindowInstance(window);
    //        and show the window
         window.show();
         //wdThis.wdFirePlugInDisplay();
        //@@end
    Step6: Associate action “CloseWindow” with the “CloseWindowButton
    ” and use this code inside implementation of  “DisplayView”
      public void onActionCloseWindow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCloseWindow(ServerEvent)
       IWDWindow window = wdContext.currentContextElement().getWindowInstance();
       window.destroyInstance();
        //@@end
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f699f90-0201-0010-14a4-8950177281ed">Developing with Tables in WebDynpro</a>
    Regards,
    Mithu

  • Keep view in row selected in the table

    Hello,
    i have a webdynpro view with a table. This table has 256 records, and visibleRowCount property is set to 10 records.
    My problem is when i selected the record number 174 for example, the scroll table returns to position 1 and i can not see the record selected.
    How can i do for the scroll table keep the row selected in the table?
    Thank you

    Hi,
    Try this.
    1. create one context ctx_va_firstvisblerow.
    2.get the leadselection record and set ctx_va_firstvisblerow context.write this code in wdDoModifyView.and also following code in wdDoModifyView.
    IWDTable table = (IWDTable) view.getElement("Ur table id");
        table.setFirstVisibleRow(wdContext.currentContextElement().getCtx_va_visiblerow());
    3.Bind the ctx_va_firstvisblerow context to the table FirstVisibleRow.
    Thanks
    Abhilasha
    Edited by: Abhilasha Dahare on Sep 14, 2010 3:35 PM

  • Read only af:table first row select and focus on form load

    I use a read only af:table in my page. When my page loads and I click on my table, then I can use up / down arrow keys to navigate in my table's rows. But if I don't click on the table, I can't navigate in my table's rpws.
    What can do in my page to give the first focus to my table's first row and navigate in my rows without using mouse clicks....
    findElementById function in javascript does not work in jdeveloper 11...
    Do you help me for this?
    Thanks..

    Hi,
    actually findElementById does work, but you should use the ADF client side framework for this. Add a clientListener to the component that intercepts the keyboard usage and make it callin the next record on the table.
    I'll take a note for a how-to to put on my blog as I don't have the code ready. However, its possible this way
    Frank

  • How to make the first row  selected before the display of ALV grid

    Hello Experts,
    I created a ALV grid using custom container in a screen . Now i want do the follwing:
    1. i want that, the  <b>first line must be selected before the display of ALV.</b>
    2. I have selection buttons . But i dont want the multiselect button and the  
        standard  toolbar in the ALV grid.
    Could any one please help me regarding the above?
    Thanks & Regards
    Sudhansu

    can u pls explain in more details with an example?
    I am telling u the scenario.
    1. i have a screen(Modal dialog Box)  containing ALV grid with selection buttons for each row  (top part) and a subscreen(second part).
          Now when i click on a selection button, it will display the corresponding values in the subscreen.
        When this screen will display for the first time , then first row of the ALV grid should be selected and the corresponding values should be displayed in  the subscreen.
    i   wrote the following code in the PAI. But when i select a record its not triggering the PAI.
    DATA:
         gi_index_rows TYPE lvc_t_row, " Internal table for indexes of selected rows
         g_selected_row LIKE lvc_s_row, " Information about 1 row
         l_lines TYPE i.
      CLEAR g_wa_vdmeko.
    *get selected row
      CALL METHOD g_alv_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      LOOP AT gi_index_rows INTO g_selected_row.
        READ TABLE g_int_vdmeko INDEX g_selected_row-index INTO g_wa_vdmeko.
        SELECT SINGLE  *
               FROM vdmepov
               WHERE bukrs = g_wa_vdmeko-bukrs AND
                     styp  = g_wa_vdmeko-styp  AND
                     sbez  = g_wa_vdmeko-sbez  AND
                     svym  = g_wa_vdmeko-svym  AND
                     svnr  = g_wa_vdmeko-svnr.
      ENDLOOP.
    I am displayinng the ALV using method "set_alv_for_first_display".
    Please help if u have any idea..................
    Thanks
    Sudhansu

  • Only first row of a mysql table is updated

    Hi,
    I'm using Netbeans 5.5 with Visual Web Pack and trying to update data, stored in a mysql table.
    I use a dropdown list to select a row and show the data in various textfields. This works fine. The problem, that it's not possible to save changes, I enter in the textfields. Everytime only the first row of the table will be (over)written. This happens also with the derby database. I checked the tutorial about inserting, updatting and deleting, it works fine. But they use a table to make changes to the data, so the case is different from mine.
    Can anybody give me a hint? I'm going crazy ...
    Thanx in advance
    Markus

    yes this sounds crazy. i encountered similar problem with textfields. if they are numerous type, don't forget to add integerConverter to the textfield. it helped me out in my case. hope this helps
    dElay

  • How to render a Custom LOV Pop Up  with its first Row selected

    Hi All,
    I have a requirement in my Custom LOV ,
    I want to render my custom LOV with Query panel and resulset table in such way, where the first row is selected and the users are able to use the KEY Up and Down Arrows and Enter key to select it.
    Currently, the user as to do a single Click atleast one time on a row , so that they can use their KEYs to do the selection.
    How can I achieve the above requirement ? Any thoughts ?
    Thanks
    TK

    Hi,
    The answer to your query is 'Yes'. You need to design a 'UPDATE' metadata type custom integrator. The custom integrator shall use a parameter based view to first download data and then use a PL/SQL wrapper/API to re-upload it back. The brief steps are listed below:
    1. Create a 'UPDATE' metadata type custom integrator. Give a parameter list name, std/custom view for data download and a PL/SQL wrapper.
    2. Create a form function and associate the form function with the custom integrator created.
    3. Add the form function to the std WebADI menu for access.
    4. Define a layout for the custom integrator defined.
    4. To create a parameter use the standard integrator 'HR Standalone Query'. As a part of this integrator you can define the SQL WHERE clause (parameter based) that you will like to use with the custom/std view defined in the custom integrator definition.
    Note: You can use a max of 5 parameters only. For each parameter, one needs to define the datatype and also the HR standalone query has a size limitation of 2000 chars in 11i10. You increase this length you may apply patch - 3494588 to get 4000 chars.
    Hope this information helps.
    Thanks,
    Nitin jain

  • Row selection across multiple tables

    Hi
    I currently have multiple tables where, if the user selects a particular row or group of rows in one table the correspondign row or group of rows is selected in the other table.
    At the moment I've acheived this by placing listSelection listeners on all the tables so that when the selection on one table changes it fires an event and updates the slection on the other tables using:
    secondTable.setRowSelectionInterval(
    firstTable.getSelectedRows()[0],
    firstTable.getSelectedRows()[firstTable.getSelectedRowCount() - 1]
    );This works fine if the user selects a single row or a continuous group of rows. THe problem is if the user selected a non-continuous group, or selects a continuous group and then deselects some of these rows.
    Because the method I've got selects all rows between the start and finish of the selection it means rows are highlighted on the other tables that are not highlighted on the first table.
    My thoughts on how to approach this would be to cycle through the array of selected rows and select the corresponding rows in the other tables individually rather than selecting a range, but I can't see how to accomplish this. Could anyone give me some pointers or suggestions.
    Thanks

    What you are doing is correct in principle (use a
    listener to propagate the selection)
    Always a good start :-)
    but you need to
    understand the subtleties of the ListSelectionEvent -
    read the API carefully - it gives you a range of
    indices which may have changed but does not tell you
    whether any specific indices in that range are
    selected or unselected.
    That makes sense, the event just indicates that the selection has changed yes?
    For that you will need to get
    the source ListModel from the event and query each
    row in the event range to determine its selection
    state.
    This is where I run into difficulty. I think I can go through the each row and find out if its selected or not (using isSelectedIndex(i))
    What I'm unsure what to do is how to set that for the rows in the other ListModels. What I would have normally done would be something like
    otherListModel.getIndex(i).setSelected(firstListModel.isSelectedIndex(i));But as the api doesnt list the methods to do that I think I might not have got this concept sorted in my head. Could someone provide me with some pointers?
    Thanks

  • Row Selected in a table

    Hi,
    I have a table on a view of my dynpro and by default the first row is selected.
    How I can show my table without any row selected?
    Tks a lot.

    Hi,
    In your view go to the method WDDOMODIFYVIEW and use the following code to deselect the row.
    DATA: o_node_output_data     TYPE REF TO if_wd_context_node.
      o_node_output_data = wd_context->get_child_node( name = '<context table name>' ).
      o_node_output_data->set_lead_selection_index( o_node_output_data->no_selection ).
    Let me know if that works.
    Regards
    Prasenjit

Maybe you are looking for

  • When Creating Credit memo pricing formula gets triggered even if pri typ D

    Hi gurus, We have a copy control set up from billing doc to credit memo doc with all the item catergories pricing type as D (Copy pricing elements unchanged ). We have a discount condition in pricing procedure which is set to statistical based on a c

  • I was gifted an album for my birthday. It wont sync with my iPhone

    I was gifted an album for my birthday by my husband, but it wont sync with my iPhone. Is there something I'm missing??

  • Purging Central Cache

    While I am in Ater Effects CC and want to apply some animation presets I get the following message....Bridge is encountering a problem and wants me to purge my central cache.....I've never done that before....how do I do that and what will it impact

  • Adobe Update CS3

    Hi We're still running Adobe CS3 and whenever we reinstall it for whatever reason we usually download and install the updates again as a single process, via Adobe updater. However right now I've just re-installed CS3 and run Adobe Updater on a laptop

  • Begging for help. SSLSocket client/server

    Hello Everyone, At my wits end and behind my project plan. I need to secure my server. I have generated a keystore Exported certificate into CER file Imported this certicate into the JAVA_HOME/lib/security/cacerts file. I have my JBoss secured on por