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