This discussion is archived
2 Replies Latest reply: Sep 10, 2012 6:03 AM by 915091 RSS

Difference between VO Fetch Size, Iterator rangeSize and af:table Fetch Siz

915091 Newbie
Currently Being Moderated
Hi there,

i'm wondering what is the difference between als those parameters? I can set a fetch size for the ViewObject and set another value for the rangeSize of the Iterator and then if i want change the fetch Size for the table to absolutly different value.
So what is the meaning of ech of those parameters, how do they differ from each other and how do they work together?

Thanks in advance.
Alex
  • 1. Re: Difference between VO Fetch Size, Iterator rangeSize and af:table Fetch Siz
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    VO Fetch Size :

    data queried from the database to the business service within a single round trip

    Iterator rangeSize :

    Data queried from the view object cache into the binding layer. If range size exceeds fetch size then the VO issues two fetches

    table fetch size: The data range a table fetches when displaying data. With the rich table in ADF Faces the table fetch size isn't really meaningful anymore. In JDeveloper 10.1.3 it helped determining the rows displayed in a table before you needed to use pagination to browse for more data

    Frank
  • 2. Re: Difference between VO Fetch Size, Iterator rangeSize and af:table Fetch Siz
    915091 Newbie
    Currently Being Moderated
    Frank Nimphius wrote:
    Hi,

    VO Fetch Size :

    data queried from the database to the business service within a single round trip

    Iterator rangeSize :

    Data queried from the view object cache into the binding layer. If range size exceeds fetch size then the VO issues two fetches

    table fetch size: The data range a table fetches when displaying data. With the rich table in ADF Faces the table fetch size isn't really meaningful anymore. In JDeveloper 10.1.3 it helped determining the rows displayed in a table before you needed to use pagination to browse for more data

    Frank
    Thanks for your reply Frank, but this leads me to another question.
    There is a page with a table, which is displaying some data from a VO based on an EO. The table is showing let's say 30 records at once. Now the rangeSize for the iterator is set to 25. When i now want to interact programmatically with record 26 - 30 i get an NPE.
    This is the code (JDeveloper 11.1.2.2.0):
            RichTable table = this.getTable();
    
            RowKeySet rowKeySet = table.getSelectedRowKeys();
            Iterator selectetNodesIterator = rowKeySet.iterator();
    
            CollectionModel treeModel = (CollectionModel)table.getValue();
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)treeModel.getWrappedData();
    
            while (selectetNodesIterator.hasNext()) {
                List selectedRowKeyPath = (List)selectetNodesIterator.next();
                JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(selectedRowKeyPath);
                Row row = nodeBinding.getRow();
                DBSequence aaId = (DBSequence)row.getAttribute("AaId");
            }
    In that code the line Row row = nodeBinding.getRow(); throws the NPE, because the nodeBinding is null. Is this the desired behaviour and you always have to set the rangeSize greater than the possible values you can display at once, or is this en error?
    If it is desired, how should you behave when yout table stretches and you couldn't say how many records will be displayed? Should you just choose a number which will likely be big enough?

    Edited by: Alex on 10.09.2012 15:02

    I've tested it with an sample app working on the HR Schema, i also get a nullpointer, only on the last fetched records (when i scroll down) it is working. Otherwise the NPE is thrown when accessing the node Binding.

Legend

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