How the get the current dataTable row

I have a dataTable with the value from List in the BackingBean.
The script is printing the list elements, and I want to get the number of each row. I don't have any enumaration in for the records. Can it be done simply?
Thanks for answer.

You can use HtmlDataTable#getRowData() to retrieve the current row object in the iteration.
But you just want to retrieve row numbers? Then rather use HtmlDataTable#getRowIndex().
Also see http://balusc.xs4all.nl/srv/dev-jep-dat.html for several datatable use examples.

Similar Messages

  • Need help on how to specify the current select row in a View Object

    Hi,
    I have a ADF table on my page, when I was selecting the rows in this table, I want the set and get methods in the ViewRowImpl class to do some customized actions. I found out that each time regardless the row I select in the table, the viewrowimpl class will always return the data in the first row, I tried to use getCurrentRow in VO row impl. but still, gets the first row.
    Does anyone know how to get the selected row value in the View Object, or View Row Impl rather???
    Thanks!

    Hi,
    you can call a method exposed by the AM and pass teh rowKey of the selected row as an argument. When you configure the exposed AM method in the pageDef (creating a method binding) the argument is shown in a dialog from where you can use EL like #{bindings.iteratorName.currentRow.rowKey} to access the current selected row.
    Frank

  • In Table Control How to get only a single row .

    Hi
    In Table Control How to get only a single row .I am able to decrease it its height to 4 but then 2 rows is getting dsplayed .I want only one row to be display and 2nd row should be deactivated or not visible.
    regards
    Avik
    Edited by: Julius Bussche on Jan 30, 2009 1:10 PM
    Removed friendly greeting from the subject title

    Hi Avik
    use this code it will help you.
    MODULE passdata OUTPUT.
      READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
      IF sy-subrc = 0.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.      " 111 IS THE GROUP NAME
            screen-input = 1.          " input mode
            screen-active = 1.         " input mode.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.       "GROUP NAME
            screen-input = 0.           " display mode
            screen-active = 1.          " DISPLAY MODE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " PASSDATA  OUTPUT
    Make sure in group tou are passing the field name that you want in input mode on the base of other field
    Hope it will help you.
    Thanks
    Arun Kayal.

  • How to get only current exception message from tables

    Hi
    In my sceanario , I want to have the list of Current MRP exception messages list from table
    I understand that MRP detailed lists, including all exception messages, are stored in transparent table MDKP and cluster table MDTC.
    I can tell ABAPer to write a report for me , to read the data from these tables , but I guess these tables contain old exception message also , which are not currently appearing in MRP list
    How to get only current exception message
    Rgds,
    sandeep

    Sandeep,
    MDTC contains only data from the most recent MRP run.  So, all messages you see are those which are currently valid.
    The messages might have first appeared during a previous run, but they still need to be addressed.
    Before you invest a lot of time and effort into writing and debugging a custom report, you should probably try to use the standard SAP functionality found in MD06.  On the Processing indicator tab, you can select "Only with new exceptions".  Here you can tag a material/plant as 'processed', and thereafter, the exceptions that existed there before you tagged the part will not be re-displayed.
    Best Regards,
    DB49

  • How to get control on each row in advance table

    hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
    for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
    if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
    onetime.setSelected(true);
    recurring.setSelected(false);
    else
    onetime.setSelected(false);
    recurring.setSelected(true);
    but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....

    Babu,
    Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Re: Getting the current selected Row & column in adf table

    Hi,
    Our requirement is we have to retrieve both the current row and column in adf table.
    We can retrieve the current row in the backing bean like
    ViewObject view = getViewObject();
    view.getCurrentRow();
    Is it possible to retrieve selected column id or column header text as we are getting for row?
    please give some sample.
    Thanks,
    Vijay.
    Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

    Hi John
    My exact requirement,
    1.     We have collection of records in adf table
    2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
    Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
    while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
    If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
    we are using Jdeveloper11.1.1.4.0
    Please suggest.
    Thanks,
    Vijay

  • How to get a Sum of rows, when i use the property max. rows p. page ?

    Hi all.
    I've got a query and get a lot of rows (amounts) back.
    Now i want to have max. 21 rows per page.
    So, first i used the property "max. rows p. page"=21.
    But i want a have Sum-Field p.page too, which shows the sum of the amount p. page at a >fixed place (bottom, left) at the page.
    this didnt work well....
    Because when i have 30 rows, then the sum will shown at the second page (because the sum-field its after the repeating frame).
    ...Now i forgot the property and placed a function and two placeholder in the query like this:
    Function:
    :cp_row:=:cp_row +1;
    if (mod (:cp_row,21)=0)) then :CP_pagenr:=:CP_pagenr+1;
    Placeholders: cp_row, cp_pagenr
    Now i want to use :CP_pagenr to change the group - but Report Builder says: I cant... because placeholder are not allowed to change a group.
    So.. perhaps anyone can give me a hint how i can do this ?
    Thanks a lot...

    hello.
    that sound to me as you wanted a running total. check out the metalink knwoledge base and search for running total and you will find a note on how to do that.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I want to get the current Cursor row number

    Hello!
    Is it possible to get the current row number of a cursor in a cursor loop?
    for c_1 in cursor_1
    loop
    dbms_output.put_line(c_1. ???) --> this should show: 1 in the first loop ,2,3,...
    endloop
    best regards,
    wolf

    SQL> declare
      2  cursor c is
      3  select * from emp;
      4  begin
      5  for r in c loop
      6    dbms_output.put_line(c%rowcount);
      7  end loop;
      8  end;
      9  /
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    PL/SQL procedure successfully completed.Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • Im really frustrated with how the current ETF situation.

    I am honestly sick of how constantly i called customer service. Requested to cancel my contract. AND ITS STILL ON.
    i do not understand how the customer service is working. heres the whole story
    I'm outside of states right now. and its been a while. I suspended my account for a while and noticed i could not suspend it anymore.
    I called the customer service, asking for a deactivation on my account and paying the ETF fee.
    the lady quoting her, said " I can make an additional non payed 1 year suspension on your account" i was suprised to hear this, since i did read all the terms of service and did not know if that was possible. i went through everything. she acknowledged i suspended my account for 6 months. and she will do an additional 1 year on top of that non payed.
    after few days of this relaxing talk, i got a email , that my bill cycle, and the monthly charge was up. my account , surprisingly was back on without even
    notifying me in anyway.
    I called customer service in confusion.  the dude who replied constantly repeated that 'they do not have authority to suspend the account for a year'. I talked with him for an hour. Even if i constantly said, on record i asked for end of service, was offered a year of suspension, they cannot allow or review that part of the service. I asked 'dont you have recordings of every service? I said everything on record' he said that its only for quality assurance and cannot review or use that to justify what im saying.  And then, i was astonished when he transferred me  'a level up' to talk to the manager or something, he told me that 'it was a misinformation on our side and cannot justify anything.' now at this point i was infuriated that even on record, i was misinformed of the service, and then i had to charge a one month cycle additionally.
    i tried to ease myself. I wasn't considering what was right or wrong, but was just sick of the service. I said Im just canceling my account as of now, ending the contract. he warned me that ill be charged both the etf and a month cycle. I said okay. and he told me the bill will show up and emails will be sent and everything. it was okay. on myside.
    he told me that he will send everything to end my contract and it will be final.
    after a week, my account is not canceled, my bill warns me that i have a overdue charge, and nothing is happening. now i am actually caring what is right and wrong. this is. so wrong.
    YOU CANT MISINFORM A CUSTOMER, MAKE THEM CHARGED FOR YOUR MISTAKES. AND STALL.
    I am outraged of what you guys are doing to me. this is not fair.I am seriously considering a lawsuit because first of all.
    you guys lied to me. just simply put. not 'misinformed' lied.
    next you promised me that everything is over. I'll just get a online bill to sort out everything.
    nothing happend. i wonder, how you guys keep up with your customers. Is this how you treat people? I'm coming back to america in 6 months. but when i do. I'm never coming back for verizon. its ridiculous how you treat a 3 year long customer.
    Is there a solution to this? do u think that verizon can come to its sense and please leave me alone? i really was willing to pay everything. on time. You guys treat me like ****. not even letting me pay for it. so what is your answer to this ?

        You always deserve the best service and support, kyong93! I would love the opportunity to restore your confidence in us. I have sent a Direct Message so we can offer you personalized support to get this resolved.
    Thank you,
    YaleK_VZW
    Follow us on Twitter @VZWsupport

  • How to get URL currently shown in Webbrowser

    Hello,
    does anyone know how to get the URL, which is currently show in Webbrowser, in my WebDynpro Application.
    For Example the following URL
    http://www.test.com/xy/webdynpro/test?sap-client=100&sap-language=DE
    points at
    http://10.170.1.99/xy/webdynpro/test?sap-client=100&sap-language=DE
    I want to get following URL in my WebDynpro Apllication (and not the internal URL):
    http://www.test.com/xy/webdynpro/test?sap-client=100&sap-language=DE
    Thanks in advance.

    Hi Thomas!
    I can't believe it! We already started to build customizing like you suggested and even have evaluated most of the respective IP-ranges for all our domains and subdomains.
    Yesterday I started the development of a prototype application. I don't know why but somehow (I'm so sure that was a divine intervention!) there appeared a break-point IN method if_wd_application~get_remote_address you mentioned above and I got a look on the following coding:
      method if_wd_application~get_remote_address.
        data: wa type wdr_name_value.
        read table me->application->client_window->client_info_object->header_fields into wa
                   with key name = '~remote_addr'.
        if sy-subrc = 0.
          result = wa-value.
        endif.
      endmethod.                    "if_wd_application~get_remote_address
    From here on I got a little curious that the http header is available from within the webdynpro. Soon afterwards I found out that the header fields are generally available in the via static attributes of CL_WDR_TASK and can be accessed fairly easy from cl_wdr_task=>client_window->if_wdr_client_info_object~header_fields.
    To conclude my journey I am proud to announce that the real domain that called the webdynpro application can be accessed by reading the record of name HOST from the header_fields. This is enough for feeding e.g. a google maps call.
    Up to now this worked out for all of our test cases. Would be great if you could check this out from your side and give a little response if you think that's a practical solution or it's just a coincidence how great this is working for us.
    Thanks in advance and best regards,
    Alej

  • Interactive Report: how to get value of given row/col cell in selected row

    Hi -- I have an interactive report. Instead of the default behavior of the link going to a single row view, I want it to
    go to a form for editing the row. This means I have to be able to populate the form w/ the correct row's information...
    so need to get the value(s) for the PK column(s) in the selected row of the interactive report, so I can select the row
    from the database.
    How can I do this? I see in the report attributes, Link Column section, I can set Rows Uniquely Identified by, and a Unique
    Column (though there could be more than one in a PK). I imagine I'd want to use the rowid, but I'm not sure how the
    rowid of the selected IR row can be referenced. And at that point, I'm not sure how to get the IR column value for
    that row. (Say I'm on the 8th row and I need the first column... How is the column referenced? By a number, it's name,
    its heading?)
    Or maybe I'm not on the right track at all...
    Ideas?
    Thanks,
    Carol

    Hi Carol,
    What I´m trying to do is: defining a button such as when you click it a pl-sql procedure is called, which needs as an input parameter the id of the row selected in my form. what I need first, then, is to get the id of the selected row. how did you get it?
    Thanks in advance
    Francesco

  • How to Get Most Current User View Before Checking In.

    Hi,
    We have several custom workflows which users can start from end-user menu and have some resource accounts created/modified after approvals.
    User view is checked out once at the beginning of each workflow, then some user attributes are modified through forms and user view is checked in with new attributes at the end.
    If any user starts a workflow (say W2) before completion of another workflow (say W1) he started before, and W1 is completed when W2 is waiting for approvals or etc., W2 completely discards changes made to user view through W1 since it has already checked out the user view before.
    If I checkout the user once more just before checkin, I'm able to get a current user view but this time changes made through forms used in the current workflow are lost.
    What's the best way, to get an updated user view of the user without overwriting any changes made out of the running workflow and losing form data?
    Regards,
    Mehtap.

    In a situation like this, you should probably change the front end to store the changes in workflow variables instead of using the view directly. Then, post approval, you checkout the view and apply the changes. I've used this approach to perform changes on large numbers of users (kind of like a bulk action, only more reliable).
    Alternatively, you can checkout the user object at the beginning of the workflow, and this will prevent your race condition by putting a lock on it. This will obviously cause problems (for you) if your users expect to be able to do multiple changes simultaneously. Don't try this approach if an angry mob will storm your cubicle -- IDM coders are hard to come by.
    Jason

  • How to get Inserted and Deleted Rows in ALV

    I have looked at the BC_EDIT* examples but I still can't figure out how to determine which rows were Inserted and Deleted from the ALV list.  Can someone please provide me the code to do this?
    Thanks.
    Sandy

    Hi sandy,
    i dont think you will have issue in inserting a row in ALV because whenever the user done some actions say for eg clicking the pushbutton at the toolbar you could insert the a new row into the ALV.for creating pushbutton you need to use the events TOOLBAR,USER_COMMAND.
    deleting a row may also follow the above procedure.
    Have a look at the demo program
    BCALV_GRID_05
    Cheers,
    Abdul Hakim

  • How to get a current date timestamp ?

    Hi,
    I need to get the current date timestamp in a format DDMMYY HH:MM:SS.mmmm and store it in an Oracle column which is declared as of type DATE.
    Also i need to store this timestamp in a string format.
    Please give your inputs in this regard, which is appreciated.
    Regards

    Dates dont' have formats. String represenations of dates do.
    If you have a DB column that is of char or varchar type but represents a date/time, you should change your data model so that the column type is date or time or timestamp. If you can't do that, and need to put a date into a particular format, use java.text.SimpleDateFormat.
    To get the current date and time, look at System.currentTimeMillis, java.util.Date, java.sql.Date, java.sql.Timestamp.
    To put one of these into a database, use PreparedStatement. For example, a timestamp would be something like this: PreparedStatement ps = con.prepareStatement("insert into some_table (some_timestamp) values(?)");
    Timestamp ts = new TimeStamp(...);
    ps.setTimestamp(1, ts);
    ps.excuteUpdate();

  • Delete statement: how to get count of affected rows in a variable

    Hi folks
    I write a proc which deletes data from bunch of table based on data value. i want to produce a report which will have 1 line for each table like:
    Del: Table name : number of rows
    I parse delete statement into variable and use execute immediate. I know I could precede delete by select count(*) using the same criteria. Is there any more effective way to catch output from execution of 'delete' itself to avoid an overhead of running select count(*)?
    Thank you, Gene.

    Gene,
    I thought you said you wanted to have the number of rows deleted. In that case, see Sänjay's example above.
    Btw, is there a particular reason that you are using EXECUTE IMMEDIATE (?)
    To have it in a variable
    declare
       v_rows_deleted  number;
    begin
       delete from emp;
       v_rows_deleted := SQL%ROWCOUNT;
    end ;Regards
    Peter
    Edited by: Peter on Jul 23, 2009 7:48 AM
    Added example

Maybe you are looking for