Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.4K Development
- 17 Developer Projects
- 139 Programming Languages
- 293.1K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 161 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 473 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
DCIteratorBinding getAllRowsInRange is not getting all rows

Hi,
Using Jdev 12.2.1.2.
I have a jsff fragment with a table with records of Documents:
- first time some one access it it will show the current day documents;
- after that the user can change the filters to look for a specific document
At the bottom of the page I will show the totals of the documents (counters and other values).
To calculate those totals I will access the Iterator of that table and loop for each record, for that I use DCIteratorBinding getAllRowsInRange to obtain all rows returned from my WebService (REST).
The problem I'm having is:
- that the first time, getAllRowsInRange method returns me 1 row that is empty, so I only see zeros (problem) - I have 3 rows on the original response and the table presents them
- if I change the date filter and execute the service again, getAllRowsInRange will return me the correct amount of rows and will calculate the total amounts (all good)
- if I change the filter back to today's date, it will also work as it should be (all good)
I'm currently out of ideas. Can any one help?
Thanks
Daniel
Answers
-
Hi Daniel,
How are you filtering data the first time you get in your page?
Are you managing it in your Task Flow? If so, did you drag-and-drop the ExecuteQuery operation there? Don't you have a wrong filter parameter over there?
Best Regards,
Pedro Gabriel
-
Hi Pedro
When I enter that page, the method on the bindings uses the current date, defined in a View Scope Bean and my service is not executed twice
-
Hi,
My big question here is if you are setting the right parameters the first time you enter in the page.
Have you tried to set manually your own parameters just to check if isn't some value that is incorrectly used as input parameter?
Are you using the same DCIteratorBinding before entering page and after being there performing your own filtering?
Best Regards,
Pedro Gabriel
-
I will test with harcoded values to check.
Yes, the Iteraror is the same
-
Before caling getAllRowInRange, try to call setRangeSize(-1)
-
Hi you can use getEstimatedRowCount to get total no rows.
DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("yourbinding");
long cnt=dciter.getEstimatedRowCount();
if you want to get rows data then get view object instance from dciter
ViewObject vo=dciter.getViewObject();
Row row=null;
for(int i=0;i<cnt; i++)
{
if(i==0)
{
row= vo.first();
}
else
{
row= vo.next();
}
}