Backwards Compatibility

This section covers feature enhancements that may impact behavior in existing applications.  Nexaweb is committed to maintaining backwards compatbility in the Nexaweb Platform.  A note on deprecated APIs: as Nexaweb improves the platform functionality certain APIs and syntax may be deprecated.  Nexaweb best practice is to migrate to the new APIs or syntax.

Platform 4.5

The default stylesheet has been enhanced
To maintain look and feel similar to the 4.2 Platform version include the stylesheet in the project and set as the default stylesheet.  The 4.2 Nexaweb Platform style sheet is available in the compatibility repository (browse)

Networking APIs have changed
NetService has been broken into three separate interfaces to provide a cleaner means of integration and to support client only deployments.  These three interfaces are RequestService, MessagingService and SynchronizationService.

NXML is deprecated in favor of XAL
To run your application in NXML compatibility mode, set this property in the nexaweb-client.xml.

<application-type>NXML</application-type>

XAL does not support NFC
If your application relies heavily on NFC, do not migrate to XAL.  XAL does not have an equilvalent set of typesafe wrappers available in 4.5.

Studio 2.2

Eclipse Web Tools has changed the directory structure.  Projects created with older versions of Nexaweb Studio will need to be migrated.  See studio release notes for migration steps and more information.

Platform 4.2

Backwards Compatability Flags

The following option flags have been added to the nexaweb-client.xml configuration file.  See below for details on each one.

<ensure-pre-4-dot-2-mco-string-argument-compatibility>
  <ensure-pre-4-dot-2-macro-compatibility>
<ensure-pre-4-dot-2-resolution-syntax-compatibility>

Resolution Syntax

Using {...} as a text node or attribute is now interpreted as text resolution.  In an attribute or text node { and } must be escaped as \{ and \} respectively.  \ should be escaped as \\.  The resolution can be turned off with the client.xml parameter

<ensure-pre-4-dot-2-resolution-syntax-compatibility>

For more details on text resolution (open).

MCOs

Declaring

MCO declarations no longer need to be nested in

<declarations>

tag.  

Lifecycle

AbstractMco now implements the new ContainerLifeCycleObject interface as follows:

public void addedToContainer(Container container, String name) {
    setSession(container.getSession());
    setName(name);
}

public void removedFromContainer(Container container, String name) {
    unload();
} 

Escaping and argument calling

MCO string arguments now support both single and double quotes.

MCO argument escaping has been extended:  the backslash character now requires escaping ( \\ -> \ ); a configuration flag has been added to nexaweb-client.xml to allow this to be turned off if needed.  To represent a single slash, it must be escaped; \x where x is not " or \ will result in an error.

To disable the new escaping syntax set 

<ensure-pre-4-dot-2-mco-string-argument-compatibility>

to false in client.xml.

Macros

If you were using macros prior to Nexaweb's 4.2 release and those macros contained any of the MessageFormat special characters, you may wish to disable the MessageFormat functionality to ensure that your macros continue to function as before. This can be done by changing the

<ensure-pre-4-dot-2-macro-compatibility> 

value to true in your nexaweb-client.xml file:

<ensure-pre-4-dot-2-macro-compatibility>
    true
</ensure-pre-4-dot-2-macro-compatibility>  

An example of this is the single quote character within macro calls.  This means that

<xu:replace select="id('panel1')">

becomes

 <xu:replace select="id(''panel1'')">

Other Changes

The attribute fontColorDisabled will now inherit from parent to children.

The JSP startup pages used to launch a Nexaweb application have been updated.  If these have been modified the modifications will need to be ported to the new pages.  New configuration values have been added to nexaweb-client.xml to allow customization of the start page look.

AbstractTagImp getUiContentHandler() was made public and final; it was protected

alignHorizontal now works on column and cell.

New Interfaces/Classes

The tableEditor class was added to the stylesheet.

PluginLifecycle class was added and exposed.

PrintService has new methods relating to PDF printing will be added.

DesktopClientSession interface was added.

StylesheetAwareTagImpl is now available.  It extends AbstractTagImpl and is a base class for ContainerBridge, LayoutBridge and CompositeTagBridge.  This means that plugins can now extend StylesheetAwareTagImpl to make styles apply to their components (for the normal state only).

Table rows and columns now work with stylesheets (for the normal state only).

System services can be called in XML without using mco://; for example

onCommand="DisplayService.loadStyleSheet(...)"

.Method calls in XML can take a wider variety of objects, including other method calls and container lookups such as document://nxml.  See method calling for more details.

UIContentHandler now extends PluginDocumentHandler and is exposed.

Platform 4.1

Licensing has changed

Local installations of the Nexaweb Platform that do not have a license key installed will only respond via localhost, all other network connections will be prevented.

The client configuration file, nexaweb-client.xml, format has changed

Running the new platform with the previous file will cause the server to halt - please ensure the file is following the new format.  

The nexaweb-client.xml format has been changed.  A style sheet transformation file (XSLT) has been provided to migrate existing configuration files to the new format.  The style sheet transformation file is installed to [Platform Installation]/doc/client.xsl.

More information on style sheet transformations is available at http://www.w3.org/TR/xslt
The default stylesheet has been enhanced

To maintain look and feel similar to the 4.0 Platform version incliude the stylesheet in the project and set as the default stylesheet.

Dataset Concept Deprecated, DocumentProvider replaced with DocumentRegistry

The concept of Dataset has been deprecated in favor of the more generic Document. This means that the following classes are deprecated:

  • DatasetEvent
  • DatasetProvider
  • DatasetListener

The newer simplified API means the addition of the following classes: DocumentRegistry, DocumentEvent, DocumentListener, DocumentLocation

XUpdate Syntax Change

Xupdate now has a new "document" attribute in place of the deprecated "dataset" attribute. The old syntax is deprecated but remains fully functional.

Where the following XUpdate statement used to operate on the UI Document:

<xu:modifications xmlns:xu="http://nexaweb.com/xupdate">

the new syntax is:

<xu:modifications document="nxml" xmlns:xu="http://nexaweb.com/xupdate">

For a dataset named "MyDoc" the old syntax was:

 <xu:modifications dataset="MyDoc" xmlns:xu="http://nexaweb.com/xupdate">

the new sytax is:

 <xu:modifications document="MyDoc" xmlns:xu="http://nexaweb.com/xupdate">

If the document attribute is not present, the "nxml" document is used by default.  
 

Named Nexaweb System Documents

Nexaweb's UI Document is now named and available through the DocumentRegistry's findDocument( String name ) method. In the future, there will be other Nexaweb System documents that are available through this API as well.

This in conjunction with the XUpdate change above will allow universal modification of Nexaweb's system state through the same mechanisms that allow for modification of user documents. The name of the UI Document is a constant in the DocumentRegistry class and is the same as the element name of the Document's root node: "nxml".