Select/deselect all rows in a table

Hi Experts,

11.1.2 JDEV


I have a form in which a richeTableau with only two Columns.Also a radio button group with two point (select all / deselect all).

My use is,

When I select the option button, if it is SELECT ALL, all lines must be selected
If it's ALL DESELECT, all lines are deselection

Current follwing method is used for all the ranks of selection,

{} public void selectAllRowsInTable (rt richeTableau)
RKS RowKeySet = new RowKeySetImpl();
Model CollectionModel = (CollectionModel) rt.getValue ();
ROWCOUNT int = model.getRowCount ();

for (int i = 0; i < rowcount; i ++) {}
model.setRowIndex (i);
Key of the object = model.getRowKey ();
RKS. Add (Key);
}

rt.setSelectedRowKeys (rks);
}

is there a simple alternative way to select/deselect all rows in a Table?

Thankz in advance

PMS

Hello

If you do not want to do in the view layer, this is the way to go. However, if you use BC as a model, you can have a transition attribute in the original Version (with the Boolean type) and set its value to true / false based on the checkbox.

Arun-

Tags: Java

Similar Questions

  • deselect all rows in af: table in the adf.

    Dear all,

    I have af:table with activated single selection. When the page is initially loaded I want all rows of the table deselection... so, how can I achieve this?


    Thank you.
    Kind regards.

    jdev version 11.1.1.4.0

    Remove the attribute according to the definition of af: table when a display object is instance fell into the page in a table:

    selectedRowKeys = ' #{bindings. " Employees.collectionModel.selectedRow}.

    The example of table definition should look like:


    lines = ' #{bindings. " Employees.rangeSize}.
    emptyText = "#{bindings." Employees.Viewable? "{'No data to display.': 'Access Denied.'}".
    fetchSize = "#{bindings." Employees.rangeSize}.
    rowBandingInterval = '0 '.
    selectionListener = "#{EmpTableBean.onTableNodeSelection} '"
    rowSelection = "single" id = "t1" >

    The following code can be used to get the selected node - after the user selects a node:

    {} public void onTableNodeSelection (SelectionEvent selectionEvent)
    resolveMethodExpression ("links. Employees.collectionModel.makeCurrent} «»
    NULL, new class [] {SelectionEvent.class},
    (New Object() {selectionEvent});
    Object richeTableau = (RichTable) selectionEvent.getSource ();
    Line line = null;
    {for (object facesRowKey: {object.getSelectedRowKeys ())}
    object.setRowKey (facesRowKey);
    Object o = object.getRowData ();
    JUCtrlHierNodeBinding rowData = o (JUCtrlHierNodeBinding);
    line = rowData.getRow ();
    }
    System.out.println (Row.GetAttribute("FirstName"). ToString());
    }

    public Object resolveMethodExpression (String expression, class returnType,
    Class [] argTypes,
    Object [] argValues) {}
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    Application app = facesContext.getApplication ();
    ExpressionFactory elFactory = app.getExpressionFactory ();
    ELContext elContext = facesContext.getELContext ();
    MethodExpression methodExpression =
    elFactory.createMethodExpression (elContext, expression, returnType,
    argTypes);
    Return methodExpression.invoke (elContext, argValues);
    }

    Thank you
    Nini

  • Select/deselect all checkboxes

    I have an IR each line has a check box. I want to allow a user to select / deselect all. So far so good, the application process to do this, I wrote and it worked fine, but the problem was with topic checkbox that has not updated if I have everything clear one of the check boxes in the report. So I tried to create a box outside the report to do the same job. It works fine if checked and unchecked everything. The problem occurs when all the boxes are ticked and user disabled one or two of them. The box outside is not updated because (I suppose the whole page isn't refresh):)
    I had an idea to create a dynamic action to trigger an event whenever the checkboxes are to select/deselect in the report, but it did not work because I knew exactly how I can refer to boxes in the report.

    I have my work space:

    http://Apex.Oracle.com/pls/Apex/f?p=9018:4:1727825479939275:
    workspace: zahratest1
    username:[email protected]
    password: zahratest2


    Thank you in advance,

    Edited by: SARA3 March 31, 2011 03:29

    If I can do it is perfect

    Don't know why not.

    Change the column title box to have an 'id' as checkall_f01 (below)

    < Input id = "checkall_f01" type = "checkbox" value = "" onclick = "html_CheckAll ($x_UpTill(this,'TABLE'), this.checked)" > "

    Add a Javascript Code that disables the check box of the header when a box is unchecked to onload

    $('input[name=f01]').click( function(){
      if ( ! $(this).is(':checked') )
      { $('#checkall_f01').removeAttr('checked');
      }
    });
    

    + Note: change the id of checkall_f01 to the specified value in step 1 and f01 to table + your box

  • Request from oracle to MySql using dblink read all rows in the table

    Hello
    I use the heterogeneous connectivity between oracle 10204 to the Mysql database.
    I have a database of link on the side of the oracle.
    I request a table in MySql with 10 million rows.

    His is not serious if I am running:
    ' Select * from ' CDR_Accounts"@mysql where 'id '= 7675405;
    or
    Select * from 'CDR_Accounts"@mysql;

    There is an index on the column id.
    It seems that the Mysql is feteching all rows in the table, all data is transferred to oracle on the dblink and only after the required lines are back to the client.

    The /etc/odbcinst.ini file is as follows:
    [odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini
    [myodbc3]
    Description             = Mysql connector to mysql version 3.5
    Driver          = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so
    Driver64                = /usr/lib
    Setup           = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so
    Setup64         = /usr/lib
    UsageCount              = 1
    CPTimeout               = 3600
    CPReuse         = 
    Please advice

    Thank you

    Initialization of gateway open tha file located in $ORACLE_HOME/hs/admin called init .ora and change HS_FDS_TRACE_LEVEL to HS_FDS_TRACE_LEVEL =WE.

    ATTENTION:
    Do not forget t turn off after all your tests.

  • Problem updated 16 rows, it updates all rows in the table

    I tried to update of 16 ranks with AL as the name of divion with the script as below:

    Update wire_center set a.wg_id = '63'
    where EXISTS (select b.div_name from wire_center, title b, area c, ns_workgroups d).
    where B.DIV_NAME =' al ' AND a.dis_id = c.dis_id and b.div_id = c.div_id and d.wg_id = a.wg_id);

    When I run it, it updates all rows in the table.

    However when I run the select subquery, it returns 16 ranks.

    It seems where EXISTS is the problem. If I exist, it gave me error ora-00936.

    How to fix? Need urgent help please. DB is 10g.

    Thanks in advance.

    If I understand correctly what you want, you must not include wire_center once again in the second select (in your clause).
    The second selection has no relationship to the table you're updating, so because select the second returns 16 rows, it is always set to true will. For each line. If all the rows will be updated.

    Instead of

    Update wire_center a set a.wg_id='63'
    where EXISTS (select b.div_name from wire_center a, division b, district c, ns_workgroups d
    where B.DIV_NAME='AL' AND a.dis_id=c.dis_id and b.div_id=c.div_id and d.wg_id=a.wg_id );
    

    Try this:

    Update wire_center a set a.wg_id='63'
    where EXISTS (select b.div_name from division b, district c, ns_workgroups d
    where B.DIV_NAME='AL' AND a.dis_id=c.dis_id and b.div_id=c.div_id and d.wg_id=a.wg_id );
    

    Published by: big on 29-dec-2010 14:27

  • all rows in the table are not eligible for the specified partition

    SQL > Alter Table ABC
    Exchange 2 Partition P1 with Table XYZ;

    Modified table.

    SQL > Alter Table ABC
    Exchange 2 Partition P2 with Table XYZ;


    P2 Partition Exchange with XYZ Table
    *
    ERROR on line 2:
    ORA-14099: all rows in the table are not eligible for the specified partition

    The exchange partition works fine for the first time. However, if we try to swap the 2nd partition it gives the error.
    How to solve this error?
    How can I find the lines which are not qualified for a specific part. is there a query to find out the same thing?

    >
    Well, exchange of syntax and logic is not clearly as it should (IMHO). There is no element of syntax that tells Oracle we want to Exchange partition data in a table that is not partitioned or not partitioned into partition table data.
    >
    What? Not sure where you got that but maybe it was before you had first cup of coffee? ;)

    An "Exchange", it's just that; an Exchange. Partition data end up in the non-partitioned table and vice versa. It is meaningless and totally obsolete if "we want Exchange partition data in a table that is not partitioned or not partitioned into partition table data".
    >
    It was decided by Oracle not partitioned table control. If the non-partitioned table is empty, it means you want to Exchange data partition in a non-partitioned table. And if not partitioned table is not empty, it means you want to Exchange data in the table that is not partitioned into partition.
    >
    There is no decision to make. The segments are swapped. Oracle doesn't check, know or even care if one or the other or both segments are empty. 'Control' which is carried out (by default except if NO CONTROL is used) only consists of ensuring all the data in the segment intended for the partition belongs to this partition.

    It is what gives the example of John. This can NEVER work if table1 is empty unless p1 is empty at the beginning:
    1 Exchange p1 with table1
    2 Exchange p2 with table1

    As John explains, assuming that no other operations are trying to put the data from p1 P2 which is not possible if p1 actually contains data.

    You can save it for next April 1!

  • By selecting the last row of the table

    I'm trying to select the last row in a table. The tables will have a different number of lines, so I can't select based on a line number. I tried to use the location options, but get an error that "the object is not a function". Not sure what the problem is.

    table = app.selection[0];
    if (table.hasOwnProperty("baseline")) table = table.parent;
    if (table instanceof Cell) table = table.parent;
    if (table instanceof Column) table = table.parent;
    if (table instanceof Row) table = table.parent;
    if (table instanceof Table)
    
    {
                table.rows(LocationOptions.AT_END).cells.texts.everyItem().fontStyle = "regular";
     }
    

    You can use the placement options for this?

    Hello

    table. Rows being a collection of object using the index-[1] is a proper way

    but cells.texts generates an error. Change it to:

    table.rows[-1].cells.everyItem().texts.everyItem().appliedCharacterStyle = "myriad regular";
    

    Jarek

  • ValueChangeListener empty all rows in a table

    Hi I have a view with the transient attributes DEST_ATTR1 and DEST_ATTR2 object.

    In a .jspx page I developed a pop-up window that contains an after a source and a destination

    Panelbox. The panelbox source has two choicelists source_attr1 and source_attr2, while

    panelbox destination has a table of dest_attr1 and dest_attr2 (also choicelists)

    I want when I change the source_attr1 do null all the fields for each row in the table on the shortcut menu.

    I developed the onSourceAttr1Changed method I use valueChangeListner, but

    only the first line of the table is made void

    Could you help me to do?

    class A {
            public static final String SOURCE_ATTR1  = "FromAttr1";
            public static final String SOURCE_ATTR2  = "FromAttr2";
            public static final String DEST_ATTR1    = "ToAttr1";
            public static final String DEST_ATTR2    = "ToAttr2";
        }
      
    
    
    public void onSourceAttr1Changed(ValueChangeEvent valueChangeEvent) {
                 ADFUtils.findControlBinding(A.SOURCE_ATTR2).setInputValue(null);
                 ADFUtils.findControlBinding(A.DEST_ATTR1).setInputValue(null);
                 ADFUtils.findControlBinding(A.DEST_ATTR2).setInputValue(null);
    
                 refreshComponent(getPanelBoxTop());
                 refreshComponent(getPanelBoxBottom());
             }
    

    Hello

    You must iterate through the rows in the table and the appropriate field, the null value

    somethings like this:

            DCIteratorBinding bindings = ADFUtils.findIterator("Copy1Iterator");
            RowSetIterator iterator = bindings.getRowSetIterator();
            while (iterator.hasNext()) {
                Row row = iterator.next();
                row.setAttribute("attr", null);
            }
    

    Kind regards

    Habib

  • Select the top row of ADF Table default

    jdev 11.1.1. 6

    In my application, I have a fall towards the bass and based on the value, select from the drop-down list on the af: table is filled (using the drop-down list vcl property, I'm populating the VO based on which the table is).

    The table has "selectionListener" defined in a method at the bean so that every time a line is selected some operation.

    < af:table value = "#{bindings." RoleVO1.collectionModel}.

    var = "row" rows = "#{bindings." RoleVO1.rangeSize}"width ="500 ".

    "partialTriggers =": soc1: cb1: cb2.

    emptyText = "#{bindings." RoleVO1.viewable? "{'No data to display.': 'Access Denied.'}".

    fetchSize = "#{bindings." RoleVO1.rangeSize}.

    rowBandingInterval = '0 '.

    selectedRowKeys = ' #{bindings. " RoleVO1.collectionModel.selectedRow}.

    selectionListener = "#{CRoleARoleBean.roleTableSelection} '"

    rowSelection = "single" id = "t1".

    editingMode = "clickToEdit."

    Binding = "#{CRoleARoleBean.roleTable}" >

    I have here a certain way, I can make the top row of the selected table and trigger the selectionListener by programming the dropdown each time value is bud?

    Please notify

    by selecting the default line can be obtained by adding after the vcl in drop-down list:

    this.roleTable.setRowIndex (1);

    RowKeySet ch = this.roleTable.getSelectedRowKeys ();

    PS. Clear();

    PS. Add (this.roleTable.getRowKey ());

    AdfFacesContext.getCurrentInstance () .addPartialTarget (this.roleTable);

    Make sure the displayRow selected = is defined in the table property

  • A script to remove all rows in the table that contains a specific text

    Hello

    I tried some old scripts but cannot move to the right solution.

    I need a script that deletes all the rows in a table that contains a specific unique word text, something like "xxx".
    Someone has an idea?

    Thank you

    Hello

    To remove a line using row.remove () method.

    Iterate if table.rows and delete the matching condition.

    If we talk about condition, be more specific - what do you mean "a line contains a text:

    ==> 1st cell contains,

    ==> any cell contains.

    Content of the line whole is an array of his cells.contents, so your text from line 1 is:

    rows [0].contents.join ("") ==> string

    Jarek

  • the selection of all colomns_names of a table, with their data types...

    HI :)

    I would like to know, how to select in SQL for all the names of columns in a table with their data types so that I get something like this:

    Table 1: table_name

    the ID of the column has the NUMBER data type
    the name of the column has Datatype Varchar2
    *....*

    --------------------------------------------------------------

    Table 2: table_name

    the check in the column has the NUMBER data type
    the air of the column has Datatype Varchar2
    *....*


    and it must 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 tables_names with all their colums_names and all their data types!...

    Thanks :)



    I've heard this can be done with USER_TABLES... but I have no idea how: (...)

    Edited by: user8865125 the 17.05.2011 12:22

    Hello

    USER_TAB_COLUMNS data dictionary view has a row for each column of each table in your schema. The columns TABLE_NAME, COLUMN_NAME and DATA_TYPE contains all the information you need.
    Another view of data, USER_TABLES dictionary, can be useful, too. He has a line of table pre.

  • Selectively hiding a row in a Table based on the value of the column

    I have a data control that is populated from pro-grammatically, based on the user's selection in the page one of wanting to hide some lines on page 2 at the same time, I don't want to delete the value binding, is there to hide the lines instead of column?

    To the table of the ADF, to hide the lines according to the requirement, use the visible property on each of the columns.

    For example, if you do not want to display all the lines that have IDs Director like 200 or 201.

     
                            
                                
                                    
                                
                            
                            
                                
                            
                            
                                
                            
                            
                                
                            
                        
    

    Thank you
    Nini

  • Selection of the row in a Table programmatically

    I have a table that has say 4 rows in it.
    How can I configure the 3rd such row selected by program.

    Here is the snippet of code I use to get the next line

    RowKeySet rowKeySet = table.getSelectedRowKeys ();
    rowKeySet.clear ();
    CollectionModel cm = (CollectionModel) table.getValue ();
    rowData = (JUCtrlHierNodeBinding) cm.getRowData (index); index is the index of the line that I want to put the choice in the table
    rowkeyset. Add (Collections.singletonList (rowData.getRowKey ()));
    AdfUtil.addPartialTarget ("table_id");

    But none of the line is coming under the selected name in the user interface

    You must inform the iterator binding on the selected line, something like:

    Key k = (Key) l.get (0);
    DCIteratorBinding iter is getDCBindingContainer .findIteratorBinding ("DepartmentsView1Iterator");.
    iter.setCurrentRowWithKey (k.toStringFormat (true));

  • Jdev ADF 11G: selection of multiple rows in a table does not work

    Hello

    I'm having a problem to select several lines in a table ADF using Jdev 11 G.

    A table of the ADF fell on the JSP and "Line Selection" is checked, when asked. In properties, change "RowSelection" "multiple". When running, the table upwards without that user can check for lines that they want to select the first column. A row can be selected by clicking anywhere on this line. Even with the 'Control' key is pressed, it does not allow the user to select multiple lines.

    Y at - it something wrong this function or have I missed something? Help, please.

    Thank you very much

    Annie

    Try this. delete this table. Drag 'n drop it again. Just change rowSelection "multiple" to "single". Run the page and see. in this way, you know what was wrong if it works?

  • AF: displays do not all rows in the table

    Hi all

    I have an af table in my jsff and it is bound to a display object. When I run the page locally in my jdev the table af shows all lines present in the ViewObject. But when I deploy the application in our SIT weblogic break page maximum of 25 lines shows if VO has more than 25 lines.

    I put the size of the VO - 1 range. The size of range iterator is empty. I'm naïve why he works in local jdev and does not not in SIT.

    A level of the application or the server parameter influences the number of lines to display in the table.

    Thank you

    Champion

    If it worked before, something had changed on the server. Have you asked your admins if they changed something and if so what?

    They have applied a patch.

    Timo

Maybe you are looking for

  • Diagnostics of Office 2007

    I was not able to run Office 2007 on my new laptop Windows 7 Diagnostics.  It says that I don't have sufficient permissions to run it.  Even when I go to the OFFDIAG file. EXE file and try to run it as administrator, it still gives me a permissions p

  • Satellite L500 - 19 X - no wireless network card

    Laptop says can only connect to the internet with an ethernet cable (how I'm connected now). After looking at various forums online, I tried everything that is said, like install the driver LAN wireless, but nothing seems to work. The only thing in t

  • Crack/tear on a ThinkPad L440

    Dear community of Thinkpad I have something strange with my ThinkPad L440. During the closure of the screen, the left hinge did a crack/tear in the plastic cover at the back, near the air inlet and the port of the charger. Does anyone have the same p

  • HP6515 Photo tray

    Can I remove the constantly and always on HP 6515 photo tray not printing?  If so, how?

  • All those who me e-mails receives an automated message and I want to cancel that. Thank you

    When I first connected to the Microsoft mail, I put an automatic message on my e-mail address "Please be patient, I have a new computer and I am just learning.  What I want to know is how to get rid of stupidity. My family of regular e-mail is gettin