Question on row selection of OATableBean.

Is there a way to determine which nth row was selected of a OATableBean.
Ideally, I would like to know nth row of those displayed, such as clicking on icon in the bottom row of a OATableBean would return 10 (or 9 on zero index) if the default of 10 rows is displayed.

what does getCurrentRowIndex() (in OAViewObjectImpl)
VO return ?
Thanks
TapashgetCurrentRowIndex() is always returning the number of rows in the view, probably because I had done a vo.last() prior to setting the setRangeStart().
I am not using a table select, but a switcher that has a enabled/disabled update icon.
I guess that I can get the key as a parameter, and filter the view, and get the correct row number, then offset it by the rangestart.

Similar Messages

  • Help needed in row selection in Tabular form across pages

    Hi,
    I have a tabular form report similar to http://htmldb.oracle.com/pls/otn/f?p=31517:95. I want to select some rows from first page and then use the pagination to get to the next page, select some more rows and hit the submit button for processing. The rows selected in the last page alone are picked up for processing, and the ones selected in the earlier pages are lost. I see the same behaviour in Denes' example as well. I picked a row in the first page and a row in the next page, and then click "Pick Records", i see only the record i picked on the second page.
    I did play around with "partial page refresh" setting for the tabular form region, but that does not help.
    Is there a way to select across pages in a tabular form?
    thanks,
    Rams
    Edited by: rams1234 on Jan 22, 2009 10:19 AM

    Okay. I could make this work, but this seems to be a roundabout way for me. In my case I dont have any database related query to get the values, hence the Application level process may not be needed.
    When I select the checkbox, i get the value. I am hoping that I should be able to send the value to a javascript function and update the filed value in the function itself. Please see the function below..
    function setFileID(pThis) {
    var chkvals=pThis.value;
    var fldValue = new $x('f_FILELIST').value ;
    if (fldValue != 0)
    { $x('f_FILELIST').value= fldValue+'-'+chkvals;}
    else
    { $x('f_FILELIST').value = chkvals ;}
    This function works fine in making up the list. The issue is, when an already selected row is unselected, the value of the checkbox gets added one more time :) If I detect the checkbox status and subtract the corresponding value, this will be perfect..
    Thanks for the link anyway. I am marking this question answered.
    regards,
    Rams.
    Edited by: rams1234 on Jan 22, 2009 1:18 PM

  • WAD 2004s Analysis Item Row Select RRI_RECEIVER does not pass Filter values

    I have created an Analysis item and using a Data Provider that has a Sender-Reciever entry for it. I created a Command on the Row Selection Activation that does an Report to Report (RRI) jump to another web page(template or app whatever sap calls it). When running the page, it performs the jump to the other page, but does not filter the page on the selected hierarchy value on the original page.
    Why does this not work?
    If I do the same thing by selecting the Goto from the context menu on the cell it works fine.

    Answering my own question here....
    This was solved by applying the patch mentioned in Note 1115027.

  • Custom JTable column (JCheckBox) not included in row selection.

    I am trying to use JCheckBox (for display only data) as one of my JTable columns. I have written custom cell renderer for the same. Every thing is working fine except that when I select a row, the new custom JCheckBox column is not included in selection. Here is the code that I am using.
        protected class CheckBoxColumnRenderer extends DefaultTableCellRenderer {
            JCheckBox ckb = new JCheckBox();
            public Component getTableCellRendererComponent(JTable table, Object value,
                        boolean isSelected, boolean hasFocus, int row, int column) {
                if (value instanceof Boolean) { // Boolean
                  ckb.setSelected(((Boolean) value));
                  ckb.setHorizontalAlignment(JLabel.CENTER);
                  ckb.setBackground(super.getBackground());
                  if (isSelected || hasFocus) {
                      ckb.setBackground(table.getSelectionBackground());
                return ckb;
        }How can I include the custom cell in the row selection.
    regards,
    nirvan.

    they have lots of dependencies and it is not always easy to strip out an SSCCE without a considerable effort.Exactly. And is the cause of the problem the dependencies or something else. The only way to know for sure is to strip out the code and simplify the problem, that way you truly understand what the problem is.
    The majority of time this can be done with minimal effort as in this case.
    Some times we are sure that the problem is with certain part of the code Is the problem the code or the way the code is invoked? How do we know the TableModel is created properly or that the column class is overwritten correctly when we can't see it?
    someone having a third look at it may actually find the enhancement required with ease.Exactly, but we need to see the big picture.
    So are you sure that I should post an SSCCE with every possible question where coding is involved ?In the majority of cases a SSCCE is easily created in 5-10 minutes, so if you want the fastest help then yes.
    Just twice this past week I was ready to ask a question on the forum and was preparing a SSCCE to post and sure enough both times the creation of the SSCCE caused me to look at the problem differently and I solved it. I would much rather solve a problem on my own then post a question and wait for hours (days) hoping someone else knows the answer.

  • SQL Developer 1.2.1, SQL Worksheet, Full Row Select

    I was wondering if there was a way in the worksheet under 1.2.1 to do a full row select when viewing. When only columns are selected, it makes it a little difficult to scroll to the right on large records and still know which record is the current one when there is quite a bit of data, both columns and rows.

    If I'm reading your question right, all you have to do is click once on the left hand side of the row in the results section (where the pseudo-generated row number is)

  • Dynamic row selection based on Page member selection in Planning web-form

    Hello experts
    I have requirement where, user dont want 10 webforms to enter 2 accounts line for various sparse members. Below is the dimension detail and web-form current design
    Account - Dense
    Period - Dense
    Year - Sparse
    Scenario - Sparse
    Version - Sparse
    Entity - Sparse
    Product - Sparse (600 level 0 members)
    Product dim has family1 as parent and 40 level 0 mem like that there are 10 family level 1 members, now to enter account member (only 2 member) for 6 years projection ( it means 12 periods and 6 years in column ) , i can build 10 web-forms with one web-form has one family level-0 mem in rows,
    however my question, is how can i achieve this in one web-form, instead of 10 web-forms for 400 products ?
    your help is greatly appreciated.
    Edited by: 859874 on Jul 18, 2012 8:58 PM

    Im not sure there is any simple way to get dynamic row selection based on what is selected in the page.
    If I were designing the form based on what you have stated, I would probably stick both Account and Year in the page, and the 400 products in rows. This would require the user to select the different combinations of Year / Account, but would mean only 12 columns (instead of 72).
    Alternatively you could stick Account in rows too - meaning 800 rows, but less combinations to select in Page....all depends what is deemed acceptable to the user.
    Probably other approaches that may be better than above (put Product in the Page for fun!!)
    Thanks
    JB

  • Capture the rows selected ,tableView

    Hi Friends,
    I have a requirement and i was searching in the forum and i have seen the same question been asked 
    Capture the rows selected in a multiselect table view (BSP)   but i couldn't able to judge how the thread is closed
    We have a tableView that is filled on selecting a value from a dropDownListBox.
    and now i select some rows from the table view and click on a button(say btn_ok)
    now the data is processed .
    now what is my requirement is when   i again run the page and select the same drop down value i want to see the rows to be already selected for which i have done before
    example
    dropdown -
    > a is selected
    table view
    1----> selected
    2
    3---->selected
    4
    5---->selected
    6
    btn ok
    next time i want to c these selected rows already as SELECTED
    Regards
    Bhavana

    Hi,
    Are you able to fetch single row? If yes then debug and try to solve it. I don't have SAP System right now but this will help you. First change your table selection mode "Multiple". After that write following code in your "OnInputProcessing"
    Sending Selected Field to the calling Screen
    DATA : tv      TYPE REF TO cl_htmlb_tableview,
           tv_data TYPE REF TO cl_htmlb_event_tableview,
           event   TYPE REF TO cl_htmlb_event.
    tv ?= cl_htmlb_manager=>get_data(
            request = runtime->server->request
            name    = 'tableView'
            id      = 'tv_field' ).
         RECEIVING
           data    = tv.
    tv_data = tv->data.
    w_field = tv_data->row_key.
    Where w_field is your field name. By the way this I used to get one row. Try debugging and may be you will find your way.
    Thanks,
    Muhammad Usman

  • About row selection in JTable

    This is also a question about JTable, when type the key "ENTER", the row selection will focus on the next line, how can I stop this default action? Can I make the default action of pressing "ENTER" to be activate a cell in the JTable to editing state?
    Thanks for any help.

    Sorry, I need to ask for help again, yes, in your case, the method works,
    but I am afraid this method does not help me, because I don't know HOW TO MAKE THE F2 FUNCTION in my case.
    I use the method you recommend, and yes I can stop the default response of pressing ENTER, it means when I stroke ENTER in my table, the selection won't go to the next line, but it just up to my half purpose, how can I use Enter to editing a cell then? My silly question is I even don't know how to make F2 works?

  • Want to display value instead of "No rows selected"

    select 'NOV-02' "Month" , decode(sum(pe.pet_tar_amount),null,'0')"Budget",pt.pfe_nature, t.libelle
    from pf_tar_exp pt, pf_tar_expfal pe, thesaurus t
    where
    pt.id_protf=pe.id_protf
    and pt.id_expend=pe.id_expend
    and pt.pfe_nature=t.ccode
    and pt.id_protf='355.02-USA/001'
    and t.langue='A'
    and t.thesaurus_name='NAT_DEP_NLP'
    and pe.pet_dat>='01-nov-2002' and pe.pet_dat<='30-nov-2002'
    group by pt.pfe_nature, t.libelle;
    This is my query. When I run it, i get "no rows selected", which is true because there is no data for pe.pet_tar_amount for the given dates. But, I want to display the Month as NOV-02 and 0 for sum(pe.pet_tar_amount).
    I would appreciate if someone can help me with this.
    Thanks,
    Ruby

    Technical questions such as this should be posted to one of the technical forums-- Products | Database | SQL and PL/SQL in this case.
    It may be as simple as doing an outer join on pf_tar_expfal.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Multiple rows selection handling in Tableview

    Hi guys,
    ..Good morning ..
    I have developed one page for displaying Employees(pernr and Ename) under CEO/VP/Managers using <b>TableView</b>.
    Here i have some difficulties.
    <b>1.</b> I managed to show Multiple row selection menu
       (Selectall/deselectall) right upper corner of
       Tableview. but i can also select multiple rows not all
       at a time .So in this case ,those selected employees
       Overtime amount i want to show in the next page.here
       my question is How do i capture selected rows(not all
       at a time).
       I am using this code ..
    <htmlb:tableView id     = "tvX"
             headerText     = "Employee List"
              headerVisible = "true"
              idth          = "30%"
        selectedRowKeyTable = "<%= selectedRowKeyTable %>"
        onRowSelection      = "MyEventRowSelection"
        sort                = "server"
        keepSelectedRow     = "TRUE"
        selectionMode       = "MULTISELECT"
        table               = "<%= i_emp_1 %>" >
    <htmlb:tableViewColumns>
    <htmlb:tableViewColumn columnName          = "pernr"
                           width               = "10"
                           sort                = "server"
                           horizontalAlignment = "center"
                           title               = "Emp No"
                           type                = "TEXT" >
    </htmlb:tableViewColumn>
    <htmlb:tableViewColumn columnName          = "ename"
                           width               = "40"
                           sort                = "server"
                           horizontalAlignment = "center"
                           title               = "Emp Name"
                           type                = "TEXT" >
    </htmlb:tableViewColumn>
    </htmlb:tableViewColumns>
    </htmlb:tableView>
    <b>2</b>. How to send one Itab data from one page to
       another page.Presently i am using EXPORT/IMPORT
       statements.Is this right way or any other method is
       there for?. 
    Could you please look in to this ..
    <b>Best regards,
    Venkat.O</b>

    Hi Venkataiah,
    See page <b>TableViewMultiSelect.bsp</b> in BSP application SBSPEXT_TABLE.
    There is an attribute <b>selectedRowIndexTable</b> in tableView element. you have to assign a table of type INT4_TABLE, and you can fill this table by table_event->PREVSELECTEDROWINDEXTABLE in OnInputProcessing event. For more details see the above mentioned bsp application.
    To Export/Import is ok,  you can use server-side cookies also, But best way is using model binding. Learn MVC for that.
    Hope it solves your problem.
    Regards,
    Narnder Hartala

  • 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());

  • Not able to select and copy from adf table in IE and chrome if we enable row selection

    Hi All,
    We have an adf table and user wants to select and copy table cell values.
    We enabled row selection on adf table. Ifrow selection is in place, IE and Chrome are not allowing user to select and copy data. But Firefox is allowing.
    Do we have any solution to this? For our customer IE is the standard browser and they do test app on IE.
    Regards
    PavanKumar

    Hi Timo,
    Sorry forgot to mention versions.
    We are using 11.1.1.7 and IE 9.
    I tried in Google but could not get the solution.
    Kindly let me know solution for this.
    PavanKumar

  • Cell(Row) Selection not display in OOPS ALV

    Hi all,
    I am not able to get the cell(row) selection in the oops ALV when i called it second time.
    I am displaying some information using oops alv  in 100 screen. After user action on 100 screen i am calling 200 screen with different information which is also display in oops alv. When i displaying information in second time the cell(row) selection is not getting displayed.
    For both ALV the fieldcatelog is different.
    Initially i tried using same container but i face same problem, so i am trying to call second alv in new screen.
    But problem remain same.
    Can anyone help me to solve this problem ?
    Regards
    Nilesh

    hi,
    can u send ur report  so dat i can look furhter to it.and help u out

  • To determine the number of rows selected in a table view (BSP)

    Hi,
    My requirement is:
    I would be selecting 1 row from a table view ( which is made multiselect for another requirement) , and press a button.
    The functionality of button is to open a popup window based on the row selected.
    I want to display an error message if more than 1 row is selected, and button is clicked.
    Message will say that "you cannot select more than 1 row".
    For this,  I need to know how I can get the number of selected rows in a table view.
    I tried using the below code.
    But I feel this will work only in DO_HANDLE_DATA method.
    The popup would open, even before control comes in this method.
      CALL METHOD cl_hrrcf_iterator=>get_tv_index
        EXPORTING
          p_id               = p_tableview_id
          pt_form_fields = table_form_fields
        IMPORTING
          pt_indices      = sel_row_index_tab.
    Could you please provide me with a solution.
    Quick replies will be highly appreciated.
    Thanks,
    Nisha Vengal.

    Hi ,
    Your TV :
    <htmlb:tableView id              = "tv1l"
                                   design          = "alternating"
                                   visibleRowCount = "10"
                                   fillUpEmptyRows = "true"
                               onRowSelection  = "MyEventRowSelection" <----This is the event you have to use
                                   selectionMode   = "MULTILINEEDIT"
                                  filter          = "SERVER"
                                   table           = "<%= some table %>" >
    in DO_REQUEST:
    DATA:  tv                  TYPE REF TO cl_htmlb_tableview,
           tv_event          TYPE REF TO cl_htmlb_event_tableview ,
           event             TYPE REF TO if_htmlb_data.
    event = cl_htmlb_manager=>get_event( request ).
    IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableview.
      tv_event ?= event.
      CASE event->event_server_name.
        WHEN 'MyEventRowSelection'.
    count = count + 1 .
    if count ne 1 .
    errmsg = 'Your message'.
    endif.
    ENDCASE.
    ENDIF.
    in View/Layout:
    <% if errmsg is not initial. %>
    <s cript t y p e   =   t e x t / j a v a s c r i p t >
    a l e r t ("<%= errmsg %>") .
    </ s c r i p t>
    <% clear errmsg. %>
    <% endif. %>
    errmsg is a class attribute of type string and count is also a class attribute of type c .
    Regards,
    Anubhav.
    Reward if useful
    Edited by: Anubhav Jain on Sep 19, 2008 3:08 PM

  • How to avoid table refresh on row selection

    Hi,
    I have a table where the row selection happens on selecting the check box in the first column of the row. The check box is bound to the transient Boolean attribute of my VO to support this functionality which is missing in new version of ADF. The selection is working fine, however I am facing the issue with table refresh. Everytime I click checkbox to select or unselect a row my whole table is getting refreshed which is very unusual for user point of view. This is my code for the checkbox column:
    <af:column sortProperty="isSelected" sortable="true"
    headerText="#{bindings.pricingObjects.hints.isSelected.label}"
    id="c4"
    inlineStyle='#{(row.isSelected)?"background-color: #E7E7E7":""};'>
    <af:selectBooleanCheckbox value="#{row.bindings.isSelected.inputValue}"
    required="#{bindings.pricingObjects.hints.isSelected.mandatory}"
    shortDesc="#{bindings.pricingObjects.hints.isSelected.tooltip}"
    id="it4" simple="true"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.isSelected.validator}"/>
    </af:selectBooleanCheckbox>
    I have to keep autoSubmit="true" on selectBooleanCheckbox because the table has to change color of the row everytime the checkbox is selected or deselected. Also, there are multiple commandToolbarButton such as "Delete" which needs to be enabled/disabled depending on the row selection.
    Is there anyway, I can achieve this behaviour with minimal refresh of table?

    Hi Marge,
    Yes I do have Add and Delete toolbar button in the panelCollection and also set partialTrigger="tableId" on them. I need this partialTriggers because Delete button should enable/disable depending on number of rows added in the table. However, I tried removing them but it did not work for me, table is still refreshing. BUT this solution does work in combination of other solution i.e. removing ChangeEventPolicy="ppr" on the iterator. I need ppr because I have a form which is bound to the same iterator and should change on table selection. The design is like this,
    - Read-only Table on top
    - Editable Form below
    - Select the row in table and edit the fields in the form
    If I remove ppr then my form is not updating with the row selection.
    Regards,
    Afroz

Maybe you are looking for

  • When typing in Adobe Muse CC vers6 the cursor sometimes deletes the characters after it

    I'm editing text in type frames in Adobe Muse CC vers6 and sometimes the cursor deletes all the characters after its position, rather than enter new characters. Anybody else have this problem or a solution?

  • Current Date plus number of days script

    Hi All, I have a form I am building which has a date field (currently setup to specifiy todays date on load).  There is a field that slects number of days until a billing cycle (currently 0 through 13 days). I need to setup a script that takes todays

  • Why can I not open numbers?

    Hi! I can not open Numbers 3.0.1 the message: "when you last opened numbers it quit unexpectedly while trying to open documenst (windows) that had previously been open. Do you want to try to reopen them again?" whether I press Dont open again or pres

  • Iphone 4s volume goes down automatically

    recently been having a problem with my iphone, sometimes my volume will go from its present position to zero without any input from me, also the speaker symbol will stay on the screen and not clear. Fix please.

  • Chinese Character

    I am a new user of Blackberry 8300, actually the handheld was a gift from my colleague which she bought in Europe, I have chosen the mobile/internet service from Hutchison 3 company for both mobile phone and e-mail connection, everything is working p