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

Tags: Java

Similar Questions

  • 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-

  • Script to remove all rows from a table except the first

    Please see the screenshots for the question/radio button I'm scripting.  If 'No' is clicked, I want to delete all lines except the first.  Therefore, if the first user clicks Yes, adds a bunch of lines and then click on no, I want all the extra lines should be deleted.  I use the script below, but it removes only half of the lines at a time.  I have to click No. 2 - 3 times to remove all the lines.  Appreciate any help!

    // remove extra rows that may have been added
    var rowCount = Page2.UserList.Table1._RowUserName.count;
    for (var i=0; i<rowCount; i++) {
      Page2.UserList.Table1._RowUserName.removeInstance(i);
    }
    
    

    LCD1.png

    lCD2.png

    Hello

    You can directly use the method setInstances of the instanceManager as follows:

    Page2.userlist.Table1._RowUsername.setInstances (1);

    I hope this will help you!

  • Do scroll off the table on the ADF

    Hi all

    I have a table of the ADF in the title of the Collection of panels. For this table and Panel al. I gave height/width attributes that style inline. When I rearrange the columns using replenishment collection panels feature a horizontal scroll bar is on my page. I don't know why this is happening Infact when loading my page there is no such scroll bar on my page. I tried to use styleClass = "AFStretchWidth" but nothing fruitful happened.

    Help, please.

    Hi Avi,

    How is the property of the respective column to false noWrap set.
    Here is my code for your reference.

            
    

    PS: It works for me :)

  • Publish all by accessing the data in the row selected in the table of the ADF...

    Hello

    I try to get the data of the selected line in the bean on the change of SelectOneChoice in a column of table of the ADF.

    There are two definitions of node in the iterator. When I try to access the data in the row. I see that the first definition of node data.
    How to access the definition data another node?

    I'm trying to access the "sponsorId" of the iterator. I use the code below. But his return null pointer exception.

    The code I use to access the data in the row:

    DCBindingContainer links =
    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCIteratorBinding = dcItteratorBindings
    bindings.findIteratorBinding ("sponsorIterator");
    ViewObject voTableData = dcItteratorBindings.getViewObject ();
    Line rowSelected = voTableData.getCurrentRow ();
    System.out.println (":" + rowSelected.getAttribute ("sponsorId")); I am able to see the data correctly for sponsorCodeDesc, sponsorPercentage, sponsorStatusDesc

    This is the iterator used for the table (page def):

    < Tree IterBinding = "sponsorIterator" id = "sponsor1" >
    < nodeDefinition DefName = "org.ieee.internal.ws.proxy.conf.types.ConferenceType.Sponsors.Sponsor"
    Name = "sponsor10" >
    < AttrNames >
    < item Value = "sponsorCodeDesc" / >
    < item Value = "sponsorPercentage" / >
    < item Value = lie "sponsorStatusDesc" = "sponsorStatusDesc" / >
    < / AttrNames >
    < accessors >
    < item Value = "sponsorDetails" / >
    < / accessors >
    < / nodeDefinition >
    < nodeDefinition DefName = "org.ieee.internal.ws.proxy.conf.types.SponsorType"
    Name = "sponsor11" >
    < AttrNames >
    < item Value = "sponsorId" / >
    < item Value = "sponsorName" / >
    < item Value = "isIEEE" / >
    < item Value = "isNonProfit" / >
    < item Value = "sponsorAcronym" / >
    < item Value = "sponsorDesc" / >
    < item Value = "sponsorEmail" / >
    < item Value = "sponsorComment" / >
    < item Value = "sponsorTypeId" / >
    < item Value = "sponsorTypeDesc" / >
    < item Value = "sponsorActive" / >
    < item Value = "societyNumber" / >
    < item Value = "businessUnit" / >
    < item Value = "createdBy" / >
    < item Value = "updatedBy" / >
    < / AttrNames >
    < / nodeDefinition >
    < / tree >

    you have not yet a selectionlistener linked to the table... to make the currentrow as the selectedRow...
    Can u please add the selectedRowKeys and the selectionlistener in the table as

    selectedRowKeys = "#{bindings.sponsor1.collectionModel.selectedRow} '"
    selectionListener = "#{bindings.sponsor1.collectionModel.makeCurrent} '"

  • Deletion of rows in a table while the filter condition is in another table

    Hi all

    I am facing a problem of deletion of a row in a table where the condition is in the other table. To ealaborate the scenario further Let's say I have two tables T1 (the transactions table) and T2 (Master Table). I want to delete a record in the table T1 by checking conditions lies in table T2.
    I tried with the query below, but this request deletion of records in the table two.

    DELETE FROM (SELECT * high INNER JOIN T2 on T1 page TP)
    THE top. TID = TP. TID
    WHERE at the top. DEAL_SITE_ID = inputparameter1
    AND (TP. SEGMENT <>inputparameter2 OR tp.segment is not null));

    Here the record is deleted in the two tables, but I don't want to delete the data in my table master i.e table T2.

    Any help would be much appreciated. Thanks in advance.

    Kind regards
    Delphine
    SQL> select *
      2   from the_table;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    AA         b
    DD         b
    
    SQL> select *
      2   from the_table_2;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    
    SQL>  delete from
      2  (
      3  select *
      4  from the_table  t1 inner join the_table_2 t2
      5  on  t1.x = t2.x
      6  and t1.y = t2.y);
    
    3 rows deleted.
    
    SQL> select *
      2   from the_table;
    
    X          Y
    ---------- ----------
    AA         b
    DD         b
    
    SQL> select *
      2   from the_table_2;
    
    X          Y
    ---------- ----------
    AA         a
    BB         a
    CC         a
    
  • I have a table of the adf, I added a column that contains a button that I created, when I click it must remove this row in the table, but it is not, please help

    I have a table of the adf, I added a column that contains a button that I created, when I click it must remove this row in the table, but it is not, please help

    I don't understand. You use vo and eo for you to use business components.

    Again, this kind of code call in trouble.

    You must post the changes to make them visible to the eo find vo. You must then run the query for the changes in the business layer strips then you must update the iterator he table is based on.

    In your code I see that happen, hooch maybe because it is more often than not formatted and undocumented.

    My advice is to do a small test case that you can manage with easy sql. Once you get it to run transfer you the results to the actual application.

    Timo

  • Refresh the one row in the Table of the ADF

    Hi all

    I have a webcenter application where the ADF Applications has been deployed. Now the data arrives on Tables in the ADF for a webservice. In this particular table, I need to update the single line (as selected by the user to change) or to a particular area with the updated values and need to validate and create a message box saying about errors if validation does not.


    Please think!

    Hello

    If "update the value" means that the value has been changed on the intermediate layer (not the client browser) then the update requires the table to be partially updated. If the user changes a line in this line a dependent fields, then it is possible partially updating the column. Note that ADF Faces tables refresh only a cell

    Frank

  • How to get the values of the table of the ADF to bean class?

    Hi all

    My 11.1.1.6 Jdev

    Here I do not use BC ADF in my project.  I'll put values in the ADF table with bean.

    In the table, I put a checkbox. When I selected (Checkbox) a few rows in table and submit. In the submit method, I want to get all the values of line checkbox selected in my bean class.

    How can I get the values. ???

    Here my table UI code

    < af:table var = "row" rowBandingInterval = "0" id = "t1" value = "#{pageFlowScope.BinderSolutionsBean.uiBinderProperties} '"

    styleClass = "AFStretchWidth" emptyText = "no record found".

    Binding = "#{pageFlowScope.BinderSolutionsBean.binderTree}" >

    < af:column sortable = "false" headerText = "Script ID" id = 'c4' >

    < af:panelGroupLayout id = "pgl4" >

    < af:selectBooleanCheckbox id = 'sbc1' > < / af:selectBooleanCheckbox >

    < af:spacer width = "5" / >

    < af:outputText value = "#{row.scenarioId}" id = "ot5" / > "

    < / af:panelGroupLayout >

    < / af:column >

    < af:column sortable = "false" headerText = "Quote ID" id = "c1" >

    < af:outputText value = "#{row.quoteId}" id = "ot4" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "NASP ID" id = "c2" >

    < af:outputText value = "#{row.naspId}" id = "ot2" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "GCH ID" id = 'c3' >

    < af:outputText value = "#{row.gchId}" id = "ot3" / > "

    < / af:column >

    < af:column id = "c6" headerText = "Term" >

    < af:outputText value = "#{row.term}" id = "ot9" / > "

    < / af:column >

    < af:column sortable = "false" headerText = "Status" id = "c5" >

    < af:outputText value = "#{row.status}" id = "ot6" / > "

    < / af:column >

    < / af:table >

    follow some above recommendation such as the creation of additional attribute. You will also need the key in your collection, while making the data for your chart.

    You must write a custom selectionListener. On valueChangeEvent of box, get the key of a line and add the line at the bean.

    Maybe it's little help for you

    https://tompeez.WordPress.com/2012/01/22/jdev-custom-SelectionListener-for-viewobjects-in-rangepaging-mode/

    How to get the selected row in a table no-bind ADF

  • How to hide the column in a table in the adf.

    I created the table of the ADF and surround it in the collection of panels, the data in the table from the bean to support variable. Depending on the State, there are a few columns that must hide with the user. I used visible = "false", where the false value will come from backing bean. However the user to the table always have the ability to display the column. Is there any one to hide the column with the user at all times. Fixing the code example:

    < af:column sortable = "false" headerText = "column1" id = "c13" visible = "false" >

    "" < af:outputText value = "{row.columns1} ' id ="ot13"/ >

    < / af:column >

    Hello

    Use the rendered property?

    Concerning

  • How to set the order in the table in the ADF for a transitional attribute in the default sort t

    Guys,

    I have a VO with 2 columns, the column is transitional attribute.  In my jsff page, I got an af:table that displays the transition attribute.

    When the page is loaded for the first time, by default, transitional attribute values should be sorted in ascending order. Currently, the displayed values are not sorted. I need to click the sort button to sort the values. I need to change this behavior to sort automatically when the page is displayed for the first time.

    Question: How can I set the command to the table in the ADF for a transitional attribute of default sort?

    Note: I have to pragmatically, I can't use order by clause in my VO for the transitional attribute.

    Help, please.

    Thank you

    Rambaud

    Hi Rambaud,

    You can do the sorting "in memory".

    You can implement it like this:

    Get the VO and make sure that all required lines are extracted from the DB

    ....

    Sort the rows by transient attribute

    myVO.setSortBy ("TransientAttribute");

    read the current query mode

    int oldQueryMode = myVO.getQueryMode ();

    to sort in memory

    myVO.setQueryMode (ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);

    myVO.executeQuery ();

    redefine the query mode on original value (only needed if you want to be able to get new lines of the DB)

    deadlineVO.setQueryMode (oldQueryMode);

    I hope this helps.

    Kind regards

    Linda

  • Editable fields in the table to the ADF when you make a CreateInsert

    After trying a CreateInsert operation for a table of the ADF, the new line is created, but the fields are not editable. Any reason, why this could happen?

    This is the jsp button and table code:

    < af:commandToolbarButton actionListener = "#{bindings." CreateInsert.execute}.
    Text = "CreateInsert."
    ID = "ctb1".
    partialTriggers = "table1" / >


    < af:table value = "#{bindings." DeliverableTblVO2.collectionModel}.
    var = "row".
    lines = ' #{bindings. " DeliverableTblVO2.rangeSize}.
    emptyText = "#{bindings." DeliverableTblVO2.viewable? "{'No data to display.': 'Access Denied.'}".
    fetchSize = "#{bindings." DeliverableTblVO2.rangeSize}.
    rowBandingInterval = '0 '.
    filterModel = "#{bindings." DeliverableTblVO2Query.queryDescriptor}.
    queryListener = ' #{bindings. " DeliverableTblVO2Query.processQuery}.
    filterVisible = "true" varStatus = "vs."
    rowSelection = "single" id = "table1" partialTriggers =": ctb1" > "

    in the original version, all attributes should be updated to "always."

  • When possible in Oracle Forms to insert a second line based on 1st row, so why not in the ADF?

    Mr President

    When possible in Oracle Forms to insert a second line based on 1st row, so why not in the ADF?

    The user just enter data in the Module of sales in one line of a Bill as below

    and it is displayed in two rows in financial Module.like below how to proceed in the ADF.

    You can see that invoice line contains the sales tax and the gross sales amounts, then it is posted to the financial Module above two lines.

    How to make ADF

    Respect of

    What I realized, this is:

    -You have a table in you screen.

    -You call CreateInsert 2 times to create 2 rows at the same time.

    -You will enter value in a specific column (c1) line1

    Looking for the value that you entered in row1 can be completely copied in the same column (c1), but in line2. is this correct?

    If so try to do the following:

    1. in the table inputText (c1) column set autoSubmit = true and setValueChangeListener to a method in backbean

    
           
    
    

    2. in the inputTextValueChangeListener method to write this code

      public void inputTextValueChangeListener(ValueChangeEvent valueChangeEvent)
      {
        DCIteratorBinding tableIter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("tableIteratorName");// write table iterator name from pageDef.
        for (int i = 0; i < tableIter.getViewObject().getEstimatedRowCount(); i++)
        {
          ViewRowImpl myRow = (ViewRowImpl) tableIter.getRowAtRangeIndex(i);
          EntityImpl entityImpl = myRow.getEntity(0);
          if (EntityImpl.STATUS_NEW == entityImpl.getEntityState())
          {
            System.out.println("New row found");
            myRow.setAttribute("AttributeName", valueChangeEvent.getNewValue());// write attribute name
          }
        }
      }
    

    3 - Add inputText id in the partialTrigger table

    
    

    4 - pageDef. Set of table iterator rangeSize = "-1".

  • Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    Is it possible to create a shuttle component in Oracle ADF, where the available and selected lists are tables of the adf?



    I did a POC sample on it. I can share with you. I can't put in my dropbox because dropbox is blocked in my network. Share your email. I'll send the POC through

  • Best way to apply the Format mask for the fields in a Table of the ADF

    Hi all

    12.1.3 JDev

    I would like to introduce the price data, quantity etc. fields of the ADF Table of the user interface in a specific format.

    These formats need to be dynamic, because they change according to the locale selected and sometimes they differ in the same locale.

    I tried approach converter custom but not satisfied because it is called several times when it is used in a table of the ADF and when asked that told me that this is the behavior.

    Custom converter of an attribute in a table called several times

    So, please suggest a better way to apply the format mask (which has min & max fractions, grouping, rounding) to the fields in the Table of the ADF.

    Please let me know if you need more information.

    Thank you

    B S Bilodeau.

    The second question, which I've mentioned here is the converter is called several times for each click on the table.

    This isn't a problem, this is the expected behavior (and you can't avoid it).

    Dario

Maybe you are looking for

  • Satellite L750 - 04K starts

    My laptop was working fine and I left it for 30 minutes. It entered into mode 'sleep' as usual but this time I couldn't get out of fashion 'sleep', so I tried to take the battery out and as a result of other measures to try to get it working again. N

  • Cannot enter BIOS - Satellite-P50t-A-119

    Cannot get into the BIOS. F2 works Océ try 20 times. Same problem with the F8 key. I tried 30 times, it worked only once. Laptop is brand new.Is there a stable way to get into the Bios?Is there a stable way to use the F8 key. I never had problems lik

  • Measurement &amp; Automation Explorer crashes while loading

    Hello I recently bought a DAQ (PCI-6239) card. I installed the NOR-DAQmx driver that came with it and follow the installation steps. When I was at the time of the opening of the Explorer Measurement & Automation to detect my Board, it crashed during

  • HP Pavilion Elite HPE - 337c: right click on the taskbar for programs no longer works.

    1. product name and number: HP Pavilion Elite HPE - 337C 2. operating system: Microsoft Windows 7 Edition Home Premium (64-bit); Service Pack 1; Build number 7601; Version of DirectX 11. 3. error message: None; wish that it is. 4. all changes made to

  • Create a clipping with a background color mask?

    I recently made the switch using CorelDRAW for my vector art to mainly using Adobe Illustrator. I know of course that there will be some features that are exclusive to Illustrator and CorelDRAW exclusivity, but I've done the research on trying to fin