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.
The theming was extended in several places:
ProgressBar
has a new themeable property width
.
box-shadow
property has been added to buttons.
ApplicationContextListener
s can be attached to an application context to receive a
notification before the application context is destroyed.
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.
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" ); }
The JavaScriptLoader implementation has been improved in the following aspects:
This list shows all bugs that have been fixed for this milestone build.
The above features are just the ones that are new since the last milestone build. Summaries for earlier builds:
To assist you with the migration from RAP 2.x (or 1.x) to 3.0, we provide a migration guide.