Row selection messed up after sorting

JDev version: 11.1.1.4 (but also reproducable in 11.1.2.1)
See http://kpdwiki.be/Bart_L/tableIteratorSortSync.zip (open BO726.jws and run runThis.jspx)
Situation:
- iterator 'EmployeesIterator' which points to a view with Employees -> ChangeEventPolicy='none'
- Bindings which all point to this iterator:
- Tree binding 'Employees' used for an af:table with employees (firstname, lastname)
- Attribute bindings 'FirstName' and 'LastName' which is used in a formLayout to show the currently selected employee
- Operation Bindings to iterate through the employees (First, Previous, Next, Last)
- runThis.jspx
- formlayout with FirstName and LastName
-> partialtriggers: Next-button and table (for the rest, no partialtriggers)
- Next-button
- table with employees
Problem:
1) if you select one of the employees in the table, and sort one of the columns, the first row will be selected. This is normal behaviour
2)
a) select the first row
b) press the 'Next' button a few times. Now the selected employee in the iterator is 'X'
c) in the table, select employee 'X' by clicking on its row
d) sort one of the columns.
Result: In the iterator, the first row of the table is selected, while the table selection shows something different!
--> this is different behavior than the situation described in 1)
--> after doing something with the table (sorting, filtering, selecting rows, ...), I would expect that the selected row in the table is always the same as the selected row in the iterator.
Questions:
1) Is this a bug?
2) If yes, is this a known bug?
3) If no: am I doing something which is not allowed? Or should I do something different here?

I can reproduce the problem in 11.1.1.4.
First employee is Steven King, which is selected. I then press next a few times till the output text reads Bruce Ernst (the table selection is still on Steven King, while the iterator points to Bruce Ernst). I then click on Bruce Ernst in the table, so it is selected (iterator stays on the same record). If I then sort the table, the table selection stays on Bruce Ernst, while the output text shows the first record in the table after the sort.
We have the same issue using a non-modal popup to edit table rows (non-isolated task flow, sharing data controls & transaction). Our edit popup has navigation controls. When we scroll through records in the popup, the table selection doesnt refresh (changeEventPolicy = none). If we then select the record in the table that we scrolled to in the popup , without closing the popup, and then sort the table (with the popup still open), the selection stays on the previously selected record, whille the popup shows the first record in the table after the sort.

Similar Messages

  • Field should not display in the subtotal row in ALV report after sorting .

    we have a requirement, after sorting and subtotaling, the output in ALV is -
    vbeln        amount1  amount2  amount3
    123           11              12            13
    123           12             13             14
    123           23             25             27 
    133           11              12            13
    133           12             13             14
    133           23             25             27
    Now the customer wants the ALV outpput in this fashion -
    123           11              12            13
    123           12             13             14
                     23             25             27    --->123 (vbeln) should not come in subtotaling row
    133           11              12            13
    133           12             13             14
                      23             25             27--->133(vbeln) should not come in subtotaling row

    Hi,
    if it helps you could create a hierachy. In this way you can define the field catalog for the lines and for the subtotal columns. The only thing is that you would always show the subtotal rows.
    You have references of hierachy alvs in
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
    ALV Hierarchy
    alv hierarchy
    In this case it also sorts
    Sorting for ALV hierarchy
    I hope it helps.
    Edited by: Oscar Pecharroman on Aug 2, 2010 1:13 PM

  • Row selection in JXTreeTable after teeTablemodel:fireTreeStructureChanged()

    I have a problem in selecting a specific row (or tree path) after the use of the method
    myJXTreeTable.treeTableModel.getTreeModelSupport().fireTreeStructureChanged();
    My code looks like the following....
    TreePath selPath = myJXTreeTable.getTreeSelectionModel().getSelectionPath();
    myJXTreeTable.getTreeTableModel().getTreeModelSupport().fireTreeStructureChanged(rootPath);
    myJXTreeTable.getTreeSelectionModel().setSelectionPath(selPath);
    The value of myJXTreeTable.getTreeSelectionModel().getSelectionPath() seems to be correct, though the selection in the tree table is not visible.
    Any help in this regard will be appreciated.
    Thank you
    Bab

    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);
    }

  • Row doesn't get selected after sorting

    I have a table bond to a javabean data control. I have enabled multi row selection. I get some rows on the table and then I select one of those rows, after that I use the value of the selected row for some operations.
    I have 3 columns, first name, lastname , email. The first 2 are sortable. If I click on the header of firstname, the information gets sorted ok (asc / desc). The problem is that after sorting, I can NOT select any rows. When I click on the row, it doesn't get highlighted, and If I try to use the value of the selected row I get a null pointer exception.
    Again this is happening only after sorting. If I don't sort, it works ok.
    I'm using JDEV + ADF 11.1.1.5.
    This is my code
    <af:table value="#{bindings.User1.collectionModel}" var="row" partialTriggers="::cb1"
    rows="#{bindings.User1.rangeSize}"
    emptyText="#{bindings.User1.viewable ? identityBundle.no_data_to_display : identityBundle.access_denied}"
    fetchSize="#{bindings.User1.rangeSize}" rowBandingInterval="0"
    id="t1" rowSelection="multiple"
    selectionListener="#{AssignRolesBean.onTableSelect}"
    binding="#{AssignRolesBean.searchResultsTable}"
    columnStretching="last">
    <af:column sortProperty="firstname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.firstname.label}" id="c1"
    width="136">
    <af:outputText value="#{row.firstname}" id="ot4"/>
    </af:column>
    <af:column sortProperty="lastname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.lastname.label}" id="c2"
    width="182">
    <af:outputText value="#{row.lastname}" id="ot2"/>
    </af:column>
    <af:column sortProperty="mail" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.mail.label}" id="c4"
    width="361">
    <af:outputText value="#{row.mail}" id="ot5"/>
    </af:column>
    <af:column sortProperty="uid" sortable="false"
    headerText="#{bindings.User1.hints.uid.label}" id="c3"
    visible="false">
    <af:outputText value="#{row.uid}" id="ot3"/>
    </af:column>
    </af:table>
    I have a selection listener only, I don't have a sort listener.
    My bean;
    AssignRolesBean
    public void onTableSelect(SelectionEvent selectionEvent) {
    GenericTableSelectionHandler.makeCurrent(selectionEvent);
    My makeCurrent method
    public static void makeCurrent( SelectionEvent selectionEvent){
    RichTable _table = (RichTable) selectionEvent.getSource();
    CollectionModel tableModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
    Object selectedRowData = table.getSelectedRowData();
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey( rwKey.toStringFormat(true));
    SHOULD I IMPLEMENT A SORT LISTENER FOR THIS TABLE IN ORDER TO HANDLE ROW SELECTION PROPERLY AFTER SORTING?
    Is there a guideline for handling row selection after sorting?
    Thanks

    I have a table bond to a javabean data control. I have enabled multi row selection. I get some rows on the table and then I select one of those rows, after that I use the value of the selected row for some operations.
    I have 3 columns, first name, lastname , email. The first 2 are sortable. If I click on the header of firstname, the information gets sorted ok (asc / desc). The problem is that after sorting, I can NOT select any rows. When I click on the row, it doesn't get highlighted, and If I try to use the value of the selected row I get a null pointer exception.
    Again this is happening only after sorting. If I don't sort, it works ok.
    I'm using JDEV + ADF 11.1.1.5.
    This is my code
    <af:table value="#{bindings.User1.collectionModel}" var="row" partialTriggers="::cb1"
    rows="#{bindings.User1.rangeSize}"
    emptyText="#{bindings.User1.viewable ? identityBundle.no_data_to_display : identityBundle.access_denied}"
    fetchSize="#{bindings.User1.rangeSize}" rowBandingInterval="0"
    id="t1" rowSelection="multiple"
    selectionListener="#{AssignRolesBean.onTableSelect}"
    binding="#{AssignRolesBean.searchResultsTable}"
    columnStretching="last">
    <af:column sortProperty="firstname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.firstname.label}" id="c1"
    width="136">
    <af:outputText value="#{row.firstname}" id="ot4"/>
    </af:column>
    <af:column sortProperty="lastname" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.lastname.label}" id="c2"
    width="182">
    <af:outputText value="#{row.lastname}" id="ot2"/>
    </af:column>
    <af:column sortProperty="mail" sortable="#{AssignRolesBean.columnSortable}"
    headerText="#{bindings.User1.hints.mail.label}" id="c4"
    width="361">
    <af:outputText value="#{row.mail}" id="ot5"/>
    </af:column>
    <af:column sortProperty="uid" sortable="false"
    headerText="#{bindings.User1.hints.uid.label}" id="c3"
    visible="false">
    <af:outputText value="#{row.uid}" id="ot3"/>
    </af:column>
    </af:table>
    I have a selection listener only, I don't have a sort listener.
    My bean;
    AssignRolesBean
    public void onTableSelect(SelectionEvent selectionEvent) {
    GenericTableSelectionHandler.makeCurrent(selectionEvent);
    My makeCurrent method
    public static void makeCurrent( SelectionEvent selectionEvent){
    RichTable _table = (RichTable) selectionEvent.getSource();
    CollectionModel tableModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData();
    DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding();
    Object selectedRowData = table.getSelectedRowData();
    JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
    Key rwKey = nodeBinding.getRowKey();
    tableIteratorBinding.setCurrentRowWithKey( rwKey.toStringFormat(true));
    SHOULD I IMPLEMENT A SORT LISTENER FOR THIS TABLE IN ORDER TO HANDLE ROW SELECTION PROPERLY AFTER SORTING?
    Is there a guideline for handling row selection after sorting?
    Thanks

  • Showing selected row after sorting

    I have big JTable with lots of columns. Selection of row is highlighted
    using some background color. Sorting is also provided on TableHeader.
    After selecting some row, when user does the sorting, this selected row
    goes outof visible view of table.
    My requirement is to show the same selected row again after doing sorting. I was thinking of calling method like setSelectedRow(), but
    unfortunately there is nothing like this method.
    I was also thinking of using AccessibleJTable, but couldnt go
    anywhere.
    Is there any way to do this?
    Thanks in advance.
    Anup

    I have big JTable with lots of columns. Selection of row is highlighted
    using some background color. Sorting is also provided on TableHeader.
    After selecting some row, when user does the sorting, this selected row
    goes outof visible view of table.
    My requirement is to show the same selected row again after doing sorting. I was thinking of calling method like setSelectedRow(), but
    unfortunately there is nothing like this method.
    I was also thinking of using AccessibleJTable, but couldnt go
    anywhere.
    Is there any way to do this?
    Thanks in advance.
    Anup

  • Selecting top row after sorting

    hi,
    i have a table emp, whose primary key is empid(varchar2),
    i want to sort the empid and select the top row after sorting,
    i can sort the table using "select * from emp order by empid desc,
    i can select the top row using "select * from emp where rownum=1"
    i want a combination of the 2,
    pls provide me the required query
    Thanks and Regards,
    Saurabh Jhunjhunwala

    SEELCT *
       FROM ( SELECT e.*
                               , ROWNUM  row_num
                       FROM emp e
                     ORDER BY empid desc
    WHERE row_num =  1Regards
    Arun

  • ALV - Editing a Row after Sorting  - REAL HEADACHE.....

    Hi,
    I have a ALV table with a DropDown in one of the columns. The user can enter a value in the dropdown boxes.
    Now the proble is, lets say I have SORTED the table by another column. Now the user enters a value in one of the rows of the dropdown and clicks the SAVE Button.
    How do i find out, which Row the User Has entered the value ?
    I tried using the table it_modified_cells in the event handler for ON_DATA_CHECK . However it gives wrong row indexes, that is if, the row number '10' is Row number '1', after sorting, and if this row is modified, then it_modified_cells table gives Row '1' as modified rather than Row '10'.
    So ina  nut shell, after sorting , if a row is edited, How to find out which is this row...... ?

    Nithya,
    Look at this thread of mine....
    Re: ALV - Lead Selection of Node When FILTERS ACTIVE
    I had this issue when after filtering in ALV Table, th e bound Node wtill held original records......
    So is it something likeSORTING Updates the context,,,,,FILTERING does not ?
    Thanks
    Anand

  • Sorting JTab disables row selection

    In a scroll panel I inserted a Jtable that shows view data. Sorting works by double-clicking the column header. After sorting however rows cannot be selected, sometimes the table gets reorganized again.
    How can I allow a row to be selected after sorting as described above?
    Thank you.

    This is the way the sort model was designed. I filed an enahncement request.
    Frank

  • Problem in deleting Rows of JTable after sorting it

    Hi all,
    I'm getting problems in Removing Row(s) after sorting a JTable.
    Please find the code snippets at this URL. Thanks for your time...
    http://forum.java.sun.com/thread.jsp?forum=31&thread=459736&start=15&range=15&hilite=false&q=

    Hi Abhijeet,
    I tried it the way you said using
         wdContext.nodeBirhtday_List().nodeItab().moveFirst();
         //     loop backwards to avoid index troubles
         for (int i = n - 1; i >= 0; --i)
              current_date  = wdContext.nodeBirhtday_List().nodeItab().currentItabElement().getGbdat().getDate();
              current_month = wdContext.nodeBirhtday_List().nodeItab().currentItabElement().getGbdat().getMonth();
              if (( current_date != date_today ) && ( current_month != month_today ))
                   wdContext.nodeBirhtday_List().nodeItab().removeElement(wdContext.nodeBirhtday_List().nodeItab().
                                  getElementAt(i));                
              wdContext.nodeBirhtday_List().nodeItab().moveNext();     
    It adds records...
    According to Valerys Solution, the IPrivate<CustomController> doesnt show me the required nodes. and gives me 'Unable to resolve' error.
    Can you please suggest where I am going wrong
    Regards
    Abdullah

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • Af:fileDownloadActionListener picks wrong filename for the first time after row selection.

    Hi,
    I am using Oracle Jdeveloper 11g release 1. In one of my jspx pages i have a table, i can select one of the row and click on a button which invokes fileDownloadActionListener. The code of jspx is as below:
    <af:commandMenuItem text="#{coregccomplianceuiBundle.MENU_EXPORT}"
                                        id="CS19" partialSubmit="true"
                                        actionListener="#{viewScope.core_gccompliance_cs_librarybean.validateExport}"
                                        partialTriggers="CSftLib"
                                        disabled="#{viewScope.core_gccompliance_cs_librarybean.exportDisabled}">
    </af:commandMenuItem>
    <!--This button is set hidden, which is used to deal with the download job.
        The Export button on the page only does the validation. (whether it's a system defined standard)-->
      <af:commandButton text="#{coregccomplianceuiBundle.BTNEXPORTHIDDEN}" id="csl_csExportHidden"
                                          clientComponent="true" visible="false"
                                          partialSubmit="false">
    <af:fileDownloadActionListener contentType="application/x-download" 
                                          method="#{viewScope.core_gccompliance_cs_librarybean.handleExport}"
                                          filename="#{viewScope.core_gccompliance_cs_librarybean.fileName}"/> 
    </af:commandButton>
      /** force the ExportHidden Button to do export */
        function csExportHandler(event) {
            var exportCmd = AdfPage.PAGE.findComponent("emT:CS4:csl_csExportHidden");
            var actionEvent = new AdfActionEvent(exportCmd);
            actionEvent.forceFullSubmit();
            actionEvent.noResponseExpected();
            actionEvent.queue();
    The bean methods used in above block are as below:
    public void validateExport(ActionEvent actionEvent) {
           // checks if entity is system defined and shows error popup if it is .
            if (checkIsSystem())
                return;
            //Handle the export    
            AdfUtil.addScript("csExportHandler()");
    public void handleExport(FacesContext context, OutputStream out) {
            ComplianceLibraryAMImpl am = getDataController();
            HttpServletRequest request =
                (HttpServletRequest)context.getExternalContext().getRequest();
            Locale locale = NLSUtil.getClientLocale(request);
            ResourceBundle rb =
                ResourceBundle.getBundle("oracle.sysman.core.gccompliance.view.CoreGccomplianceUiMsg",
                                         locale);
            PreparedStatement st =
                am.getDBTransaction().createPreparedStatement("commit", 1);
            Connection conn = null;
            boolean isAgentSideCs = false;
            try {
                conn = st.getConnection();
                RichTable oTable = getCsTable();
                fileName = "ComplianceStandard.xml";
                List<Raw> exportGuids = new ArrayList<Raw>();
                for (Object opaqueFacesRowKey : oTable.getSelectedRowKeys()) {
                    oTable.setRowKey(opaqueFacesRowKey);
                    Object o = oTable.getRowData();
                    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
                    exportGuids.add((Raw)rowData.getRow().getAttribute("CsGuid"));
                    int csType = ((oracle.jbo.domain.Number)rowData.getRow().getAttribute("CsType")).intValue();
                    if(csType == 4)
                        fileName =
                                (String)rowData.getRow().getAttribute("CsDname") + ".zip";
                        isAgentSideCs = true;
                    else
                        fileName =
                                (String)rowData.getRow().getAttribute("CsDname") + ".xml";
                    if(((Integer)rowData.getRow().getAttribute("IsSystem")).intValue() == 1){
                        throw(new ParseException(50));
                if (exportGuids.size() > 1)
                    fileName = "Compliancestandard_list.xml";
                RAW guid = new RAW(exportGuids.get(0).toString());
                if(isAgentSideCs)
                    getDataController().exportStandardContent(conn, out, guid);
                else
                    CsExport csexport = new CsExport(false);
                    csexport.doCsExport(conn, guid, false, out);
            } catch (ParseException e) {
                String errMsg = "";
                String errHdr = "";
                if(e.getStatus() == 50){
                    errMsg = rb.getString("ERRMSG_ISSYSTEMENTITY_EXPORT");
                    errHdr = rb.getString("ERRHDR_ISSYSTEMENTITY_EXPORT");
                else{
                    errMsg = rb.getString("ERRMSG_EXPORT_CS");
                    errHdr = rb.getString("ERRHDR_EXPORT_CS");
                AdfUtil.showMessageDialog(null, AdfUtil.MESSAGE_TYPE.ERROR, errHdr,
                                          errMsg, false, null);
                throw new RuntimeException(e);
            } catch (SQLException e) {
                throw new RuntimeException(e);
            } finally {
                JDBCUtil.close(st);
            MimeUtil mimeUtil = new MimeUtil();
            mimeUtil.downloadFile(context, fileName);
            try {
                out.flush();
                out.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
    Class MimeUtil:
    public void downloadFile(FacesContext context, String fileName) {
            HttpServletResponse httpServletResponse =
                (HttpServletResponse)context.getExternalContext().getResponse();
            HttpServletRequest httpServletRequest =
                (HttpServletRequest) context.getExternalContext().getRequest();
            String unicodeFileName = fileName;
            String agent = httpServletRequest.getHeader("USER-AGENT").toLowerCase(Locale.US);
            boolean isIE = false;
            if (null != agent && -1 != agent.indexOf("msie"))
                isIE = true;
            //encode the output file name to support NLS
            unicodeFileName = MimeUtil.encodeFileName(fileName, isIE);
            httpServletResponse.setHeader("Content-disposition",
                                          "attachment;filename=\"" + unicodeFileName +
    httpServletResponse.setContentType("application/x-download");
            context.responseComplete();
            httpServletResponse.setContentType("application/x-download");
            context.responseComplete();
    Now when i come to the page for first time and select a row and click on Export then the filename that gets shown in save file dialog is incorrect (it shows partial adf taskflow name) , but when i select the row again by clicking on any other row and click export it shows correct filename i.e. selectedRowName.zip or .xml according to type of row selected.
    Can anybody suggest what am i missing?

    difficult to tell like this.but better you debug your code then you can get where you getting filename wrong.

  • Obtaining "rows selected" value after custom sql query in Database adaptor

    We are executing a custom query in a database adaptor. With other technologies (JDBC, etc.) the result of a query will not only produce a result set but a count of the number of rows selected. E.G. the script output of Oracle SQL Developer will print out something like:
    9999 rows selected
    at the end of the script output.
    I would like to obtain this value for a BPEL process. Of course, I could execute a 2nd query whose where clause is identical to the first, but selects count(*) instead. However, this is not only inefficient but (in rare circumstances in an active database) could be wrong.
    It is not obvious to this BPEL novice how to obtain the row selected value as well as the result set in one Invoke. Is this possible?

    This may not be the only solution - but it is how I have done it in the past.
    Following the invoke step of the adapter, use an assign/copy step to populate an integer BPEL variable using the count xpath function...
    <assign name="Initialize">
    <copy>
    <from expression="count(bpws:getVariableData('Invoke_Query_OutputVariable','MyTableQueryCollection','/ns3:MyTableQueryCollection/ns3:MyTableQuery'))"/>
    <to variable="NumberOfRecordsReturned"/>
    </copy>
    </assign>
    That should assign the number of records returned by the query.
    I hope that helps.
    Rod.
    Edited by: Rod Tunnels on Dec 15, 2009 1:16 PM

  • Selection of tableSelectMany with sorting correct behavior or bug?

    Hello,
    I came across this behavior, looks like a bug to me. So I just wanna check if anyone else knows an answer, solution or workaround to this.
    - I build af:table by drag and drop DataControl onto the page.
    - assume that table as 2+ plus columns. the 1st column is an ID column.
    - assume that currently there are 10 rows displayed with ID 1 to 10
    - if I select the 2nd row (ID = 2), then click sort on the 1st column 2 times (so that it sorts ID descending.)
    - I will see that the 2nd row (which is now ID is 9) is selected.
    I'm kindof see the logic that adf treat this selection thing using position of the rows, not ID of the record represent in that row.
    Is there anyway ADF can keep track using ID instead? or we have to build that logic ourself?
    I came across this thread Re: tableSelectMany in combination with sorting
    but there's no end to it.
    Thanks in advance.

    Hi Frank,
    Thank a bunch for shading light to my life. This document is really helpful ;)
    Modified:
    additional to already great document by Frank, My colleague found another thread related to the same problem with a different way to deal with this problem. I'll just post the link here, so that we have more and more ways to fix the problem. ;)
    Re: ADF Faces: selection incorrect after sorting af:table
    CJ
    Edited by: CJ@FPI on Jun 8, 2009 5:08 PM

  • Multiple Row selection In JTable

    I am working with JTable and JList, I can transfer element from table to list and vise versa on clicking on button, my problem is that when i transferred element to either of them that should be selected. i can also transfer multiple item at time and doing sorting with table if i am adding element of 1st row and last row of table, both the rows should be selected.
    Any thoughts!!!!!!!!!!!
    ThnX
    Prashant_SDN

    Thnx for response and selection in list is done sucessfully.
    I have one additional query, I am transfering element from list to table and did use sorting so rows did not get added after existing row of table but added as per sorting.
    so how do i get the index of newly added row after sorting.
    Any thoughts!!!!

  • Why rownum 5 return no rows selected

    hi
    i want to know why rownum >5 .. is give no rows selected
    eg
    select * from emp where rownum>5;
    .....

    Because Oracle assigns a row number after it's actually been selected for outputting. In other words after the where condition has been satisfied.
    So, it looks at the first row and then sees if it's rownum (1) is greater than 5 - it isn't
    It looks at the next row (whose rownum is still 1 as we haven't selected anything for output yet). It still isn't greater than 5.
    ...and so on.
    But rownum < 5 will work. It will get you 4 rows.
    Note that sorting taking place after all this so
    select *
    from emp
    where rownum < 5
    order by emp_no;Will NOT get you the first 4 rows ordered by emp_no. Rather it will get you 4 arbitrary rows and then sort them by emp_no.
    So, back to your problem. It is probably best to use row_number rather than rownum:
    select *
    from (
      select e.*, row_number() over (order by empno) rnum  from emp e
    where rnum > 5;

Maybe you are looking for

  • Writing unicode characters on JSwing components

    I'm new to computers in general, but how can I write text onto a JTextarea - i need to type into one TextArea in Spanish and in English in the other - can I set up a textarea to be able to write words that include Spanish characters - I've read throu

  • Error in - PCR -G013 -

    Hi , I got an error in GB Payroll - Under 'Gross Payment [time management, function - PIT , PCR - G013 , /001 Valuation basis 1 I am getting an error , which says-  Division by Zero not performed - Do any one have any idea why the PCR is broken half

  • Tools/Photoshop/Batch no longer available after updating Bridge. Is there a missing file?

    I have just updated all my cc apps, Photoshop, Bridge etc. Being able to batch process files from Bridge is no longer a visible option. Can anyone advise about possible missing files that might enable this?

  • Upload categories master catalog

    Hi to all, - I am working in the extended classic scenario - release 5.0 - file .CSV 2.0 I have a problem uploading the categories of the master catalog: when i go to edit the master catalog, the system doesn't permit to see the categories and i can

  • SSL-Config: Oc4J does not reload keystore/truststore at runTime

    Hi all, i have a little question about the SSL-Config into OC4J. I have a webApp bound to a secure web site that requires mutual-authentication. If I add at run-time (without stopping OC4J) a trusted entry (a CA) to the keystore the secure-web-site i