How to select a row in a single-select table view?

Hello folks,
I have a table view with a 'details' button. When a row is selected and 'details' is pressed, the table view disappears and a form view is displayed (like the toggle button in PCUI). I have implemented this using a navigation link. When I press 'cancel' in the form view, another navigation link takes the user back to the table view.
My problem is, when the table view reappears, there is no row selected (the row that was selected previously, is de-selected). How do I make sure that the row remains selected?
I tried using the collection_wrapper->mark() method in the inbound plug of the table view, but it works only for multi-select table.

Hi Masood,
Thanks for your reply.
I had already tried using MARK ( iv_index = lv_index ), but it did not work because the first statement in the MARK method is
  check ME->MULTI_SELECT = ABAP_TRUE.
Mine is a single-select table. So, using the MARK of the iterator object, with either the IV_BO or the IV_INDEX parameter also does not work. Is there any other way for a table with single row selection?
Thanks!!!
Rohan.

Similar Messages

  • Select or deselect multiple rows with one single selection  event

    Does anyone know how to create a JTable which can select or deselect multiple rows with one single selection event in JTable. Fore example, if the table has
    row1
    row2
    row3
    row4
    row5
    row6
    What I need is when user select row1 or row2, both row1 and row2 should be set to be selected. Then if user press CTRL and click one of row3 or row4, both of them should be selected including the previouse selected row1 and row2.
    For deselection, if row1 and row2 are selected, when users deselect one of row1 or row2, both of them should be deselected.
    Hopefully someone can give me a hint.

    Here is a partial solution using a JList. Only one line gets highlighted when the user makes a selection in the list. But, two lines are returned. There is a blank line between every two lines.
         private void addLineToList() {
              String a = f_one.getText();
              String b = f_two.getText();
              if (a.length() == 0) {
                   Utils.showInformationMessage("Item field is empty.");
                   f_one.requestFocusInWindow();
                   return;
              if (b.length() == 0) {
                   Utils.showInformationMessage("Match field is empty.");
                   f_two.requestFocusInWindow();
                   return;
              model.addElement("item: " + a);
              model.addElement("match: " + b);
              model.addElement(" ");
              int size = model.getSize();
              pairList.setSelectedIndex(size - 3);
              f_one.setText("");
              f_two.setText("");
              f_one.requestFocusInWindow();
         private void editList() {
              if (pairList.getSelectedValue().toString().equalsIgnoreCase(" ")) {
                   Toolkit.getDefaultToolkit().beep();
                   f_one.requestFocusInWindow();
                   return;
              if (!f_one.getText().equals("")) {
                   int result = JOptionPane.showConfirmDialog(this,
                   "The Item field contains text. Replace the text?",
                   "Flash Card Activity", JOptionPane.YES_NO_OPTION,
                   OptionPane.INFORMATION_MESSAGE);
                   if (result == JOptionPane.NO_OPTION) return;
              if (!f_two.getText().equals("")) {
                   int result = JOptionPane.showConfirmDialog(this,
                   "The Match field contains text. Replace the text?",
                   "Flash Card Activity", JOptionPane.YES_NO_OPTION,
                   JOptionPane.INFORMATION_MESSAGE);
                   if (result == JOptionPane.NO_OPTION) return;
              String item = "";
              String match = "";
              int index = pairList.getSelectedIndex();
              String choice = model.getElementAt(index).toString();
              if (choice.startsWith("item")) {
                   item = choice;
                   match = model.getElementAt(index + 1).toString();
                   model.remove(index);
                   model.remove(index);
                   model.remove(index);
              else {
                   item = model.getElementAt(index - 1).toString();
                   match = choice;
                   model.remove(index + 1);
                   model.remove(index);
                   model.remove(index - 1);
              int size = model.getSize();
              if (size > 2) {
                   pairList.setSelectedIndex(size - 2);
              f_one.setText(item.substring(6));
              f_two.setText(match.substring(7));
              f_one.requestFocusInWindow();
         }

  • How to identify missing records in a single-column table?

    How to identify missing records in a single-column table ?
    Column consists of numbers in a ordered manner but the some numbers are deleted from the table in random manner and need to identify those rows.

    Something like:
    WITH t AS (
               SELECT 1 ID FROM DUAL UNION ALL
               SELECT 2 ID FROM DUAL UNION ALL
               SELECT 3 ID FROM DUAL UNION ALL
               SELECT 5 ID FROM DUAL UNION ALL
               SELECT 8 ID FROM DUAL UNION ALL
               SELECT 10 ID FROM DUAL UNION ALL
               SELECT 11 ID FROM DUAL
    -- end of on-the-fly data sample
    SELECT  '[' || (id + 1) || ' - ' || (next_id - 1) || ']' gap
      FROM  (
             SELECT  id,
                     lead(id,1,id + 1) over(order by id) next_id
               FROM  t
      where id != next_id - 1
    GAP
    [4 - 4]
    [6 - 7]
    [9 - 9]
    SQL> SY.
    P.S. I assume sequence lower and upper limits are always present, otherwise query needs a little adjustment.

  • How to send multiple row data into an internal table??

    I have a view with table control.i want to select multiple row and send all the row data into an internal table.i am able to select multiple row but all the selected row data is not going to the internal table.....only a particular row data which is lead selected is going.
    Do anyone can help me regarding this issue?
    Thanks in advance,
    Subhasis.

    Hey,
    Some code example:
    declaring an internal table and work area to get all the elements from the node.
    data : lt_Elements type  WDR_CONTEXT_ELEMENT_SET,
             ls_Element type  WDR_CONTEXT_ELEMENT_SET,
    considering flights is my node.
             lt_data type sflight.
    Node_Flights is the ref of the node to which ur table is binded.
    Use Code Inspector to read the node.
    lt_Element = Node_Flights->GET_ELEMENTS
    loop at lt_elements into ls_Element.
    l_bollean =   ls_elements->is_selected ( returns abap true/false ).
        if l_bollean IS INITIAL.
           append ls_Element to lt_data.
       endif.
    Hope this would help.
    Cheers,
    Ashish

  • How to re-arrange the columns present in pivot table view in obiee 10?

    Can you please tell me How to re-arrange the columns present in pivot table view in obiee 10?

    I have columns as 1,2,3,4,6,7, in pivot table view.
    I have calculated item (column 5 as summation of 1,2,3,4) and caluclated itme (column 9 as summation of 6,7)...now if i arrange ascending then calculated columns 5,9 don't get affected.
    I need the order as 1,2,3,4,5,6,7,9

  • How to set special rows in jtable not selectable

    Hello programmers,
    anybody knows how to set special rows(p.E. row 0) in jtable not selectable.
    in advance thanks for your answers

    table = new JTable(...)
         public void changeSelection(int row, int column, boolean toggle, boolean extend)
              if (row == 0)
                   return;
              else
                   super.changeSelection(row, column, toggle, extend);
    };

  • HOW TO SELECT ALL ROWS IN A MULTI SELECT TABLE!!!!!

    Hello
    I have a table with tableSelectMany component. how can I set the page to initially select all rows when first opened?????

    efffffttttttt? are you saying you will do an electronic funds funds funds funds funds transfer transfer transfer transfer transfer transfer to anyone who answers?
    What version of JDeveloper are you using - that is quite important in order to be able to give you an answer.
    What also might be useful is "please" and "thank you" instead of SHOUTING IN ALL CAPS THAT YOUR QUESTION IS IMPORTANT. Realizing that you asked this question over a weekend when most people dont sit and read the forum...
    You have a habit of saying all your questions are URGENT!!!!!! which is generally considered, um...., impolite.

  • How to make a single row as editable in a table view?

    Hello Friends,
    As per the requirement,i have created a new table view with table row level actions. But I am able to achieve the delete functionality. But for edit action, if i lock the corresponding entity also it is not becoming as edit.
    Let me know any ideas to achieve this??
    Thanks in Advance.
    Regards,
    Ravi

    Hi Raviteja,
    In your row level buttons if you want to edit a row you have to fallow this steps..
    1) get the selected record by using index.
    2) get the action mean which action you want to perform ( edit or delete like).
    3) lock the current entity.
    4) get the custom or comp controller instance based on get the current record.
    5) edit the row..
    sample code for this..
    DATA:
         lv_index          TYPE int4,
         lr_current        TYPE REF TO if_bol_bo_property_access,
         lr_entity         TYPE REF TO cl_crm_bol_entity,
         lv_event          TYPE string,
         lv_dummy          TYPE string,
         lr_core           TYPE REF TO cl_crm_bol_core,
         lv_one_click_lock TYPE sysubrc,
         lr_col            TYPE REF TO if_bol_bo_col,
         lr_coco           TYPE REF TO component ctrl class name (impl class),
         lr_cuco           TYPE REF TO custom cntrl class name ( impl.)
       CALL METHOD cl_thtmlb_util=>get_event_info
         EXPORTING
           iv_event = htmlb_event_ex
         IMPORTING
           ev_index = lv_index.
       CHECK lv_index IS NOT INITIAL.
    * Get the current entity
       lr_entity ?= me->typed_context->urcnode->collection_wrapper->find( iv_index = lv_index ).
       CHECK lr_entity IS BOUND.
    * Get the action clicked on
       SPLIT htmlb_event_ex->event_defined AT '.' INTO lv_event lv_dummy.
    * Try to lock the current entity
       lv_one_click_lock = cl_crm_uiu_bt_tools=>set_one_click_lock( me->typed_context->cnode->collection_wrapper ).
       CASE lv_event.
    *   Edit the current Partner
         WHEN 'EDIT'.
           IF lv_one_click_lock <> 2 AND lr_entity->is_send_active( ) = abap_true.
             lr_coco ?= me->comp_controller.
             CHECK lr_coco IS BOUND.
             lr_current = lr_coco->typed_context->cnode->collection_wrapper->find( iv_bo = lr_entity ).
    *       if entity is not yet there: add it to component controller collection
             IF lr_current IS NOT BOUND .
               lr_coco->typed_context->cnode->collection_wrapper->add( lr_entity ).
               lr_current = lr_coco->typed_context->cnode->collection_wrapper->find( iv_bo = lr_entity ).
             ENDIF.
             CHECK lr_current IS BOUND.
             lr_cuco ?= me->get_custom_controller( 'compname/cnameCuCo' ). "#EC NOTEXT
             lr_cuco->typed_context->cnode->on_new_focus( lr_current ).
             me->set_editable( ).
           ENDIF.
    if this is not work then go through this link..
    OCA edit button problem
    Thanks & Regards,
    Srinivask

  • How to make a row enabled for lead selection and make other Rows disabled?

    Hi,
    What I require is:
    In a webdynpro table , which can have multiple rows, I want to make the rows which are retrieved fom backend as disabled for selection.
    And when I add a new row (using an ADD functionality) , this newly added row should only be enabled for lead selection.
    The Table property "enabled" can be assigned a context , and can be used to control the disabling of whole table.But then if I add the new row to this table, even this will be disabled.
    I can set lead selection to a the new row, but if the whole table is disabled, this won't work.
    Please suggest a solution for this.
    Thanks,
    Richa

    Do not set the enabled flag to the whole table but to the editors of each column. Bind the enabled property to a calculated boolean flag in the data source node. In the get method of this flag add a code that will make the editor enabled only if it belongs to the lead selection element.
    Now do not allow the selection of rows in the table (there is a property for this, perhaps is named rows selection I don't remember well now), but change the lead selection of the data source node to the desired element when you add the element programatically.
    Hope it helps.

  • To select particular rows from order by select query

    Hi all,
    I want to select particular rows from a order by select query like...
    select * from emp order by ename;
    If i pass 3 and 7 dynamically in where clause or something like that, it has to show rows from 3 to 7 only.
    Thanks in advance
    Pal

    This?
    SQL> select *
    from (
       select e.*,
          row_number() over (order by ename) rn
       from emp e)
    where rn in (3,7)
    EMPNO ENAME      JOB         MGR HIREDATE         SAL       COMM     DEPTNO RN
    7698 BLAKE      MANAGER    7839 01-MAY-81       2850                    30  3
    7566 JONES      MANAGER    7839 02-APR-81       2975                    20  7
    2 rows selected.

  • At max how many columns is advisable to create in a table/view

    Hi All,
    I have two transaction table from which i want to create a simple view or materialized view. But the number of columns is about 200. So i want to know at max how many columns is advisable from the performance point of view.
    Even though i will create 200 columns in a view , for a perticular client installation i may not use all the columns.
    one more thing i will never use 200 columns in the select statement . At a time i will use only 4/5 columns.
    It may happen from this four column one column will be the 1st and 2nd column will be the 200th one.
    I want to know how it affects the performance and in which scenario . Please help if any body knows or already faced this kind of scenario.
    I am using oracle 10g .

    Annapurna Nayak wrote:
    thanks for ur reply .
    We are going to use this view in a report , so if i will create it as simple view it will affect report performance. because the view script is too long ...so every time quring to a view will decrease the performance.
    Are you asking me if it will? I think it probably won't but of course you have the means to test it to be sure, right?
    As u said MV should be done with minimum possible column . what can be the maximum column in MV ..??It would be defined by the limits on:
    * The maximum number of columns that a table can contain
    * The size of the query needed to define the select statement
    * Limitations on queries needed to maintain the data
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/limits003.htm#i288032

  • How to replace null as 0 in  obiee11g pivot table view?

    Hi,
    I am using obiee11g pivot table view,
    I have tried so many views but it's not work. My oracle support team also tired but could not solve it
    1.) used BIN method is that measure columns
    2.) ifnull(column name,0)
    3.) case condition:
    Case when columns is NULL then 0 else column end
    4) data formate override custom formate option
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    http://obieeelegant.blogspot.com/2011/06/how-to-replace-null-values-in-obiee.html
    Note:
    I don't want to show strike-rate and custom message in that blank cell. I want to show blank cell(null values) as 0 in the obiee11g pivot table view.
    Obiee10g version is working fine only issues in obiee11g
    Thanks in advance...
    Thanks
    Deva

    I tried this on 11.1.1.6.2 but I can't see good results.
    I choose subject area A-Sample Sales and I choose:
    T02 per Name Month on rows
    P1 Product on columns
    Measure : IFNULL("Simple Calculations"."17 Net Costs", 0)
    Prompted Year 2008
    On product Install and 2008/01 there isn't value...and I put Ifnull in my formula...
    My problem is that I want to do a conditional format when Product = Install. So I have all column with background colour except Null values...so is not pretty...
    If I add custom numeric format I can see 0 but not with background colour...
    I add a picture:
    http://imageshack.us/photo/my-images/600/tablegk.jpg/
    Any help about it??
    Is a bug on obiee??
    Edited by: Alex1 on 04-sep-2012 4:28

  • How to use column with linkToItem in the Basic Table view style mode

    Hi
    I have already changed a normal column that I made to a column with linkToItem as follows.
    <viewfields>
    <FieldRef Name="MyColumn" linkToItem="TRUE">
    and it worked.
    But this column works only at the default view style mode in my case.
    Does anyone know how to use linkedToItem column in the Basic Table mode?
    hope someone help me.
    thanks

    Hi,
    According to your description, my understanding is that you want to use linkToItem in the Basic Table view style.
    Per my test, in the Default style view, we need to use linkToItem=”TRUE”. However, in Basic Table style view, we need to use LinkToItem=”TRUE” instead.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • How to not display the column header in the table view?

    I do not want to display the column header in the table view, how can I achieve it?

    If you're using JavaFX 8 you can use the following in an external style sheet:
    .table-view .column-header-background {
      -fx-pref-height : 0 ;
    If you're using JavaFX 2.2, the -fx-pref-height attribute is not available in css, so I think you have to resort to a lookup:
    final Region tableHeader = (Region)table.lookup(".column-header-background");
        tableHeader.setPrefHeight(0);
    As always, I feel obliged to point out that I don't really like lookups. Sometimes they seem to be the only way, though.

  • How to get multiple row data in single row for one value of foreign key

    i want to get data from a table in a way that all the emp_id corresponding to one manager_id
    in employee table come in one row. (emp_id is the primary key and manager_id is the foreign key) Since there are different emp_id whose manager_id is same
    so how can i get all the emp_id in one row .

    One way with 10g:
    select mgr,
           rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',')  emps
    from emp
    where mgr is not null
    group by mgr;10g:
    -- define this function:
    create or replace
    function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
    as
      val varchar2(100);
      return_value varchar2(4000);
    begin
    --  open c;
      loop
      fetch c into val;
      exit when c%notfound;
      if return_value is null then
        return_value:=val;
      else
        return_value:=return_value||sep||val;
      end if;
      end loop;
      return return_value;
    end;
    select mgr,
           concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
    from emp
    where mgr is not null
    group by mgr;With 11g:
    select mgr,
           listagg(empno,',') within group (order by empno) emps
    from emp
    where mgr is not null
    group by mgr;

Maybe you are looking for

  • Can I load a new iTunes account from my backed up iPhone?

    Can I load a new iTunes account from my backed up iPhone?

  • BP created in "Z" role in CRM

    Hello Experts We are maintaining Zroles such as ZSold-to party (ZCRM00) , ZShip-to party (ZCRM02) etc in customising. We have created BP with the above Z roles. I have also maintain relationship for these BPs as "Has contact person" Now when i login

  • Not able to use selectOneRadio from LOV in TreeTable

    I am on Jdev ADF 11.1.1.3.0 version. I have QuestionVO which has attribute called selectYesNo. This attribute has LOV of type Radio Group. This VO has master detail relationship with master VO called CategoryVO. In my JSF page, I want to drop this as

  • Match bank statement lines across mutliple operating units

    Hello, We need the ability to reconcile bank statement lines from a single bank account with transactions across multiple operating units. Any ideas how I can do this in Oracle R12? Thanks for your help.

  • Roblèmes de mise à jour d'acrobat 8.

    Bonjour, Je rencontre des problèmes de mise à jour d'acrobat 8. J'ai successivement installé les mises à jour 8.1.3, 8.1.4, 8.1.5. Au moment de mettre la 8.1.6 : l'installation échoue. De plus, acrobat me demande encore les mises à jour 8.1.3, 8.1.4