This discussion is archived
1 2 Previous Next 16 Replies Latest reply: May 23, 2013 4:07 AM by BAO.SZ RSS

Issues on showing adf tables' total row counts by using groovy

BAO.SZ Newbie
Currently Being Moderated
Hi, experts,
In jdev 11.1.2.3,

In order to display an adf tables's total row counts in jsp page(tabbed), i use groovy as:
--Drag and drop a input-text field control into the page,
--set value of that field control to :#{bindings.TransReceiptView21.estimatedRowCount}

On running, when visit this page(tabbed) first time, the total row counts for the table showed OK.

But when i click other page(tabbed), and try to leave the current page, an error popup, saying:
"JBO-25077: 指定对象 TransReceiptView21 中找不到名称 estimatedRowCount。"
("JBO-25077:cannot find name of estimatedRowCount on the refered object TransReceiptView21")

and there is no error msg in log panel in jdev.

Can someone give any suggestions?
Thanks.
  • 1. Re: Issues on showing adf tables' total row counts by using groovy
    vinaykumar2 Expert
    Currently Being Moderated
    what you want to achieve. you just want to know no of row in the table or something else?
  • 2. Re: Issues on showing adf tables' total row counts by using groovy
    vinaykumar2 Expert
    Currently Being Moderated
    http://www.techartifact.com/blogs/2012/10/adding-serial-no-in-the-table-in-adf.html


    using this you can find our no of row
  • 3. Re: Issues on showing adf tables' total row counts by using groovy
    BAO.SZ Newbie
    Currently Being Moderated
    hi,Vinay,

    I want to know the number of rows for the table, when a query is executed every time, the number should refreshed.
    But now i found, only the first time the number is OK, it will popup the above error msg when i execute the table, even stay at the same page.

    I don't know why?
    Thank you!
  • 4. Re: Issues on showing adf tables' total row counts by using groovy
    vinaykumar2 Expert
    Currently Being Moderated
    try using as el #{bindings.TransReceiptView21.estimatedRowCount}

    i thnk this will also return rowcount
  • 5. Re: Issues on showing adf tables' total row counts by using groovy
    Jeet_A Journeyer
    Currently Being Moderated
    Hi Bao,

    Please check.

    Display selected table row number and total rows
    https://blogs.oracle.com/jdevotnharvest/entry/display_selected_table_row_number
    eg.
    Row #{(bindings.EmpVO1Iterator.rangeStart < 0 ? 1 : bindings.EmpVO1Iterator.rangeStart+1) + ( bindings.EmpVO1Iterator.currentRowIndexInRange == -1 ? 0 : bindings.EmpVO1Iterator.currentRowIndexInRange)} of #{bindings.EmpVO1Iterator.estimatedRowCount}
    or in Toolbar
            <af:toolbar id="t3">
              <af:outputText value="Total Rows #{bindings.EmpVOIterator.estimatedRowCount}" id="ot1"
                             partialTriggers="t1"/>
            </af:toolbar>
    Thanks,
    Jit
  • 6. Re: Issues on showing adf tables' total row counts by using groovy
    BAO.SZ Newbie
    Currently Being Moderated
    Hi,Jit and Vinay

    I tried both of them, but the problem remained.

    Here is my page file:
    http://223.4.132.24:8180/BlobUtilServlet?tableName=FILE_TABLE&columnName=BODY&stuffID=020010110000001293&strNO=2&type=downfile&fileName=table2RowCount.jpg&directOpen=true

    and source code:
    <af:column sortProperty="#{bindings.TransReceiptView21.hints.Id.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.TransReceiptView21.hints.Id.label}"
    id="resId1c1">
    <af:outputText value="#{row.Id}"
    id="ot6"/>
    </af:column>
    <af:column sortProperty="#{bindings.TransReceiptView21.hints.BusinessType.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.TransReceiptView21.hints.BusinessType.label}"
    id="resId1c21" width="50">
    <af:outputText value="#{row.BusinessType}"
    id="ot55">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.TransReceiptView21.hints.BusinessType.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.TransReceiptView21.hints.No.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.TransReceiptView21.hints.No.label}"
    id="resId1c13">
    <af:outputText value="#{row.No}"
    id="ot47"/>
    </af:column>
    <af:column sortProperty="#{bindings.TransReceiptView21.hints.Title.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.TransReceiptView21.hints.Title.label}"
    id="resId1c14">
    <af:outputText value="#{row.Title}"
    id="ot48"/>
    </af:column>

    ===========
    <af:inputText label="记录数" id="it62"
    value="#{bindings.TransReceiptView2Iterator.estimatedRowCount}"/>

    =====================
    Bindings of the adf table as:
    http://223.4.132.24:8180/BlobUtilServlet?tableName=FILE_TABLE&columnName=BODY&stuffID=020010110000001293&strNO=3&type=downfile&fileName=bindingTransReceiptView2.jpg&directOpen=true

    ==================
    Expression Builder for the value of rowcount field:
    http://223.4.132.24:8180/BlobUtilServlet?tableName=FILE_TABLE&columnName=BODY&stuffID=020010110000001293&strNO=1&type=downfile&fileName=estimatedRowCount.jpg&directOpen=true

    I have tried two estimatedRowCount, which under
    --TransReceiptView21
    --TransReceiptView2Iterator

    But none of them works.
    Any idea?
    Thanks

    Edited by: BAO.SZ on 2013-5-16 上午8:58
    I tried the third Binding:
    --TransReceiptView2,
    but errors remains:
    http://223.4.132.24:8180/BlobUtilServlet?tableName=FILE_TABLE&columnName=BODY&stuffID=020010110000001293&strNO=4&type=downfile&fileName=rowcountserror.jpg&directOpen=true
  • 7. Re: Issues on showing adf tables' total row counts by using groovy
    Jeet_A Journeyer
    Currently Being Moderated
    Hi Bao,

    For test purpose can you try on new page with just one iterator. Something is missing on this page.

    Thanks,
    Jit
  • 8. Re: Issues on showing adf tables' total row counts by using groovy
    BAO.SZ Newbie
    Currently Being Moderated
    Hi, Jit,

    I test in a new application with only one table and it works,
    But this time both of two binding works:

    #{bindings.TransReceiptView1.estimatedRowCount}
    or
    #{bindings.TransReceiptView1Iterator.estimatedRowCount}

    So, what is the right choice?
    and how to fix the previous realworld pages's problem?

    Thanks

    Edited by: BAO.SZ on 2013-5-16 上午9:50
  • 9. Re: Issues on showing adf tables' total row counts by using groovy
    Jeet_A Journeyer
    Currently Being Moderated
    Hi,

    The one with Iterator would be correct.
    #{bindings.TransReceiptView1Iterator.estimatedRowCount}


    To fix other page, I would say take backup of entire code.
    Remove Table and see if iterators are removed. If not remove it manually.
    Again add the table and check correct iterator name. It should work.


    Thanks,
    Jit
  • 10. Re: Issues on showing adf tables' total row counts by using groovy
    BAO.SZ Newbie
    Currently Being Moderated
    Hi,Jit

    The problem is:
    Even if i begin a complete new jsf page and drag and drop a new adf table from data control with all columns selected which is less than 10 in the origianl application ,
    the errors remained.
    the row count field binding to:
    #{bindings.AppModuleView1Iterator.estimatedRowCount}

    Is there any more sugguestions?
    Thanks.
  • 11. Re: Issues on showing adf tables' total row counts by using groovy
    Jeet_A Journeyer
    Currently Being Moderated
    Hi Bao,


    Inside Binding --> PageDef i can see Iterator properties as
    <iterator Binds="YourVO" RangeSize="25" DataControl="YourModuleDataControl"
                  id="YourVOIterator" ChangeEventPolicy="none"/>
    Can you verify if you have similar properties ?


    When you say 10 columns or you are talking about 10 rows ?


    Thanks,
    Jit
  • 12. Re: Issues on showing adf tables' total row counts by using groovy
    BAO.SZ Newbie
    Currently Being Moderated
    Hi, Jit,
    In my example the page property is this:
    <iterator Binds="AppModuleView1" RangeSize="25" DataControl="AppModule1DataControl" id="AppModuleView1Iterator"/>

    After I change it to as you said:
    <iterator Binds="AppModuleView1" RangeSize="25" DataControl="AppModule1DataControl" id="AppModuleView1Iterator"
    ChangeEventPolicy="none"/>

    and the new table's column are 10, rows are 9.
    the problem remains:
    At the first time when i access the page, the number showed OK. but whenever I click to another row in the page, an error popup,saying:
    JBO-25077: 指定对象 {} 中找不到名称 estimatedRowCount。
    (JBO-25077: cannot find name estimatedRowCount in the refered object {}。)

    Is it mean no object is found {}?


    Here is the source code for the completely new created jsf page query1.jsf in my original application example:
    ===========================================

    <f:facet name="second">
    <af:table value="#{bindings.AppModuleView1.collectionModel}" var="row"
    rows="#{bindings.AppModuleView1.rangeSize}"
    emptyText="#{bindings.AppModuleView1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.AppModuleView1.rangeSize}" rowBandingInterval="0"
    filterModel="#{bindings.AppModuleView1Query.queryDescriptor}"
    queryListener="#{bindings.AppModuleView1Query.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.AppModuleView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.AppModuleView1.collectionModel.makeCurrent}"
    rowSelection="single" id="t1">
    <af:column sortProperty="#{bindings.AppModuleView1.hints.Id.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.Id.label}" id="c1">
    <af:outputText value="#{row.Id}" id="ot1"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.Name.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.Name.label}" id="c2">
    <af:outputText value="#{row.Name}" id="ot2"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.MdlNo.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.MdlNo.label}" id="c3">
    <af:outputText value="#{row.MdlNo}" id="ot3"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.ParentId.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.ParentId.label}" id="c4">
    <af:outputText value="#{row.ParentId}" id="ot4"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.Type.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.Type.label}" id="c5">
    <af:outputText value="#{row.Type}" id="ot5"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.Comment.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.Comment.label}" id="c6">
    <af:outputText value="#{row.Comment}" id="ot6"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.BplId.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.BplId.label}" id="c7">
    <af:outputText value="#{row.BplId}" id="ot7"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.MainCalssName.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.MainCalssName.label}"
    id="c8">
    <af:outputText value="#{row.MainCalssName}" id="ot8"/>
    </af:column>
    <af:column sortProperty="#{bindings.AppModuleView1.hints.RootMenu.name}"
    filterable="true" sortable="true"
    headerText="#{bindings.AppModuleView1.hints.RootMenu.label}" id="c9">
    <af:outputText value="#{row.RootMenu}" id="ot9"/>
    </af:column>
    </af:table>
    </f:facet>
    ==================================
    and here is the XML file for the pageDef:

    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.2.62.76" id="Query1PageDef"
    Package="project1.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <iterator Binds="AppModuleView1" RangeSize="25" DataControl="AppModule1DataControl" id="AppModuleView1Iterator"
    ChangeEventPolicy="none"/>
    <searchRegion Binds="AppModuleView1Iterator" Criteria=""
    Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer" id="AppModuleView1Query"/>
    </executables>
    <bindings>
    <tree IterBinding="AppModuleView1Iterator" id="AppModuleView1">
    <nodeDefinition DefName="project1.AppModuleView" Name="AppModuleView10">
    <AttrNames>
    <Item Value="Id"/>
    <Item Value="Name"/>
    <Item Value="MdlNo"/>
    <Item Value="ParentId"/>
    <Item Value="Type"/>
    <Item Value="Comment"/>
    <Item Value="BplId"/>
    <Item Value="MainCalssName"/>
    <Item Value="RootMenu"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    </bindings>
    </pageDefinition>

    Thanks.

    Edited by: BAO.SZ on 2013-5-18 下午7:30
  • 13. Re: Issues on showing adf tables' total row counts by using groovy
    Jeet_A Journeyer
    Currently Being Moderated
    Hi Bao,

    It should not happen. Can you try on simple employees or emp table and check if you can replicate the issue ?
    If yes it could be Oracle bug else something is missing from our side.

    Thanks,
    Jit
  • 14. Re: Issues on showing adf tables' total row counts by using groovy
    BAO.SZ Newbie
    Currently Being Moderated
    Hi,Jit

    I tried this today:

    --Drag and drop an output-text field control instead of input-text field control into the page for displaying the row counts.
    And this time it works for all the cases I tested before.

    So it seems this should be the real cause of the issue.
    It's really a frustration and annoyment experience to spend so much time on this trivial issue.

    I'm really very appreciate and thankful for your patience and kindness to work with me all this long time!

    BAO
1 2 Previous Next

Legend

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