Get ID from selected row in data table

Hi!
Does someone know how to get ID from row on which I click a button or link?
getRowData() doesnt work!
Or any other method in jsp or just something to get the ID from selected row?
Thanks!!!

Hi,
I have a table with 3 columns, where column 1 represents the key, column 2 represents the data and column 3 displays the "details"-button. If you use
String key =(String)outputText1.getValue();
the variable key contains the key value of the row of the column in which the "details"-button was clicked. (outputText1 is the Output Text field of the first column).
Problem with this is that the key Value must be displayed in the table but maybe it works if the OutputText Field is not rendered, too. If anyone has another (maybe nicer) solution for the problem i would be pleased to see it here.

Similar Messages

  • Get values from selected row in a Table?

    Hello.
    I'm on VC 7.1 (the trial version downloaded from SDN).
    I'm trying to figure out a way to retrieve some values from the currently selected row in a Table element through the output connector.
    I have a web-service which returns results to the Table, and I want the user to be able to select one of the rows and then trigger another web-service call with some of the values from that row -- is this possible?
    Also, I can't find any documentation that lists what can and can't be done with each UI element, is there something like this some where? (the Modeler's guide doesn't help, and the Reference guide seems to focus on menu items and what the VC screen looks like)
    Thanks,
    Alon

    Hi Alon
    This is a very simple task.
    You just need drag the service which you want to execute, after select row, in model.
    Drag output connector from table to input connector of service. Then map the parameter.
    Regards
    Marcos

  • How to data from selected row of a TABLE

    Hi ,
    I have a table displaying some PO order details. In the last column , I have a field with element Link to Action . My requirement is , that when I click on the link to action column of specific row , I want to get the data present( specifically the the data present on the first column which is PO number) i that specific row.
    How can i get this data?
    Regards
    PG

    Hi PG,
    If you want to get Selected row data,  you can use get_selected_elements
    Try this example code.. this gives you selected records into one table..
      DATA lo_nd_et_postab_1 TYPE REF TO if_wd_context_node.
      DATA lo_el_et_postab_1 TYPE REF TO if_wd_context_element.
      DATA ls_et_postab_1 TYPE wd_this->Element_et_postab_1.
      DATA lt_et_postab_1 TYPE wd_this->Elements_et_postab_1.
    DATA: wa_temp TYPE REF TO if_wd_context_element,
            lt_temp TYPE wdr_context_element_set.
    navigate from <CONTEXT> to <ET_POSTAB_1> via lead selection
      lo_nd_et_postab_1 = wd_context->path_get_node( path = `ZSHP_EXTENDED_DUE_LI.CHANGING_3.ET_POSTAB_1` ).
      CALL METHOD lo_nd_et_postab_1->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_et_postab_1.
        append ls_et_postab_1 to lt_et_postab_1.
        CLEAR ls_et_postab_1.
      ENDLOOP.
    lo_nd_et_postab_1->bind_table( new_items = lt_et_postab_1 ).
    NOW LT_ET_POSTAB_1 Contains selected records in table.
    Hope it helps...
    Cheers,
    Kris.

  • How to get the class from selected row in af:table

    I know that you can get individual selcted row values from an af:table using getRow().getAttribute("attName").
    But, can I obtain the class that the table iterator used to populate the table?
    For instance, a table lists the result of an employee search that was bound to a session bean method returning List<Employee>.
    After selecting the employee of interest and clicking a command button I want to access that instance of the Employee class to pass onto the session bean to do some stuff.
    I don't want to hit the database to do it either (via a query on a key value for example) - the search iterator has already retrieved it, I just want to access it and do something with it.
    Possible?
    Thanks.

    Hi,
    if you use ADF try iterator.getCurrentRow().getDataProvider() on the binding container. If you use ADF Faces without then the Row object is the instance of your class
    Frank

  • Getting list of selected Rows of a Table

    Hi Experts,
    Im having a table with 500 elements, among them i select few of them to process, for exmpl consider my table has 500 rows , where each row represents a Invoice Payment, among them only few i select and process those or reject those.
    Now my problem is here when i select 1 Inv payment  or 100 Inv Payments or 50 Inv Payments , i have to iterate throught the table node using for() loop to take the selected ones for processing, i.e i have to iterate 500 times, instead is there any single function that can give me only the list of selected elements, so iteration of 500 elements is avoided. So that performance is increased.
    Regards
    Govardan Raj S

    What you can do is use the onSelect event (fired when you click and select a row) to copy the row into another context node which is the same as your table context node. When you have selected all the records you want to process, then use the table which you copied the selected records to instead of the one which has 500 entries. Make sense?
    Kunal

  • Why do i get 2 curves and not just 1 when i create a diagram from a row of data in a table ?

    Why do I get 2 curves and not just i when I create a diagram from a row af data in a table ?

    Erik,
    Thank you for giving me the points.  Generally you wait to award points until your problem is solved.  It is totally your at your descretion.
    OK.
    This is still not clear.  To post a screenshot get the "stuff" you want to show in view on your screen, then type the key combination <Command>+<Shift>+3.  The cursor will change to a crosshair.  Click and hold on the top-left corner, then drag to enclose what you want to show (to the bottom-right corner), then release.  The screenshot will appear on your desktop and will be named something like "".
    Now click the camera icon in the tool bar for this forum:
    , click the text box to allow you to navigate to, and select your screenshot.
    Here is what you sent me:
    The graph does not seem to be associated with the table of data you are showing.  Generally when you highlight a graph the corresponding table will highlight and show the source of each of the series in the graph (dark and light blue).
    This is what I would expect to see when highlighting a graph:
    Right now I think there is ANOTHER table arround that is the source for the graph and the table you show is "just another table".  You can move your data into the table the graph refers to by copy and paste, or simply typing the values.  You can change how many series there are by grabbing the little circle at the bottom right of the highlighted cells (when you have the graph highlighted) and dragging as shown:
    The Numbers Users' Guide is a great resource you should utilize and can be found here:
    http://support.apple.com/manuals#macosandsoftware
    The chapter on graphing (or charting) is 7 and starts on page 134.

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • Display and edit currently selected row of ADF Table in ADF Form

    I have an ADF Read-only Table and ADF Form, which were created from the same Data Control.
    I need to be able to edit the selected row of the table in the form (just like in "Binding Data Controls to your JSF page" part of "Developing RIA Web Applications with Oracle ADF" Tutorial). However, I can't figure out how to do this :(
    I found the following solution on the Web: #{bindings.DeptView1.currentRow.dataProvider.dname} - but it doesn't work, since "the class oracle.jbo.server.ViewRowImpl does not have the property dataProvider".
    Sorry for the newbie question.
    Thanks in advance for any help!

    Hi,
    AFAIK, dataProvider is not supported on ADF BC, hence the error.
    If you have created ADF Read only table and form from the same data control you just need to refresh the form based on table selection to show up the selected record, to do which you just need to add partialTriggers property to the panelFormLayout and set its value to the id of table
    Sireesha

  • Passing selected rows in a table to Popup Iview

    Hi all,
    I have a main iview in which i search and display some data in a table. Users can select multiple rows from the table and upon clicking on a button in the table toolbar, all the selected rows should be passed to a popup iview.
    But, when i tried, only one value is passed to the popup.
    I need to update a set of rows together from the popup iview.
    Is it a limitation of pop iviews in VC, or did i miss out anything?
    I have selected "multiple select" option for the source table.
    Can anyone advice us on this???
    Thanks alot in advance
    Shobin

    Hi Sreeni,
    Thanks alot for your reply.
    As I saw in some forum posts in SDN, multiple data rows can not be passed to a pop up.
    My application has a list of submitted appointment orders which the authorized person can  approve. I wanted a popup in order to provide a confirmation message when the user multi select and approve many AOs together.
    I found a work around without using pop ups. Instead, I used layers to show the confirmation message. I passed the selected rows to another table using signal in and out.
    It works now.
    Thanks alot
    Shobin

  • How to set focus on a input field in a selected row of a table?

    In a previous discussion (http://scn.sap.com/thread/3564789) I asked how to access an input (sap.m.Input) field of a selected row in a table. In the answer that was supplied I was shown how to get the items of the table. Then using the selected index to get the selected item get the cells. Then I could set editable on the proper cell(s). This worked fine.
    Now I need to set the focus on one of the fields. I tried something like this:
                var oNewLink = table.getSelectedItem();
                var oNewLinkName = oNewLink.getCells()[1];
                oNewLinkName.focus();
    But this doesn't seem to work.
    I have searched through other discussions and have seen this technique for putting focus on a field if you have its ID:
    sap.ui.getCore().byId(id_of_the_input_field).$().focus();
    In my case though I do not have an ID since the row and its cells are generated. How can I set focus on the cell of a certain row in a table?

    Hello Venkatesh. Yes that code does work. First I tried it on a table cell that was already rendered and it did work. The next time I tried it on a table row that was being added and it did not work there. So I added an on after rendering function for the table and added that code there. That did not work until I added a delay (timeout) to do a context switch before calling the focus and that worked.
    Once last thing though sometimes when I call focus on an input field (actually in a table row cell) if the field has text in it already the flashing cursor is at the beginning of the text and other times it is at the end of the text (which is the desired way). It depends on where I click in the row. Is there anyway to make sure the flashing cursor is at the end of the text when the focus is applied to a field that contains text?

  • When iam selecting row of the table i got the exception

    Hi ,
    When iam selecting row in the table at that time iam getting below exceptions
    <21/02/2013 1:31:35 PM EST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /InventoryPropertiesViewTF/InventoryPropertiesView URI: /com/avocent/trellis/apps/mainUi/inventory/pages/fragments/InventoryPropertiesView.jsff actual-URI: /com/avocent/trellis/apps/mainUi/inventory/pages/fragments/InventoryPropertiesView.jsff.
    javax.el.PropertyNotFoundException: Target Unreachable, 'BracketSuffix' returned null
    <21/02/2013 1:31:35 PM EST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /PropertyDisplayTF/PropertyDisplay URI: /com/avocent/trellis/apps/coreapps/ui/fragments/PropertyDisplay.jsff actual-URI: /com/avocent/trellis/apps/coreapps/ui/fragments/PropertyDisplay.jsff.
    javax.el.PropertyNotFoundException: Target Unreachable, 'BracketSuffix' returned null
         at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    Please Let me know why its getting this type exception only some time interemitten issue,
    Please provide me any solution for these,
    jdeveloper 1.1.1.4

    Check your page code for an EL that uses 'BracketSuffix'. This is the point of error as the 'BracketSuffix' can't be evaluated at the given point.
    Timo

  • A selected row in af:table does not get sorted.

    Hi,
    When a table supports single selection and the table contains quantity of rows gt it can fit into its viewport, then, on sorting, selected row gets out of the sorting process. But when you move to the end of the table, select a row there and then sort the table, then all rows sorted correctly. The selected row, after sorting, always set as a first row in the current viewport, doesn't matter whether it is in the order or out of it.
    Noteworthy, when number of rows is lt the viewport allows:
    1. sorting works as it should to;
    2. on sorting/PPR'ing, as it gets some time, one can see how the viewport updates in two steps and in the first step the first row is the selected one.
    JDev's version is 11.1.1.3.0.
    VO, iterator and tree bindings, af:table all the props related to data retrieving, fetching and row displaying have default values.
    What can cause that?
    Thx,
    Y.

    Hi,
    so what you are saying is that the selected table row is not sorted but added on top. I tried to reproduce this with 11.1.1.3 but can't see the issue. I tried with editable and read-only tables
    Frank

  • How to get the selected rows in a table

    Hi,
    How to get the ids of all the selected rows. On Page load a query is executed that shows the data in a table with a checkbox in the first column to select the rows and delete. Now if a user select multiple rows how do I get the ids of selected rows in the backend code.
    Thanks

    Please search the forum before posting questions.
    refer following thread for table selection.
    Re: Record selection with MessageCheckBox and print the selected record.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • How to get event from selected JTable row

    Whenever a JTable row is selected, i want to get an event to get the row index of the selected row and read the row data. Which listenere do i have to implement and where is the correspoinding addXXXListener() method in JTable?

    here ya go...
    <table>.getSelectionModel().addListSelectionListener(...);Josh Castagno
    http://www.jdc-software.com

  • Get selected row in a table control

    What is the best approach to get a selected row, all fields, in a table control?  I see this done in various transactions in MM but do not see how to do this in documentation.
    Thanks

    in the screen flow logic you need something like this:
      LOOP AT t_partner.
           MODULE get_selected_line.
          MODULE process_partner.
      ENDLOOP.
    PAI module get_selected_line :
    MODULE get_selected_line INPUT.
    only get cursor position once....as it's constant within each loop
      IF sy-stepl EQ 1.
        CLEAR wv_cursor_0120.
        GET CURSOR LINE wv_cursor_0120.
        IF wv_cursor_0120 = 0.
          wv_cursor_0120 = 1.
        ENDIF.
    convert the relative line of the screen to the actual line number in the table
        wv_absolute_line = wv_cursor_0120 + tc_partner-top_line - 1.
      ENDIF.
    ENDMODULE.                 " GET_SELECTED_LINE  INPUT
    module process_partner needs to be something like this:
    MODULE process_partner INPUT.
    only process the selected line
    CHECK sy-stepl = wv_cursor_0120.
    CASE ok_code.
    endcase.
    endmodule.

Maybe you are looking for