Forum Stats

  • 3,852,790 Users
  • 2,264,137 Discussions


Loading massive data in dynamic ViewObject from custom query

Daniel B.
Daniel B. Member Posts: 15
edited Nov 25, 2016 3:31AM in JDeveloper and ADF


I built an ADF Application (with JDev where the user "creates" a dynamic query with filter. The result set is then displayed in a dynamic table component which works just fine.

My issue is now that they need to fetch massive data sometimes and the weblogic server will then crash with an OutOfMemory Exception obviously.

When you drag a ViewObject on a page as table and run it, the table/iterator only fetches the first like 10 rows and is loading the next ones on scroll.

Or short it uses virtualization, but my dynamic table not.. at least it looks like that.

How can I solve this issue by e.g. using virtualization with the dynamic component?

The tabel looks like this:

<af:table value="#{bindings.DynamicView1.collectionModel}" var="row"


               emptyText="#{bindings.DynamicView1.viewable ? 'Keine Daten verfügbar.' : 'Zugriff verweigert.'}"

               rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicView1.collectionModel.selectedRow}"


               rowSelection="single" fetchSize="#{bindings.DynamicView1.rangeSize}" id="t1">

    <af:iterator id="i1" value="#{bindings.DynamicView1.attributesModel.attributes}" var="column"


        <af:column headerText="#{column.label}" id="c1"

                           partialTriggers=":::s2:b1 :::s2:b3">

            <af:dynamicComponent id="d1" attributeModel="#{column}" value="#{row.bindings[].inputValue}"





And the method to create the ViewObject in th AppModule:

public void createDynamicView(String query) {

    ViewObject viewObjectOld = this.getDynamicView1();


    this.createViewObjectFromQueryStmt("DynamicView1", query);

    ViewObject viewObject = this.getDynamicView1();




Many thanks..

Daniel B.


  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,735 Red Diamond
    edited Nov 22, 2016 8:57AM

    You can try to set a differnet access mode to the dynamic VO

    void setAccessMode(byte mode)
    Constrains the row access based on the following settings:

    Switching access modes for a rowset will not take effect until the next explicit call to executeQuery. Switching accessmode back to SCROLLABLE from any other mode is not allowed.

    mode - One of the four enumerated values <a href="">SCROLLABLE</a>, <a href="">FORWARD_ONLY</a>, <a href="">RANGE_PAGING</a>, <a href="">RANGE_PAGING_AUTO_POST</a>.

    Try RANGE_PAGING and set the rage size to the number of rows you see on one page in the ui.


    Daniel B.Daniel B.
  • Cvele_new_account
    Cvele_new_account Member Posts: 4,810 Bronze Crown
    edited Nov 22, 2016 9:14AM

    There are absolutely no reason to display all those data in he UI.

    I wrote about his pretty often here.

    Before executeQuery() statement, call viewObject.setMaxFetchSize(75);

    Daniel B.Daniel B.
  • Daniel B.
    Daniel B. Member Posts: 15
    edited Nov 25, 2016 3:31AM

    @Timo Hahn

    Thanks, I tried it and it should work, my only problem is now that it crashes when I try to display the rowset, I posted another question about it just now, because it's a different problem, maybe you could take a look?

    Dynamic table (component) won't display dynamic ViewObject rowset


    I absolutely agree with you, but it's my assignment to do that..

    But thanks for your answer, setting max fetch size should also work, but same problem as I mentioned above, maybe you can have a look too.

This discussion has been closed.