Hi guys.
I have a code, that i've got from that excellent thread https://community.oracle.com/thread/4171805
And i need to refresh a classic report on Success (see code below).
My problem is that spinner appears twice and in different places.
How can i
1. place spinner of apex.event.trigger and apex.util.showSpinner in the same place
or
2. supress apex.event.trigger spinner
?
Appreciate You for any ideas.
PS I guess it's BUG of apex.event.trigger( '#reportSPEC', 'apexrefresh' ), because of it places spinner far from object #reportSPEC center.
var lSpinner$ = apex.util.showSpinner($("#reportSPEC"));
apex.server.process("P720_CALC_SPEC",
{pageItems: "#P720_SPEC_ID" /*List of the items that are used in your process */
},
{success: function( pData ) {
if (pData.success === true){
apex.event.trigger( '#reportSPEC', 'apexrefresh' );
apex.message.showPageSuccess( pData.message );
}
else {
apex.message.clearErrors();
apex.message.showErrors([
{
type: "error",
location: "page",
message: pData.message,
unsafe: false
}
]);
}
lSpinner$.remove();
}
}
);