General Interface is an open source project hosted by the Dojo Foundation

Class Loading in Migration for 3.1.x to 3.4 Migration

General Interface 3.3 supports dynamic class loading for more efficient performance. Dynamic class loading, also known as lazy loading, means that classes are loaded as they're needed at the last possible moment.

jsxlt Parameter

The jsxlt parameter is no longer supported in 3.4. If you're migrating to 3.4, skip this topic.

The jsxlt deployment parameter is a runtime configuration parameter that determines how classes are loaded. The jsxlt deployment parameter is located in the script element on the web page that launches the deployed application. For example,

<script type="text/javascript" src="JSX/js/JSX30.js"
   jsxapppath=" ../workspace/JSXAPPS/PROJECT_DIR/"
   jsxmanualhome="true"
   jsxlt="true"
   >
</script>

When the jsxlt deployment parameter is set to true, the default setting, all required classes are loaded as the system initializes. Optional classes are loaded by the component file and the jsx3.require() method.

If you don't want to use dynamic loading for your 3.1.x classes, set the jsxlt parameter to false (jsxlt="false") or remove it. However, if you want to take advantage of dynamic class loading, you need to add the jsxlt parameter to your launch page or create a new launch page with the General Interface 3.3 Deployment Utility (Project > Deployment Utility).

jsx3.require() Method

The jsx3.require() method can be used to load classes explicitly. Use the fully qualified class name when using the jsx3.require() method. For example,

jsx3.require("jsx3.net.Form");

Only classes that can be found by the system class loader are loaded. Custom classes can be added on the Classpath panel of the Project Settings dialog (formerly Deployment Options). To open the Project Settings dialog, choose Project > Project Settings.

When a component file is deserialized, the class of each object encountered in the file is dynamically loaded if it's not already loaded. Therefore, it's often not necessary to use the jsx3.require() method with classes that descend from jsx3.app.Model. However, if JavaScript code references these classes and if the code executes before a deserialization automatically loads the class, you must use the jsx3.require() method to explicitly load the class.

The jsx3.require() method must be called at least once before making these types of references:

  • A static reference to a class descending from jsx3.gui.Model (typically jsx3.gui.**).
  • Any references to subclasses of Model that execute before the class is loaded through object deserialization.
The General Interface Builder debugger classes are dynamically loaded. To use the JavaScript Step Through Debugger in General Interface Builder, you must use the jsx3.require() method before any jsx3.ide.debug() statements to load debugger classes. For example, jsx3.require("jsx3.ide.Debugger") ;

Contents

Searching General Interface Docs

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.