Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BUG?: model.fetchAll callback property "done" always returns false

Hamza Al-abbasiOct 7 2022 — edited May 4 2023

APEX 22.1.5
Oracle 18 XE
I realized that the model.fetchAll callback property "done" is always returns "false". It works fine when we were on APEX 20.2. I tried it with Interactive Grid :

(function($) {
  $(function() {
    $("#[IG_STATIC_ID]").on("interactivegridviewmodelcreate", function(event, ui) {
      var model = ui.model;
      if (ui.viewId === "grid") {
        model.fetchAll(function(status) {
          if(status.done){
            alert("All records have been fetched.")
          }
        });  
      }
    });
  });
})(apex.jQuery);

By the way, I found some mistakes in code syntax of this function in the API documentation :
JSDoc: Interface: model (0 Bytes)The example :

model.fetchAll( function( status ) {
    if ( status.done } {
        model.forEach( function( record, index, id ) {
           // do something with each record
        }
    }
});

With correction :

model.fetchAll( function( status ) {
    if ( status.done ) {
        model.forEach( function( record, index, id ) {
            // do something with each record
        });
    }
});

Any idea sir @john-snyders-oracle
Thanks in advance.
-Hamza

This post has been answered by Hamza Al-abbasi on May 4 2023
Jump to Answer
Comments
Post Details
Added on Oct 7 2022
5 comments
1,237 views