This discussion is archived
3 Replies Latest reply: Jan 3, 2013 8:50 AM by 901257 RSS

ADF multiple row selection using checkbox

612990 Newbie
Currently Being Moderated
One of the basic feature missing in ADF 11g is multiple row selection using checkbox (ADF supports multiple row selection by CTRL+CLICK) and business users doesn't like the idea of CTRL+CLICK especially when the volume of click is more. Our requirement is to show the records as selected, on click of checkbox. We implemented multiple row selection by giving a checkbox and on submission, iterate all the rows and filter only selected rows for further processing. The approach works fine,but it is very slow when the volume of data is more, say 10 thousand rows. For 4 thousand records, iterating everything takes more than 200 secs !

Had the multiple row selection been the ADF standard way using CTRL+CLICK, and retrieving the selected rows using method theTable.getSelectedRowKeys() works much faster (completes in millisecs for 4 thousand records). Somehow ADF fetches the selected records much faster this way. Our requirement is on click of the checkbox, the ADF should select the records ( the same way it is doing CTRL+CLICK) and all such selected rows should be retrievable using the ADF method theTable.getSelectedRowKeys()

Is there any way it can be done?

Regards,
Antony.
  • 1. Re: ADF multiple row selection using checkbox
    Puthanampatti Guru
    Currently Being Moderated
    Wehn you highlight a row and click ctrl+A would select all rows. or Create a empty column and make rowHeader="true". On click of top left corner you can select all the rows in the table.
  • 2. Re: ADF multiple row selection using checkbox
    612990 Newbie
    Currently Being Moderated
    Hi All,

    We have implemented the select and select all using check-box and it is working fine. Issue here is the performance is too slow

    Assume SelectValue is the VO coulmn for the checkbox to select the values. To filter out the selected rows, we use the following line

    Row[] pidRows = pidView.getFilteredRows("SelectValue", Boolean.TRUE);


    it is very taking more than 2 minutes if the total number of rows are *4 thousands* and only if 2 rows are selected.

    Whereas with the CTRL+CLICK standard approach, ADF has a built in API theTable.getSelectedRowKeys(); to get only the selected rows, and the built in API takes only few milliseconds to get the selected rows. Users are not agreeing to the CTRL+CLICK approach as it is not user friendly. Suggest if there is a way to make the select box to make it work the same way as CTRL+CLICK.



    code snippet to do the standard way :


    RowKeySet sk = theTable.getSelectedRowKeys();
    _logger.info("row count of select "+sk.getSize());;+
    Iterator selection =sk.iterator();

    EmpVORowImpl empRow = null;

    +while (selection.hasNext()) {+
    Object rowKey = selection.next();
    theTable.setRowKey(rowKey);
    rowdata = (JUCtrlHierNodeBinding)theTable.getRowData();
    empRow  = (EmpVORowImpl)rowdata.getRow();

    _logger.info("Emp # "+empRow.getEmpno() +" Emp Name : "+empRow.getEname() +" Is selected ? "+empRow.getisChecked());+


    +}+
  • 3. Re: ADF multiple row selection using tree checkbox
    901257 Newbie
    Currently Being Moderated
    Hi ,
    i am developing an ADF application i am stuck with one issue ,where i need to show one tree with multiple selection with checkbox,
    depending upon selected value again i need to show some other tree with the same formate i.e multiple selection with checkbox.

    i am able to display data in the 1st tree but after selecting i am unable to get all selected value from the first tree so that the filteration of second tree can be done.

    thanks in advance for any comment.

    Regards,
    Shailendra

    Edited by: 898254 on Jan 3, 2013 8:49 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points