Row selection in adf table issue after commit or rollback

Using jdev 11g (11.1.1.62)
I have a adf table with multi select enabled. There is a child table bounded at BC4J level via a VL
On the rowSelectionListener I attached a bean method. This bean method bascially finds the selected row from UI and then based on it query the child vo again and then finally refreshes the child table.
This works fine as expected.
However, what happens is when the Cancel button is called on UI which is bound to a rollback action in the AMImpl then the UI refreshes. And the master table still shows the previously selected row but the child VO shows the rows of the first master VO row rather the selected one.
How to fix this? Further as old row is already selected in the master table so reclicking on the same row does nothing,

just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
DCBindingContainer bc =
(DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
DCIteratorBinding profItr =
bc.findIteratorBinding("ProfileSearchInstIterator");
Row cRow = profItr.getRowAtRangeIndex(0);
if(cRow != null){
System.out.println("Current row is not null so fixed ");
profItr.setCurrentRowIndexInRange(0);
RowKeySetImpl rks = new RowKeySetImpl();
ArrayList keyList = new ArrayList();
keyList.add(cRow.getKey());
rks.add(keyList);
profileTable.setSelectedRowKeys(rks);
AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
}

Similar Messages

  • Multiple row selection in ADF Table using addition column with checkbox

    I am using ADF table(Jdeveloper11g) and i want to selecte multiple rows it may be more than one OR all rows.
    For that i added one Column to the table with Header Delete and checkbox
    <af:table....
    <af:column sortProperty="Delete" headerText="Delete" width="100"
    sortable="false">
    <af:selectBooleanCheckbox label="#{row.favoriteId}"
    valueChangeListener="#{Mybean.onCheck}"
    id="checkbox" autoSubmit="true">
    </af:selectBooleanCheckbox>
    </af:column>
    </af:table>
    backing bean:Here i added code to get Value of one column with id favoriteId and use an arrayList(listForDelete) to monitor the state of the checkboxes
    public void onCheck(ValueChangeEvent valueChangeEvent) {
    BindingContainer bindings = getBindings();
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)bindings.get("getUserFavoritesByUserIDIterator");
    if (iterBind != null && iterBind.getCurrentRow() != null) {
    RichSelectBooleanCheckbox ch = (RichSelectBooleanCheckbox)valueChangeEvent.getSource();
    if (!ch.isSelected()) {
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.add(issueId);
    else
    Long issueId = (Long)iterBind.getCurrentRow().getAttribute("favoriteId");
    listForDelete.remove(issueId);
    Problem is that when i select single row checkBox, onCheck() method of backing bean gets called multiple times(equals to the number of rows)
    I think this is beacuse of <af:selectBooleanCheckbox id is same that is "checkbox" but i am not sure.Even i tried to assign some unique id but no any success in assigning Id with value Expression.
    I also find related post
    Re: ADF Table Multiple row selection by Managed Bean
    but that is related to Select All rows or Deselect all rows from table.
    From the simillar post i follow the steps given by Frank.but problem with below step
    ->have an af:clientAttribute assigned to the checkbox with the following EL #{row.key} ,here I added <af:clientAttribute name="#{row.key}"></af:clientAttribute> and i am getting error
    Error(64,37):  Static attribute must be a String literal, its illegal to specify an expression.
    Please let me know if any one had already implemented same test case.
    Thanks for all help
    Jaydeep
    Edited by: JaydeepJ on Aug 7, 2009 4:42 AM

    just to update after the rollback is called in the cancel button i wrote following code which does not change the row focus to the first row
    DCBindingContainer bc =
    (DCBindingContainer)BindingUtils.getBindingContext().getCurrentBindingsEntry();
    DCIteratorBinding profItr =
    bc.findIteratorBinding("ProfileSearchInstIterator");
    Row cRow = profItr.getRowAtRangeIndex(0);
    if(cRow != null){
    System.out.println("Current row is not null so fixed ");
    profItr.setCurrentRowIndexInRange(0);
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(cRow.getKey());
    rks.add(keyList);
    profileTable.setSelectedRowKeys(rks);
    AdfFacesContext.getCurrentInstance().addPartialTarget(profileTable);
    }

  • How to perform Autosubmit  on Row selection in ADF Table

    Hi,
    I am using ADF Table , in which I want to enable AutoSubmit for the Table Row Selection.
    I want to enable some button on my screen when a row is selected in the table.
    I want to achive this with out using SelectionListener .. any iputs for this?
    Thanks,
    Swathi

    Hi Timo,
    here is my code : this code is to implement Custom shuttle .. where I am using two ADF Tables to display the Available list and Selected List ..and using navigation buttons to move the selected item.When I select a Row in the left table .. I want to enable the 'add' button.
    <af:table value="#{pageFlowScope.ebean.al}" var="row"
                      rowBandingInterval="0" varStatus="vs" id="t2"
                      rowSelection="single"
                      binding="#{pageFlowScope.ebean.availableList}"
                      partialTriggers="::cb2 ::cbAdd ::cbRemove"
                      summary="#{backingBeanScope.BundleBean.MEASURES}"
                       selectionListener="#{pageFlowScope.ebean.rowSelection}"
                      inlineStyle="height:200.0px;" horizontalGridVisible="false">
              <af:column sortProperty="Name" sortable="false"
                         headerText="Name"
                         id="c3" width="300" rowHeader="unstyled">
                <af:panelGroupLayout id="pgl6">
                  <af:image source="/images/file_ena.png" id="i2"
                            shortDesc="#{backingBeanScope.BundleBean.FILE_ENA}"/>
                  <af:outputText value="#{row.label}" id="ot2"/>
                </af:panelGroupLayout>
              </af:column>
            </af:table>
          </af:panelGroupLayout>
          <af:panelGroupLayout id="pgl3" layout="vertical"
                               inlineStyle="width:39px;">
            <af:commandButton id="cbAdd"
                              actionListener="#{pageFlowScope.ebean.onAdd}"
                              partialSubmit="true"
                              disabled="#{pageFlowScope.ebean.dataToAdd==null}"
                              icon="/images/shuttleright_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.ADD}"
                              partialTriggers="t2"/>
            <af:spacer width="10" height="10" id="s1"/>
            <af:commandButton id="cbAddAll" action="addAll"
                              actionListener="#{pageFlowScope.ebean.onAddAll}"
                              disabled="#{pageFlowScope.ebean.availableListSize==0}"
                              icon="/images/shuttlerightall_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.ADD_ALL}"
                              partialTriggers="cbRemove"/>
            <af:spacer width="10" height="10" id="s2"/>  
            <af:commandButton id="cbRemove" partialSubmit="true"
                              actionListener="#{pageFlowScope.ebean.onRemove}"
                              icon="/images/shuttleleft_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.REMOVE}"
                              partialTriggers="t3"
                              disabled="#{ pageFlowScope.ebean.dataToRemove==null}"/>
            <af:spacer width="10" height="10" id="s4"/>
            <af:commandButton id="cbRemoveAll"
                              actionListener="#{pageFlowScope.ebean.onRemoveAll}"                         
                              icon="/images/shuttleleftall_ena.png"
                              shortDesc="#{backingBeanScope.BundleBean.REMOVE_ALL}"
                              disabled="#{pageFlowScope.ebean.listSize==0}"
                              partialTriggers="cbAdd "/>
          </af:panelGroupLayout>
          <af:panelGroupLayout id="pgl5">
            <af:outputText value="#{backingBeanScope.BundleBean.SELECTED_MEASURES}#{pageFlowScope.ebean.listSize}#{backingBeanScope.BundleBean.CB}"
                           id="ot3"
                           inlineStyle="font-weight:bold; font-size:small;"
                           partialTriggers="cbAdd cbRemove"/>
            <af:table value="#{pageFlowScope.ebean.sl}" var="row"
                      rowBandingInterval="0" varStatus="vs" id="t3"
                      rowSelection="single"
                      binding="#{pageFlowScope.ebean.list}"
                      partialTriggers="::cbAdd ::cbAddAll ::cbRemove ::cbRemoveAll"
                      summary="#{backingBeanScope.BundleBean.MEASURES}"
                      selectionListener="#{pageFlowScope.ebean.rowSelection}"
                       inlineStyle="height:200.0px;" horizontalGridVisible="false">
              <af:column sortProperty="Name" sortable="false"
                         headerText="Name"
                         id="c5" width="300" rowHeader="unstyled">
                <af:panelGroupLayout id="pgl9">
                  <af:image source="/images/file_ena.png" id="i3"
                            shortDesc="#{backingBeanScope.BundleBean.FILE_ENA}"/>
                  <af:outputText value="#{row.label}" id="ot1"/>
                </af:panelGroupLayout>
              </af:column>
            </af:table>
        </af:panelGroupLayout>
    public void rowSelection(SelectionEvent selectionEvent) {
            RichTable at = (RichTable)selectionEvent.getComponent();
            if(at.getId().equals("t2"))
                getDataToAdd();
            else          
               getDataToRemove();       
        public Object getDataToAdd(){
            if(availableList!=null)
         return availableList.getComponent().getSelectedRowData();
            return null;
        public Object getDataToRemove() {       
            if (list != null && list.getComponent().getSelectedRowKeys()!=null)
                    return list.getComponent().getSelectedRowData();
            return null;
        }Thanks,
    Swathi

  • How to dynamically display the data from a table base on row selection of another table in ADF

    Hi ,
    I have a requirement in ADF. I need to change the data of a table  based on row selection of another Table . Both the table have a Parent Child relationship between them. They have a common attribute say department_id.
                                                                                         For this I created bind variable in view object of employees table and wrote a where clause in the sql query using that bind variable. Then I created method for selection listener of department Table in java bean.
    My method is following
        public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    It is printing the selected value of department id from department table in the log. But it is not able to pass the value to employees view. It is showing the following error in the log
    "Definition DepartmentId of type Variable is not found in EmployeesView1."
    I will be very thankful if someone helps me to solve this errror or is there any other way to achieve the same requirement.
    Thanks
    Nilesh

    Note quite sure why you simply wont create a viewlink for the viewobject the tables are based on..
    The viewlink attribute will be based on the departmentId and it's a simple master detail relationship which automatically uses ppr.
    However, if both tables are on the same page; using your hack about;
    On the underlying viewobject, define a viewcriteria e.g. "listById" and set your bind variable here.
    I would bind table two to a RichTable component:
    RichTable t2;
    public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
                   refreshTable2(pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    private void refreshTable2(Number pallet){
    RichTable x=getT2();
    CollectionModel cm=(CollectionModel)x.getValue();
    JUCtrlHierBinding jcb=(JUCtrlHierBinding)cm.getWrappedData();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(jcb.getName()+"Iterator");
    ViewObject vo =dciter.getViewObject();
    ViewCriteriaManager vcm=vo.getViewCriteriaManager();
    ViewCriteria vc=vcm.getViewCriteria("listById");
    vo.applyViewCriteria(vc);
    vo.setNamedWhereClauseParam("DepartmentId",pallet);
    vo.executeQuery();
    AdfFacesContext.getCurrentInstance().addPartialTarget(getT2());

  • Selected rows appear in random order when selected from ADF Table

    Hi All,
    I am working in ADF 10.1.3
    I have a ADF Table with a multi select option associated with a DataBean, My requirement is when I select multiple rows from the table and click on some button to goto next page, the selected rows are not getting populated as per the selection order.
    Example: If I select 1st,3rd,5th,7th,9th rows from the ADF Table then in the next page I see the results as 3rd,1st,5th,9th,7th. - Randomly it is getting displayed.
    I am using the following code to get the records from Multi select ADF Table.
    I am adding the selected records to a List.
    selectedRowSet = this.getTable1().getSelectionState().getKeySet();
    rowSetIter = selectedRowSet.iterator();
    if (selectedRowSet.size() > 0)
    Integer index = Integer.parseInt((String) rowSetIter.next());
    Object rowData = this.getTable1().getRowData(index.intValue());
    The order is getting jumbled when I see the final list.
    Pls help me in this.
    Thanks

    Hi Frank,
    Thanks for the update.
    We are using 10.1.3.3 and already our application in QA Testing. User need this to be fixed. Is there any work around for this problem?
    Thanks
    JP

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Temparally remove rows from a ADF table by action event of a jsf page.

    Hello Developers,
    I needed to temporally remove rows of a ADF table when execute action event of corresponding page.
    So in this case my task can describe by following steps,
    (1). I created a ADF table using <af:table> on a jsf page.
    (2). The data populated using a VO.
    (3). Several radio buttons added to the page for temporally remove rows from the table.
    This means one radio button check, it responsible to temporally remove rows which contain empty cell values of a identified column.
    If I check another radio button it should temporally remove identified data included rows but above removed (empty cell included rows) rows should appear in this event
    My ultimate target is temporally remove rows of a table & re call again removed rows another event without again & again query from BC.
    Pleas advice me to archive this task very sealy?
    (Are there have a way to do this using EL or coding in Manage bean ?)
    Thanks in advance..!

    Hi,
    the DCIterator gives you an option to iterate over the fetched rows (the ones you see in the table). You can try call removeAndRetain() on these rows. This will not remove or delete rows but allows you to insert these rows back to the collection.
    JavaDocs:
    * Removes the row from the collection and then retain it for insertion
    * into another location.
    * <p>
    * This method differs from <code>{@link #remove()}</code> in that
    * it just removes the row from the collection. It does not
    * remove the underlying Entity row(s) or database row(s).
    * <p>
    * This method also differs from <code>{@link #removeFromCollection()}</code>
    * in that after the row is removed from the collection, it can be inserted
    * back into the collection at another location.
    void removeAndRetain();
    Frank

  • How to disable first row selection in a table

    Hi,
    I have three tables which have master child relationship. I need to enable a button for each table based on row selection of corresponding table.But first row is being selected automatically and the buttons are enabled.
    what should i do in order to avoid first row selection in a table.I tried by removing selected Row Keys.But still i am getting the same problem.can anyone suggest on this.
    Thank You,
    Sukumar

    I know a hack but I don't recommend it, anyway here it goes:
    Remove selected Row Keys
    Change selectionListener from the default and create a custom action listener (You can call the default one inside of it) (Tip: use makeCurrent function in this PDF
    This will make sure that there is no selected row highlighted for the first time, but it actually means that the first row is selected, it's just not shown.
    This method is tested with 11.1.1.7

  • How to differentiate a row in a ADF table in Oracle 11g

    Hi
    How to differentiage the each row in a ADF table with the back ground colour? I tried with RowBandingInterval option, but it didn't work out?
    Thanks

    Hi,
    setting row banding to 1 (the default) works for me on FF and IE 7
    Frank

  • Reg Row Selection in a Table UI Element

    Hi All,
    Can anyone help me in writing code to select a row from a table.
    I need to read the data from a row selected in a table and print it in the next page of my application.
    I request anyone to send me some coding line on how to select a row from a table and read data from it.
    Regards,
    Murthy.

    Hi Narayana,
    Follow the steps.
    Step1: Create a WD Component.
    Step2:  Under Component Controller create a
    i)  2  Node “EmployeeInfo” and “EmployeeRecord”  with attribute “EmployeeName” and “Position”  of cardinality 0..n for both the node and a context attribute “WindowInstance” of type “com.sap.tc.webdynpro.services.session.api.IWDWindow”
    Step3: Go to the Diagram View. Do the mapping between “EmployeeView” and “Component Controller” and between “DisplayView” and “Component Controller”
    Step4: Design 2 Views layout
    i>EmployeeView
    Layout like
    Employee Name |                                  Employee Position
    EmployeeInfo.EmployeeName| EmployeeInfo.Position
    EmployeeInfo.EmployeeName| EmployeeInfo.Position
    DisplayResultButton
    ii>DisplayView
    Layout like
    Employee Name   |                      Employee Position
    EmployeeRecord.EmployeeName |    EmployeeRecord.Position
    EmployeeRecord.EmployeeName |    EmployeeRecord.Position
    CloseWindowButton
    Step5: Create 2 Windows
    1>EmployeeWindow
    2>DisplayWindow.
    Under “EmployeeWindow” add the “EmployeeView”
    and “DisplayWindow” add the “DisplayView”
    Step5: Associate action “DisplayResult” with the “DisplayResultButton” and use this code inside the Implementation of “EmployeeView”
    public void wdDoInit()
        //@@begin wdDoInit()
    //initialize nodes
    wdContext.nodeEmployeeInfo().addElement(wdContext.createEmployeeInfoElement());
    wdContext.nodeEmployeeRecord ().addElement(wdContext.createEmployeeRecordElement());
        //@@end
    public void onActionDisplayResult(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionDisplayResult(ServerEvent)
    try
    IPrivateDisplayView.IEmployeeRecordElement empRec =
    wdContext.createEmployeeRecordElement();
    int n = wdContext.nodeEmployeeInfo().size();
    int leadSelected = wdContext.nodeEmployeeInfo().getLeadSelection();
    // loop backwards to avoid index troubles     
    for (int i = 0; i < n ; i++) {
    if (wdContext.nodeEmployeeInfo().isMultiSelected(i) || leadSelected == i) {
    empRec.setEmployeeName(wdContext.nodeEmployeeInfo().getElementAt(i).getAttributeValue("EmployeeName"));
    empRec.setPosition(wdContext.nodeEmployeeInfo().getElementAt(i).getAttributeValue("Position"));
    wdContext.nodeEmployeeRecord().addElement(empRec);
    catch(Exception e)
    e.printStackTrace();
    IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
         "DisplayWindow");
    //        create the Window
         IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
         window.setWindowPosition(WDWindowPos.CENTER);
         window.setTitle("WindowTitle");
         window.setWindowSize(200,200);
    //        Save WindowInstance in Context
         wdContext.currentContextElement().setWindowInstance(window);
    //        and show the window
         window.show();
         //wdThis.wdFirePlugInDisplay();
        //@@end
    Step6: Associate action “CloseWindow” with the “CloseWindowButton
    ” and use this code inside implementation of  “DisplayView”
      public void onActionCloseWindow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCloseWindow(ServerEvent)
       IWDWindow window = wdContext.currentContextElement().getWindowInstance();
       window.destroyInstance();
        //@@end
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f699f90-0201-0010-14a4-8950177281ed">Developing with Tables in WebDynpro</a>
    Regards,
    Mithu

  • Reg Row Selection in a Table

    Hi All,
    I am facing a problem with row selection in a table. When I navigate from one screen to another in my application, the selected rows in the previous screen should be populated in the table in the next screen.
    If I have to use checkboxes inside the table for multiple row selection, how could I populate the table in the next screen with all the selected rows of the table from the previous screen.
    Also, is it possible to select multiple rows in a table without using checkboxes, and by selecting the "selection mode" of table as "multi", so that initially when the page is loaded no record (row) should be selected automatically.
    Please help me regarding this.
    Regards,
    Murthy.

    Hi,
    As Armin suggested you can use the inbuilt multiselection property of the table.
    For populating the selected values in a table in second view
    First view Context structure
    -EmpDetails (Table node) (cardinality 0..n,selection 0..n,intializeleadSelection - false)
    ---EmpID (table column)
    ---Name  (table column)
    Second View Context structure
    -DispalySelected (Table node)-EmpDetails (Table node) (cardinality 0..n,intializeleadSelection - false)
    --- ID(table column)
    --- Name(table column)
    create a navigation link form first view to second view
    In the InBoundPlug of second view
        wdContext.nodeDisplaySelected().invalidate();
        for(int i=0;i<wdContext.nodeEmpDetails().size();i++)
             if(wdContext.nodeEmpDetails().isMultiSelected(i))
                   IPrivateDisplayView.IDisplaySelectedElement ele = wdContext.nodeDisplaySelected().createDisplaySelectedElement();
                   wdContext.nodeDisplaySelected().addElement(ele);
                   ele.setID(wdContext.nodeEmpDetails().getEmpDetailsElementAt(i).getEmpID());
                   ele.setName(wdContext.nodeEmpDetails().getEmpDetailsElementAt(i).getName());
    <b>For multiselecting you have to use Ctrl tab</b>

  • Keep view in row selected in the table

    Hello,
    i have a webdynpro view with a table. This table has 256 records, and visibleRowCount property is set to 10 records.
    My problem is when i selected the record number 174 for example, the scroll table returns to position 1 and i can not see the record selected.
    How can i do for the scroll table keep the row selected in the table?
    Thank you

    Hi,
    Try this.
    1. create one context ctx_va_firstvisblerow.
    2.get the leadselection record and set ctx_va_firstvisblerow context.write this code in wdDoModifyView.and also following code in wdDoModifyView.
    IWDTable table = (IWDTable) view.getElement("Ur table id");
        table.setFirstVisibleRow(wdContext.currentContextElement().getCtx_va_visiblerow());
    3.Bind the ctx_va_firstvisblerow context to the table FirstVisibleRow.
    Thanks
    Abhilasha
    Edited by: Abhilasha Dahare on Sep 14, 2010 3:35 PM

  • How to set text and background color of current row in a adf table?

    Hi,
    In jdev 11.1.2.3,
    How to set text fond and background color of current row in a adf table?
    I tried to set Background color in table property, but that is not what i want.
    Thanks.

    Hi,
    We almost had the same requirement, but we just needed to color a specific column.
    Here goes the solution to that, you might do the same for your row highlighting
    Changes are required in jsff and one method to be added in backing bean
    1. JSFF :
    <af:column headerText="Amount"
                     id="c4" width="100"
                     inlineStyle="#{backingBeanScope.BackingBean.cellColor}">2. Backing Bean
    //searchResultTableVO is Table's VO
    public String getCellColor() {
          FacesContext ctx = FacesContext.getCurrentInstance();
          ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
          ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row}", FacesCtrlHierNodeBinding.class);
          FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)ve.getValue(ctx.getELContext());
          Row row = node.getRow();
        if(row.equals(searchResultTableVO.getCurrentRow())){
    //You can add your inline style for font-style too
          return "background-color:Red;";
             return null;
      }Hope this is helpful :)
    Regards,
    Neha..

  • Re: Getting the current selected Row & column in adf table

    Hi,
    Our requirement is we have to retrieve both the current row and column in adf table.
    We can retrieve the current row in the backing bean like
    ViewObject view = getViewObject();
    view.getCurrentRow();
    Is it possible to retrieve selected column id or column header text as we are getting for row?
    please give some sample.
    Thanks,
    Vijay.
    Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

    Hi John
    My exact requirement,
    1.     We have collection of records in adf table
    2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
    Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
    while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
    If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
    we are using Jdeveloper11.1.1.4.0
    Please suggest.
    Thanks,
    Vijay

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

Maybe you are looking for

  • Bookmarks Links Goes to Wrong Direction (Page)

    Hi, I just added bookmarks to pages title. by following right click on title of page Interactive-New Bookmark. I had totaly 9 pages first and I done about 7 bookmarks for pages. first all of them was fine. but after I have added 4 extra pages after l

  • IMac overheating and shutting down when running XP?

    I'm using my iMac to play games in Windows, which stresses the processor a lot-- it heats up like crazy. If it gets too hot, it either locks up or the graphics cut out altogether and I'm left with things still running and responding (I can tell from

  • Field symbols to itab

    Hi Experts, I have a requirement to transfer field symbol (defined as table) contents into my internal table in my program. The requirement is like this: Loop at xtab. CALL FUNCTION 'ARCHIVE_READ_OBJECT_BY_HANDLE'           EXPORTING             iv_h

  • White Border

    Hi, I am trying to make continuos image on the paper book cover . I have cropped the image in photoshop and pasted into the cover and flap sections - so far so good. However when I preview the book there is always a white band about 1/4 inch wide dow

  • Screen Resolution 1440 x 900

    I have a MS-6533E Motherboard (I think it is also known as 6533XG. I am using the onboard video and cannot get the resolution of 1440 x 900 to display with my acer monitor AL1916W. I have updated to latest video drivers but still no luck. Can anyone