General Interface Migration Software Release 3.9 March 3.9
General Interface Migration Software Release 3.9 March 3.9
March 3.9
1. Open all projects and project files in General Interface Builder 3.1.x to update all
component files to the new 3.1.x package structure. Component files are automatically
converted to the new 3.1.x GUI package structure and the serialization files are also
updated.
2. Modify all class names and constructors in your JavaScript logic files to the new 3.1.x
package structure. For more information, see Package Reorganization in General
Interface Release Notes.
3. Modify JavaScript code due to changes in 3.1.x. Read the following topics to see if you
need to modify your code:
Class Hierarchy Related to jsx3.gui.BlockX
Checking for Equality against Model.getInstanceOf()
Model.findDescendants() Results Order
List.selectRecord() and Model Events
4. If your projects use data mapping, update the project as described in Data Mapping for
3.0 to 3.4 Migration.
5. Migrate the updated 3.1.x projects to 3.3 and 3.4 as described in Migrating Projects from
3.1.x to 3.4.
For data mapping, there are two steps to updating your project:
To update the function code that invokes the service, complete these steps:
In 3.1.x, these methods have been moved to the mixin interface, jsx3.xml.Cacheable. Therefore,
jsx3.gui.List, jsx3.gui.Select, jsx3.gui.Tree, and jsx3.chart.ChartComponent no longer
extend jsx3.gui.BlockX. Any code that relied on this specific 3.0 class hierarchy will not work
in 3.3. For example, the following code will not work:
function alertIfCDF(objControl) {
if (objControl.isInstanceOf("jsx3.gui.BlockX"))
objControl.getServer().alert("Alert", objControl.getName() +
" is a CDF control");
}
function alertIfCDF(objControl) {
if (objControl.instanceOf(jsx3.xml.CDF))
objControl.getServer().alert("Alert", objControl.getName() +
" is a CDF control");
}
For example,
The following methods that call find Descendants() are also affected:
Model.getDescendantOfName(), Model.getFirstChildOfType(), and
Model.getDescendantsOfType(). The isSubclassOf() method would be similarly affected.
The migration steps fall into two categories: required and optional. If your application will be
deployed on Firefox, also complete the steps in Migrating Projects for Firefox for 3.1.x to 3.4.
The Block is owned by a layout manager, such as LayoutGrid, Tab, Stack, and Splitter.
The Block is relatively positioned and has a width of 100%.
The Block is absolutely positioned.
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,
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:
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") ;
For data mapping, there are two steps to updating your project:
Copyright © TIBCO Software Inc. All Rights Reserved.
8
For data mapping, there are two steps to updating your project:
1. Install General Interface 3.3. For more information about installing General Interface, see
General Interface Installation.
2. Double-click GI_Builder.html or GI_Builder.xhtml in the installation directory to start
General Interface Builder in Firefox or Internet Explorer.
3. Choose or create a workspace directory after General Interface Builder initializes. The
workspace is the directory that contains your projects, custom add-ins, custom
Copyright © TIBCO Software Inc. All Rights Reserved.
9 3.
workspace is the directory that contains your projects, custom add-ins, custom
prototypes, and your user settings for General Interface Builder. Separation of the
General Interface install directory from the workspace allows for easier application
deployment. For more on workspaces, see the General Interface Developer Guide.
4. Make backup copies of all projects you are migrating.
5. Copy projects that you would like to migrate to 3.3 from your previous JSXAPPS folder
into your new workspace/JSXAPPS folder.
6. Copy any custom user prototypes from your user/prototypes directory to the workspace
/prototypes directory. Components saved to this folder display in the User folder of the
Component Libraries palette.
7. Copy any custom add-ins to the JSX/addins or workspace/addins directory. Typically,
add-ins to be used by a team of developers would be saved to the JSX/addins directory
and posted by an administrator to a location accessible to the team. Add-ins for
individual use can be saved to the workspace/addins directory.
GUI Components
Replace all deprecated List and Grid components with Matrix components. List and Grid are
not supported in Firefox.
Character Encoding
Projects that were localized prior to General Interface 3.2 may have been saved in UTF-16
encoding. If you open these files in General Interface 3.3, they might contain junk characters.
Although General Interface 3.3 might read these Unicode files, it's best to resave the project in
General Interface Builder 3.3 on Internet Explorer before you proceed with the project
migration. Be sure to make a backup of your project before beginning.
For applications loaded from the local disk, such as General Interface Builder, Firefox reads
only non-XML files that are encoded in a standard 8-bit encoding. Firefox can read local XML
files in any encoding supported by the host system only if the encoding is included in the XML
declaration.
To re-encode any non-XML files from UTF-16 to 8-bit ASCII, you can use General Interface
Builder 3.3 running in Internet Explorer or a text editor.
To re-encode non-XML files from UTF-16 to 8-bit ASCII, complete these steps:
You will not be able to include any non-ASCII characters in these plain text files. For the best
compatibility with Firefox, all extended ASCII and 16-bit characters should be externalized in
XML files that declare their character encoding in the XML declaration.
XML files do not need to be re-encoded as described above, although they can be. However, if
Copyright © TIBCO Software Inc. All Rights Reserved.
10
XML files do not need to be re-encoded as described above, although they can be. However, if
an XML file is encoded in UTF-16 or any other non-ASCII character encoding, the encoding
must be added to the XML declaration. Add or modify the first line of the XML file with the
following XML declaration:
<?xml encoding="UTF-16"?>
Note that component serialization files are also XML files. If they have been encoded in UTF-16,
they must also be modified as described above.
* The XSL must output valid XML. Balanced tags are required. For example,
<xMessage>Hello World!</xMessage>
The only output formats supported for XSLT processing are HTML 4.0 and XML.
XSLT implementation does not support the namespace axis, limiting the ability to
query and discover namespaces. The DOM-based interface also fails to implement
this axis.
XSLT implementation does not support the node-set() method, which means that
complex parameters and result tree fragments cannot be resolved.
XSLT implementation does not allow output escaping to be disabled, which
means that escaped entities cannot be resolved during a transformation.
1. Manually merge your customized logger.xml files with the new logging system
configuration file (GI_HOME/logger.xml).
In General Interface 3.2 and later releases, the logger.xml file has new attributes and
functionality, such as sound for the logging system and class loading options. The
logging file has also been moved from the GI_HOME/JSX directory to GI_HOME and must be
deployed accordingly. For more information, see the General Interface Developer Guide.
2. To take advantage of MSXML 4 or later, if installed, remove the Internet Explorer
parameters from the application configuration file. See Internet Explorer Parameters.
3. For consistent layout behavior in both Firefox and Internet Explorer using a Block, follow
the recommendations specified in Browsers and Layouts for 3.1.x to 3.4 Migration.
4. Change paths to relative URLs for more flexible development and deployment. See
Relative Paths for 3.1.x to 3.4 Migration.
5. Replace all deprecated List and Grid components with Matrix components. Note that
List and Grid are not supported in Firefox.
6. Rename resource files from .jss to .xml for easier deployment. For example, Microsoft
IIS6 Server doesn't handle the .jss file extension correctly. Renaming resource files with
You can modify the project settings in the Project Settings dialog (Project > Project Settings) or
in the application configuration file. Any changes you make in the Project Settings dialog are
saved to the configuration file. Some changes can only be made in the configuration file.
Paths
Application resources can now be specified using relative paths, which allows for easier
portability of code from one project to another and simplifies the relocation of applications in
the JSXAPPS folder hierarchy.
When you open a 3.1.x project in General Interface Builder 3.3, paths in the config.xml file are
updated automatically to relative paths after the upgrade prompt.
However, you must modify the path for the initial component. You can do this on the
Deployment panel of the Project Settings dialog (Project > Project Settings) in the IDE or in the
application configuration file (workspace/JSXAPPS/PROJECT_DIR_/config.xml). Simply remove
JSXAPPS/PROJECT_DIR_/ from the path as shown in the Revised config.xml for 3.3 below.
Before using the new options, you need to modify the onLoad jsxid for some files in the
application configuration file as follows:
3. Modify each child record of type map with a jsxid of onLoad as follows:
a. Change the jsxid onLoad value to load.
b. Change the type from boolean to number.
c. Change the record value to the new desired value, such as 0, 1, 2, or 3. For
values, see the next table.
For example, to set logic.js to load automatically when the application
initializes, change the record from this:
To this:
At init 1 true
The Auto Load option is disabled for GUI component files, such as appCanvas.xml. You can
specify a GUI component file to automatically load when the application initializes in the Initial
Component field on the Deployment panel of the Project Settings dialog.
Once you've modified the application configuration file, you can also set auto load options in
General Interface Builder. Right-click a file in the Project Files palette and choose Edit Profile.
Select an option from the Auto Load drop-down list in the Edit Profile dialog and click Save.
<record jsxid="xmlregkey"
type="string">Msxml2.FreeThreadedDOMDocument.3.0</record>
<record jsxid="xslregkey"
type="string">Msxml2.XSLTemplate.3.0</record>
<record jsxid="httpregkey" type="string">Msxml2.XMLHTTP</record>
However, you can pass these parameters at runtime using the General Interface runtime
parameters. See the General Interface Developer Guide.
Custom Add-ins
If you've created a custom add-in for General Interface 3.1.x, you need to edit the project
config.xml file of the add-in as follows:
You might also want to update your add-ins to use the new General Interface features, such as
class loading and relative paths. See Class Loading in Migration for 3.1.x to 3.4 Migration and
Relative Paths for 3.1.x to 3.4 Migration.
Modify the path for the initial component in the Project Settings dialog (Project > Project
Settings) or the application configuration file. See Project Settings for 3.1.x to 3.4
Migration.
Modify paths in JavaScript code to use relative URLs. To update your code, remove this
portion of the path: JSXAPPS/PROJECT_DIR_/.
Modify paths in the component serialization files or in the Properties Editor palette to
use relative URLs.
1. Open the 3.1.x project and project files in General Interface Builder 3.3 and resave all
project files.
If you're using Firefox and have files encoded in UTF-16, open the 3.1.x
project and project files in Internet Explorer first and resave the files before
opening in Firefox. See Character Encoding.
2. Specify class loading options to improve application performance with the new dynamic
class loading features in General Interface Builder 3.3. See Class Loading in Migration for
3.1.x to 3.4 Migration.
3. Modify records that specify auto loading in the application configuration file. New auto
load options have been added. See Auto Load Options.
4. If your projects use add-ins, update the add-ins as follows:
Charting and custom add-ins If your project uses Charting or custom add-ins,
enable the add-in on the Add-ins panel of the Project Settings dialog (Project >
Copyright © TIBCO Software Inc. All Rights Reserved.
4.
14
enable the add-in on the Add-ins panel of the Project Settings dialog (Project >
Project Settings).
Project settings Application configuration files must be modified for custom
add-ins to work in General Interface 3.3. See Project Settings for 3.1.x to 3.4
Migration.
Mapping add-in If your project includes data mapping, see Data Mapping for
3.1.x to 3.4 Migration.
5. If your projects have rules files, update all rules files. See Data Mapping for 3.1.x to 3.4
Migration.
6. If your projects use any custom XSL, you must update the XSL. See XSL Changes for
3.1.x to 3.4 Migration.
If any project files in your migrated project are displayed in red in the
Project Files palette, you need to update the references to those files.
Right-click the file in the Project Files palette and choose Edit Profile.
Modify the path in the URI field and click Save.
7. Migrate your updated 3.3 projects to 3.4. See Migrating Projects from 3.2 or 3.3 to 3.4.
1. Open any files that are saved in UTF-16 encoding in Internet Explorer first and resave
the files before opening in Firefox. See Character Encoding.
2. Complete the required steps described in Required Migration Steps for 3.1.x to 3.4
Migration.
3. Replace all deprecated List and Grid components with Matrix components. List and Grid
are not supported in Firefox.
4. If you're using XSL files, verify that they meet certain requirements to work correctly in
Firefox. See XPath and XSLT Requirements.
There are also additional optional steps you can complete. See Optional Migration Steps for
3.1.x to 3.4 Migration.
Introduced in General Interface 3.2, XML transformers are the preferred replacement for
custom XSL templates. XML transformers are used to transform the source XML of a GUI
control implementing the jsx3.xml.Cacheable interface before the XML is stored in the XML
cache. For example, a transformer could transform non-CDF source XML into CDF-compliant
XML or affect the visual style of the control by constructing a @jsxstyle CDF attribute from
other information in the source document. For more information, see jsx3.net.Cacheable in
Copyright © TIBCO Software Inc. All Rights Reserved.
15
other information in the source document. For more information, see jsx3.net.Cacheable in
General Interface API Reference and the inline IDE documentation for the XML Transformers
property in the Properties Editor palette.
For Firefox, XSL must meet certain requirements. See XPath and XSLT Requirements.
5. If you chose an existing workspace, copy any custom add-ins to the 3.4 JSX/addins
directory. Typically, add-ins to be used by a team of developers would be saved to the
JSX/addins directory and posted by an administrator to a location accessible to the team.
6. If you created a new workspace, complete these steps:
a. Copy projects that you would like to migrate to 3.4 from your previous workspace
/JSXAPPS folder into your new workspace/JSXAPPS folder.
b. Copy any custom user prototypes from your workspace/prototypes directory to
the new workspace/prototypes directory. Components saved to this folder display
in the User folder of the Component Libraries palette.
c. Copy any custom add-ins to the 3.4 JSX/addins or new workspace/addins
directory. Typically, add-ins to be used by a team of developers would be saved
to the JSX/addins directory and posted by an administrator to a location accessible
to the team. Add-ins for individual use can be saved to the workspace/addins
directory.
2. Review Changes in Behavior in 3.4 to see if your applications are affected by changes to
Copyright © TIBCO Software Inc. All Rights Reserved.
17
2. Review Changes in Behavior in 3.4 to see if your applications are affected by changes to
General Interface 3.4.
3. If your application creates a LayoutGrid - Side/Side component programmatically using
the constructor instead of being deserialized from an XML file, call the setCols()
method and pass an asterisk as the parameter to match the 3.3 behavior: setCols("*").
Otherwise, an extra row will be added to the layout. Note that the setDimensionArray()
method has been deprecated in 3.4 and is replaced with the setCols() and setRows()
methods.
4. Optional Rewrite any JavaScript code that uses deprecated APIs. See Deprecated APIs in
General Interface Release Notes.
5. Optional Replace any Block components that use an iframe with the new IFrame
component.
Class Loading
There are two changes to class loading in 3.4:
The At Lt Init and At Full Init Auto Load options are no longer supported. If your project
uses these class loading options, see Auto Load Options.
The jsxlt parameter is no longer supported. If your deployed projects use jsxlt="false",
see jsxlt Parameter. If your project uses jsxlt="true", no changes are needed.
jsxlt Parameter
The jsxlt launch parameter is no longer available as of 3.4. All applications now load in the
jsxlt="true" mode. If you deployed your project using jsxlt="false", use jsx3.require() to
explicitly load classes, so that the project is compatible with dynamic class loading. See
jsx3.require() Method.
Menu
Menu positioning and cascading may be different. See GI-63 in General Interface
Release Notes.
Long menus now render with auto-scroll arrows instead of with scroll bars.
TabbedPane
Provides an automatic right and left scrolling mechanism for navigating through
tabs that are hidden when they exceed the viewable space.
Tree
Copyright © TIBCO Software Inc. All Rights Reserved.
18
Tree
Support for range selection using Shift+click and multiple selection using
Ctrl+click.
Support for drag-and-drop of multiple records.
Drag-and-drop insertion between nodes and insertion as last child of node.
Context menu can operate on multiple rows.
Dialog
When deserialized a dialog box top-left position could be at a negative position if
the min-width and min-height were larger than the client window and no top-left
positions were defined. Left and top are now never less than zero. However, since
the resize control is in the bottom right, call constrainPosition(true) if there is a
chance that the dialog is larger than its parent.
Form elements
All form elements now inherit font color from an ancestor block.
setValue() and Matrix
If a Matrix is a single selection and the passed value is an array with more than
one element, an illegal argument exception is now thrown.
jsx3.app.Model.getChild() returns null instead of undefined. Unless specifically
documented, application should be careful about checking against undefined or null
value returned by General Interface functions. Developer should check against known
value.
For example, instead of this:
if (objJSX.getChild('block') == null)
or
if ( typeof(objJSX.getChild('block')) == 'undefined' )
Do this instead:
or
if ( ! (objJSX.getChild('block') )
For more information on new features, changes in functionality, and known and closed
issues, see General Interface Release Notes.
To migrate from 3.0 to 3.5, follow the instructions in Migrating Projects from 3.0 to 3.4
To migrate from 3.1 to 3.5, follow the instructions in Migrating Projects from 3.1.x to 3.4.
To migrate from 3.2 or 3.3 to 3.5, follow the instructions in Migrating Projects from 3.2 or
3.3 to 3.4
To migrate from 3.0 to 3.6-3.8, follow the instructions in Migrating Projects from 3.0 to
3.4.
To migrate from 3.1 to 3.6-3.8, follow the instructions in Migrating Projects from 3.1.x to
3.4.
To migrate from 3.2 or 3.3 to 3.6-3.8, follow the instructions in Migrating Projects from
3.2 or 3.3 to 3.4.
To migrate from 3.5 to 3.6-3.8, see Changes in Behavior for Migration to 3.6-3.8.
If you use <resourcename>.meta.xml in your application, update the application to add the
locales specification in the main resource properties file. For example:
locales="fr,zh_TW">
<locale>
* XML load API uses different protocols in 3.6-3.8 than in previous versions. For releases
through GI 3.5.1, the native XML Document object is used and loads XML resources
synchronously. Relative path XML resources are resolved relative to the JavaScript code or
project configuration file.
For releases starting with 3.6, jsx3.net.Request is used to load XML resources. The major
advantage is that this allows for asynchronous loading of resources. However, this also changes
the relative path resolution to be relative to the launch HTML page location.
If your application uses a relative path for the XML resource, you must update the
relative path to be resolved by calling
<my_application_server>.resolveURI(<my_relative_path>) before passing it to load
method such as Document.load(). It is a recommended good practice to always use
resolveURI() to specify the resource URL.
In 3.5, a component loaded from a URI beginning with JSXAPPS/... has its URI resolver
set to the application server. In other words, Model.getUriResolver() returns the server
of the component when called on the component. Therefore, any path resolved against
the component will resolve relative to the project directory.
Beginning with Release 3.6, a component loaded from a URI beginning with JSXAPPS/... has its
URI resolver set to jsx3.net.URIResolver.USER. Therefore, any path resolved against the
component will resolve relative to the user workspace.
Specifically, f you load a component from a URI beginning with JSXAPPS/..., paths that resolve
against the component and are relative to the project directory no longer work. The following
examples show methods with path parameters that are resolved against the component, such as
Model.load(), Cacheable.setXMLId(), and ToolbarButton.setImage().
For example, the following works in 3.5, but will not work in 3.6-3.8
dlg.load("components/matrix.xml");
Instead, the recommended approach is to load all components with project-relative URIs:
dlg.load("components/matrix.xml");
dlg = myApp.getBodyBlock().load("JSXAPPS/sampleApp/components/dialog.xml");
dlg.load("JSXAPPS/sampleApp/components/matrix.xml");
For Model.load(), which accepts an optional URIResolver parameter, you can explicitly specify
the resolver: