JavaScript API
TIBCO General Interface's JavaScript API is organized into packages similar to the Java Development Kit. The root package name for all JavaScript classes is jsx3. Base framework classes to manage defining classes and packages are in the jsx3.lang package. A word of caution here is that the concept of package is somewhat similar to that in Java, except that if a package is defined using the jsx3.lang.package it cannot be dynamically loaded by General Interface's class loader. TIBCO General Interface packages allow pulling together several classes into a single package and allow JavaScript programs to discover classes, methods, and properties of a package. Although that is a good feature, it is possible, and in fact even advisable, to not use a package at all. Packages can also be created by using appropriate namespaces in class names. The following subpackages are available:
- Jsx3.app—Contains the highest-level classes for a General Interface application; for example, the application controller and General Interface global cache among others.
- jsx3.chart—Contains classes related to General Interface charts.
- jsx3.gui—Contains GUI widget classes and event and notification-related classes.
- jsx3.html—Contains very few classes that are related to the HTML that's rendered by General Interface.
- jsx3.ide—Contains classes related to the GI Builder IDE.
- jsx3.lang—Contains the General Interface class framework, which can be used without the rest of General Interface to build reusable components in JavaScript.
- jsx3.net—Contains classes that allow an application to communicate with the back-end services.
- jsx3.util—Similar to the java.util package; contains simple utility classes such as List, Iterator, and so on.
- jsx3.vector—Contains classes related to vector graphics in General Interface. Available only if Charts are used.
- jsx3.xml—Contains General Interface's abstraction layer for XML documents and CDF.
- window—Allows access to browser-level JavaScript functions such as window.alert().