Select all in table element

Hello all,
I created a table element which contains a column of check boxes.
I want to add to my table an option to check/uncheck all the check boxes.
I already created the events but I dont know how to call the events I created using the table?
Thanks in advance,
Tomer

Hi Tomer,
you haven't said how your gui should look like. For example you can add two buttons ("select all" and "Unselect all") for this task. Now you add two actions, one for each button. Add the actions as eventtarget in the properties of the buttons. And in the event-methods of the actions you write your code to select/deselect the checkboxes, like
public void onActionSelectAll(...) {
    for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
        wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(true);
public void onActionUnselectAll(...) {
    for (int i = 0; i < wdContext.nodeMyTableDataSource().size(); i++) {
        wdContext.nodeMyTableDataSource().getMyTableDataSourceElementAt(i).setMyCheckboxAttribute(false);
HTH,
Frank

Similar Messages

  • Select all and deselect all in table control

    Hi experts,
        I want to make the select all and deselect all options in my table control.
    But i can't able to do that one. Kindly suggest me how to do that one.
    one more thing, if i select some rows in the table control, and press save it should be saved in some other table. how can i implement that one.
    Waiting for ur reply.
    Regards...
    Arun.

    Hi Arun,
    In the context node that you bind to the table, set the cardinality as 0..n and selection as 0..n. In the UI element Table, set the property selectionMode as 'multi'. Then a toggle button for select/deselect all will appear automatically in your table. You can see it in the top left corner.
    For your second question, after selecting the elemets and pressing 'save', in your event handler, do a get_selected_elements( ) on your node. This will return you a set of context elements. Loop through each element and do a get_static_attributes to get the rows. Then you can append these rows to another internal table and bind it to the context. Bind your second table to this node. If the two tables are in different views, the context nodes need to be present in the component controller and mapped to the views.
    Hope this helps.
    Regards
    Nithya

  • Selecting all rows currently visible in the table

    Hi ,
        we need to add the "Select all" functionality for the a table used in one of the screens. The examples I have found for this would select all the elements of the node bound to the table. However, we need to select only those elements which are presently visible on the screen, which would change if the user presses the previous or next button.
    Please guide me on how it can be possibly done .
    Edited by: Dhruwat Bhagat on Dec 28, 2007 11:45 AM

    Hi Dhruawat,
                        Modify the example functionality SelectAll like this:
    Create visRow context attribute of type int. Bind this to firstVisibleRow property of table.
    Check visibleRowCount value (default is 5)
    //for loop on the table node
    for(int i=visRow ;i<(visRow + visibleRowCount value );i++)
    select the element;
    // end of for loop
    regards,
    Siva

  • Select All rows  in WebDybpro Tables

    Hi All ,
    I am working on NWCE 7.1 . i have table in my UI. and want to give slect all rows functionality in table. in NWCE is there
    any way to give select all rows in table with out using , button and writing action to iterate node bound to table.
    also i want to know about RowCreator ui element for table.(when we right click on table we get insert -> rowcreator). How this works
    Thanks in advance
    Regards
    Kavita

    Hi Kavita,
    The row creator Ui element is not visible in table itself you can see it only in outline window.
    and in its on create event you have to write the code which i have provided above. it will not be visible in table at design time but at run time when you will click on the last rows lead selection it will call the associated event and one row will be added to the table.
    Regards
    Jeetendra

  • Multiple row selection for table element

    Hi,
    I have a requirement where I require to select multiple rows from a table element in a WD for abap application.
    I have defined a node with cardinality and selection set to 1..n.
    The contex node contains 4 fields : emp_name, pernr, manager and position.
    The attributes of the table element for selectionmode is set to 'multi' and 'selectionchangebehaviour' is set to 'auto'.
    I have defined an action on the 'onleadselection' event.
    The code in this method also includes the statement 'lo_el_team_view->set_selected( EXPORTING flag = abap_true ).' 
    When I execute the application only 1 row is highlighted at any one time when I select it. You can select multiple rows by holding down the 'ctrl' key but I want to avoid having to do this. Is there anything I have missed out causing multiple row selections not to be all highlighted.
    Thanks in advance for any assistance.

    Hi raj,
    you can try the following code in the 'onleadselect' event of the table,
    create one attribute ' Flag'  of type WDY_BOOLEAN under the node which has been binded to the table.
    DATA lo_nd_node_tab1 TYPE REF TO if_wd_context_node.
      DATA lo_el_node_tab1 TYPE REF TO if_wd_context_element.
      DATA  lo_elements TYPE wdr_context_element_set.
      DATA  lo_ele_select_new TYPE REF TO if_wd_context_element.
      DATA lv_deselect TYPE wdy_boolean.
      DATA lv_flag TYPE wdy_boolean.
      DATA lv_select TYPE wdy_boolean.
      DATA lv_index TYPE i VALUE 0.
      lo_nd_node_tab1 = wd_context->get_child_node( name = wd_this->wdctx_node_tab1 ).
    get the current selected element
      lo_ele_select_new = wdevent->get_context_element( name = 'NEW_ROW_ELEMENT' ).
      CHECK lo_ele_select_new IS NOT INITIAL.
    check whether it has been selected or not
      CALL METHOD lo_ele_select_new->is_selected
        RECEIVING
          flag = lv_select.
      lo_ele_select_new->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_deselect ).
    check whether element has been previously selected or not,if not, set the flag to select it
    IF lv_select IS NOT INITIAL AND lv_deselect IS INITIAL.
        lo_ele_select_new->set_attribute( name = 'FLAG' value = 'X' ).
    if selected currently and previously then set the flag as false,in order to delect it
      ELSEIF lv_select IS NOT INITIAL AND lv_deselect IS NOT INITIAL..
        lo_ele_select_new->set_attribute( name = 'FLAG' value = ' ' ).
      ENDIF.
      CALL METHOD lo_nd_node_tab1->get_elements
        RECEIVING
          set = lo_elements.
    according to the falg, select and delect the elements
    LOOP AT lo_elements INTO lo_el_node_tab1.
        lo_el_node_tab1->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_flag ).
        IF lv_flag = 'X'.
          lo_el_node_tab1->set_selected( abap_true ).
          lo_nd_node_tab1->set_lead_selection_index( lv_index ).  * this statement deselects the lead selection index*
        ELSE.
          lo_el_node_tab1->set_selected( abap_false ).
          lo_nd_node_tab1->set_lead_selection_index( lv_index ).
        ENDIF.
      ENDLOOP.
    I hope this resolves your problem.
    Thanks,
    krishna

  • Select all not working in TABLE menu

    Hi all,
    I am using normal table, displaying some values and selecting record i am copying to another table. If i select manually one record and i use CTRL to select multple records it is working.
    Table has menu option select and deselect all, if i use select all it is showing as selected but while copying giving error null objects.
    And anotherthing i observed here is if i select first record and i use select all menu option it is working??
    I have to do any setting for this? any ideas?
    Thanks,
    Venkat.

    I have used this functionality with out a problem. How do you copy ?
    you mean to say that after select_all, node->get_selected_elements( ) return 0 elements ?

  • How to select all rows in table automatically after refreshing?

    Hi,All
    After refreshing the table,I want to select all rows,like MultipleButton's function.
    How can I do?
    Thanks
    Smile.

    Hi,-Grif-
    * Set the selected state for the given row groups
    * displayed in the table.  This functionality requires
    * the 'selectId' of the tableColumn to be set.
    * @param rowGroupId HTML element id of the tableRowGroup component
    * @param selected Flag indicating whether components should be selected
    function selectGroupRows(rowGroupId, selected) {
      var table = document.getElementById("form1:table1");
      table.selectGroupRows(rowGroupId, selected);
    }I don't know that the parameter selected is a boolean,or the checkbox(radio button) id?
    Thanks
    Smile

  • Select All in large table

    My product has some very large tables (using RANGE_PAGING). I want to allow the end user to do a Select All operation, and then press a command button to act on all selected rows, but want my backing code to detect a Select All has been done, rather than attempt to retrieve all rows from the table. Is this doable with a RichTable?
    I'm porting an existing UI over to ADF -- the old UI handled this by having a separate select all button (column header), which would get unset if any row got unselected, and the backing code could interrogate that. I was wondering if there was a more ADF-ish way of handling this.
    Using Oracle JDeveloper 11g Release 1 (11.1.1.6.0)
    Edited by: user12614476 on Dec 5, 2011 1:58 PM
    (added JDeveloper version info)

    Are you really using 11.1.1.6? If so, I guess you should be asking in one of the internal Oracle forums.
    But, no, there's no "more ADF-ish" way to my knowledge :)
    John

  • Select All in HGrid/Table

    Hello All,
    I want to select all the rows in the table that is being shown in the Hgrid (not just in the page). Would this be possible. I saw some previous questions on the issue but could not get a clear answer.
    I see that when i click the next/prev links the control comes till the controller and i can see the events raised. But the select all does not even come to the controller to be captured. Do let me know if you think this can be done.Any pointers would be helpful.
    Thanks
    -Pradip

    Are you really using 11.1.1.6? If so, I guess you should be asking in one of the internal Oracle forums.
    But, no, there's no "more ADF-ish" way to my knowledge :)
    John

  • Select All in a table does not work for Drag and Drop

    Hi. I am using Jdeveloper 11.1.1.2 but have also reproduced in 11.1.1.3.
    I am trying to implement drag and drop rows from one table to another. Everything works fine except when I do a Select All (ctrl-A) in a table, the table visually looks like all rows are selected, but when I try to click on one of the selected rows to drag to the other table, only the row I click on is dragged.
    I tried setting Range Size -1, fetch mode to FETCH_ALL, content delivery to "immediate" but nothing works.
    I even have reproduced not using a view object but just a List of beans with only 5 or 10 beans showing in the table.
    Does anyone know how to get Select All to work for a Drag Source?
    Thanks.
    -Ed

    Frank-
    OK, thanks for looking into that. I also submitted this service request, which includes a simple sample app to demonstrate the problem:
    SR #3-2387481211: ADF Drag and Drop does not work for rows in table using Select All
    Thanks again for the reply.
    -Ed

  • How to select all the colomns_names from a table, with their datatypes ..

    hi :)
    i would like to know, how to select in SQL all the columns names from a table with their datatypes so that i get something like this :
    Table 1 : table_name
    the column ID has the Datatype NUMBER
    the column name has the Datatype Varchar2
    Table 2 : table_name
    the column check has the Datatype NUMBER
    the column air has the Datatype Varchar2
    and that has to be for all the tables that i own ! ..
    P. S : i m trying to do this with java, so it s would be enough if you just tell me how to select all the tables_names with all their colums_names and with all their datatypes ! ..
    thank you :)
    i ve heard it can be done with USER_TABLES .. but i have no idea how :( ..
    Edited by: user8865125 on 17.05.2011 12:22

    Hi,
    The data dictionary view USER_TAB_COLUMNS has one row for every column in every table in your schema. The columns TABLE_NAME, COLUMN_NAME and DATA_TYPE have all the information you need.
    Another data dictionary view, USER_TABLES, may be useful, too. It has one row pre table.

  • How to SELECT ALL records of a TABLE VIEW in the BSP page

    Hi All,
    In the BSP portal, I am displaying some data(multple records) in the form of a table using the BSP TAG <htmlb:tableView>. I wrote the logic in the 'VIEW' of the BSP application which will be triggered by the controller. I have used the attribute selectionMode = "MULTISELECT" to have a Check Box to select a row.
    My requirement is to have a button/checkbox on the first column of the header of the table view. By clicking on this, it should select/desect all the records of the table. Could someone please help me how to do this? What attribute I should use in the tableview to get the button in the header row of the table and how to select all the records of the table.?
    Please provide your valuable inputs.
    Thanks & Regards,
    Paddu.

    Select all / Deselect all functionality when onRowSelection is there

  • Editing Cell Column of a selected row in UI table element.

    Hi Experts,
    I have a UI Table Element with three columns. First two columns are input fields in read only mode. Third column is a text edit field.
    Now when I Select a row and press a button 'EDIT' i want that particular rows third column CELL alone to be in editable mode.
    In order to achieve this, I created a WDY_BOOLEAN attribute in the same node which is used to bind the table. I binded this attribute to the READ ONLY property of third column.
    In the EDIT button i wrote the following code.
    lo_el_n_stp->set_attribute(
    EXPORTING
       name = 'A_EDIT'
       value = ' ' ).
    Here A_EDIT is the name of the attribute.
    When i do this, my first rows third column is only going to EDIT mode and not the row which i selected.
    Please tell me how to solve this problem.
    Thanks in advance.

    Hi thanks for your reply.I have already tried this, the problem is i am not getting the seleted row value by using the below code
    l
    lo_nd_node1->get_static_attributes(
    IMPORTING
    static_attributes =  ). "here you will get the selected row
    Its giving me the first row value.
    Edited by: Delphi on Mar 11, 2010 11:52 AM

  • How to get number of records in all user tables in one select

    Please advise how to retrieve the number of records in all user tables in one select. I would likt to extract the data to excel file.
    Many thanks,
    Andrew

    You could always analyze the tables:
    declare
    begin
      for X in (select owner, table_name from all_tables
                 minus
                select owner, table_name from all_external_tables) LOOP
          dbms_stats.Gather_Table_Stats(X.Owner, X.Table_Name) ;
      end loop;
    end;
    /Then: Select Owner, Table_Name, Num_Rows from All_Tables ;

  • Selecting string from all the tables in databse

    Hi All,
    I need a help in finding the data from all the database tables at one time using single query.
    For e.g. I wanna search a string 'ABC' in all the database tables for a schema.
    I want to find out,which all tables (in either of its columns) contain this string strored inside themselves.
    For brand name changing,I need to find out all the tables and in turn all the columns containing that string where databse consisting of 1000 tables.
    Could anyone suggest me some option for this?Is it possible to avoid this tedious task to search individual table?

    Why is it necessary to search every column? Does your data model permit the brand name to be stored in any column?
    Whatever.
    I suggest starting with dba_tab_columns (where owner = 'WHATEVER') and look for those tables/columns that could possibly hold the brand name. You can eliminate NUMBER and DATE columns and VARCHAR columns that are too short.
    Spool that out to another script where each select statement is like this:
    SELECT 'TABLE_NAME.COLUMN_NAME', column_name
    FROM table_name
    WHERE UPPER(COLUMN_NAME) LIKE '%BRAND NAME%'
    AND rownum = 1;

Maybe you are looking for

  • Urgent help required for sms messages

    i need help urgently...i havea legal case comming up shortly and need my sms messages from my old lawyer off my phone for the court. as they will be evidence, and i cannot find a way to do this i need them on to a sim. how do i do this please. i do n

  • Help required in Development of Dynamic forms

    Hi all, I want to design dynamic form (using forms 6i), in which the end user will display the screen according to his own requirement i.e on the run-time screen user want to display particular field or not. In this we have to re-arrange the position

  • Use of const keyword in java ?

    Hi All,, I want to know the use of const keyword with proper example. Many many thx in advance Cheers Souvik

  • IDOC: Vendor & Customer Error

    Hi Experts, I am getting error massage at supplier client when I run t code WE05 Vendor number A-V6701 has not been saved for customer A-6701 Message no. V4076 I have checked customer master data Confi settings at Sales level unable to resolve this p

  • Oracle.swd.oui directory missing from 10G agent download

    I downloaded Oracle Enterprise Manager 10g Grid Control Management Agent Release 1 (10.1.0.2) for SPARC 32 bit fle name GC10g_agent_download.cpio.gz from OTN and the agent_download/Disk1/solaris/agent/stage/Components/oracle.swd.oui directory is miss