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!

JS code - Best practice

partlycloudyApr 18 2019 — edited Apr 22 2019

APEX 18.2

The JavaScript Initialization Code attribute on an Interactive Grid component is limited to 4000 characters. The documentation mentions various options for custom JS. This thread has some good suggestions too. And then there is the Cadillac option, Vincent's APEX Nitro framework.

Questions

  1. What do you recommend, to start off with? Just create a single app.js file and put all the custom code in there, upload to Static Application Files and serve it up using #APP_IMAGES#app.js in the Javascript > File URLs page attribute?
  2. Is there a way to edit the file directly in the APEX Builder instead of downloading it, editing it and re-uploading it? Yes, I know APEX Nitro streamlines this workflow but it seems like overkill for editing 1 file
  3. The IG JS code example has

function( options ) {

  options.toolbar = false;

  return options;

}

How should this be changed to refer to a function from this app.js file?

function(options) {

   return app.myFunction(options); // app.myFunction is defined in app.js

}

This is a good resource but I am still learning, appreciate the assistance.

Thanks

This post has been answered by John Snyders-Oracle on Apr 19 2019
Jump to Answer
Comments
Post Details
Added on Apr 18 2019
6 comments
794 views