WiseJ Widget - Import External Function / Json

0
0

Is there a way to use external JS files with functions  and json data files inside the Widgets ?

Can you show me how , please … I couldn´t get access to the function …

Regards,

Marcelo

this.init = function(options) {

    if (!wisej.web.DesignMode)
    {  
        var spread = new GC.Spread.Sheets.Workbook(this.container, {
            sheetCount: 1
        });
        
        this.importaTemplate(); <<--function in external JS File referenced in packages ..
    
        });

   }

}
  • You must to post comments
0
0

You can load javascript using the <script> tag in your Default.html, or:

Use the widget’s Packages collection, or:

Use any third party javascript loader, or:

User Wisej built-in loader:

/**
 * load
 *
 * Loads the specified set of urls as a package identified by the unique id.
 * The package is loaded only once and cached.
 *
 * @param urls {Array|String} url or urls to be loaded in sequence.
 * @param callback(state) {Function} called when all the resources are fully loaded or if an error occurs.
 * the argument state can be: "complete", "cached", "error".
 */
Wisej.load = Wisej.load || function (urls, callback)

 

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.