Twitter Logo Follow us on Twitter
Project Information About this project

RAP 2.2 M1 - New and Noteworthy

Here's a list of the most noteworthy things in the RAP 2.2 M1 milestone build which is available for download since August 23, 2013.

Theming

Theme Extensions

The theming was extended in several places:

  • ProgressBar has a new themeable property width.
  • box-shadow property has been added to buttons.

Application Context

Application Context Listener

ApplicationContextListeners can be attached to an application context to receive a notification before the application context is destroyed.

RWT Scripting

Migrated ClientScripting to RAP Core

The ClientScripting project has been graduated from the incubator and is now included in the RAP core as “RWT Scripting”. Using the new ClientListener class, it is possible to handle some events directly on the client without the usual latency caused by HTTP requests.

The number of supported widgets and what properties can be changed on the client is expected to be expanded until the RAP 2.2 release. For now the following widgets support ClientListener:

  • Text
  • Button
  • Canvas
  • Composite
  • Label

Supported events are:

  • SWT.KeyDown
  • SWT.KeyUp
  • SWT.MouseDown
  • SWT.MouseUp
  • SWT.MouseMove
  • SWT.MouseEnter
  • SWT.MouseExit
  • SWT.MouseDoubleClick
  • SWT.FocusIn
  • SWT.FocusOut
  • SWT.Paint
  • SWT.Modify
  • SWT.Verify

Consult the new Developers Guide Scripting article for information on ClientListener, and the WebClient API reference to find out what widget methods are available in RWT Scripting.

Note: The ClientScripting incubator project is no longer compatible with RAP 2.2M1+ and must be used only with older RAP versions. If you port code based on the incubator ClientScripting to RAP 2.2 Scripting, please note that the namespace for ClientListener has been changed to org.eclipse.rap.rwt.scripting, and that the number of supported widgets has been reduced.

Synchronize user data with the client

It's now possible to transfer the data attached to the SWT widget to the client. To do so, the key for that data has to be registered with WidgetUtil.registerDataKeys( String... ). Now the appear under the URL that was given to the JavaScriptLoader. Example:

WidgetUtil.registerDataKeys( "foo" );
widget.setData( "foo", "bar" );

The transferred data can then be used in RWT Scripting:

function handleEvent( event ) {
  var data = event.widget.getData( "foo" );
}

Client Services

Improved JavaScriptLoader

The JavaScriptLoader implementation has been improved in the following aspects:

  • Files can be loaded from any URL: Previously the JavaScriptLoader could only load scripts served by the RAP application, e.g. by registering them with the resource manager. Now any URL that is reachable by the client can be used.
  • Browser no longer blocked during loading: The JavaScriptLoader now uses asynchronous HTTP request to load the JavaScript file, which means the browser no longer becomes unresponsive while waiting for the request to finish.
  • Scripts appear in Browser Developer Tools: Previously the loaded scripts did not appear in the "sources" or "scripts" tabs of the browsers debugger (e.g. Firebug).

Bugfixes

This list shows all bugs that have been fixed for this milestone build.

Previous Builds

The above features are just the ones that are new since the last milestone build. Summaries for earlier builds: