| <div> |
| |
| <h2>Theming</h2> |
| |
| <h3>Theme Extensions</h3> |
| |
| <p> |
| The theming was extended in several places:<br/> |
| <ul> |
| <li> |
| <code>ProgressBar</code> has a new themeable property <code>width</code>. |
| </li> |
| <li> |
| <code>box-shadow</code> property has been added to buttons. |
| </li> |
| </ul> |
| </p> |
| |
| <h2>Application Context</h2> |
| |
| <h3>Application Context Listener</h3> |
| |
| <p> |
| <code>ApplicationContextListener</code>s can be attached to an application context to receive a |
| notification before the application context is destroyed. |
| </p> |
| |
| <h2>RWT Scripting</h2> |
| |
| <h3>Migrated ClientScripting to RAP Core</h3> |
| |
| <p> |
| The ClientScripting project has been graduated from the incubator and is now included in the RAP core |
| as “RWT Scripting”. Using the new <code>ClientListener</code> class, it is possible to handle some |
| events directly on the client without the usual latency caused by HTTP requests. |
| </p> |
| <p> |
| 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: |
| </p> |
| <ul> |
| <li><code>Text</code></li> |
| <li><code>Button</code></li> |
| <li><code>Canvas</code></li> |
| <li><code>Composite</code></li> |
| <li><code>Label</code></li> |
| </ul> |
| <p> |
| Supported events are: |
| </p> |
| <ul> |
| <li><code>SWT.KeyDown</code></li> |
| <li><code>SWT.KeyUp</code></li> |
| <li><code>SWT.MouseDown</code></li> |
| <li><code>SWT.MouseUp</code></li> |
| <li><code>SWT.MouseMove</code></li> |
| <li><code>SWT.MouseEnter</code></li> |
| <li><code>SWT.MouseExit</code></li> |
| <li><code>SWT.MouseDoubleClick</code></li> |
| <li><code>SWT.FocusIn</code></li> |
| <li><code>SWT.FocusOut</code></li> |
| <li><code>SWT.Paint</code></li> |
| <li><code>SWT.Modify</code></li> |
| <li><code>SWT.Verify</code></li> |
| </ul> |
| <p> |
| Consult the new Developers Guide <a href = "http://www.eclipse.org/rap/developers-guide/devguide.php?topic=scripting.html&version=2.2">Scripting article</a> for information on ClientListener, |
| and the WebClient <a href="http://download.eclipse.org/rt/rap/doc/2.2/guide/reference/jsdoc/index.html">API reference</a> to find out what widget methods are available in RWT Scripting. |
| </p> |
| <p> |
| <b>Note:</b> The ClientScripting incubator project is no longer compatible with RAP 2.2M1+ |
| and must be used <strong>only</strong> with older RAP versions. If you port code based on |
| the incubator ClientScripting to RAP 2.2 Scripting, please note that the namespace |
| for <code>ClientListener</code> has been changed to <code>org.eclipse.rap.rwt.scripting</code>, and |
| that the number of supported widgets has been reduced. |
| </p> |
| |
| <h3>Synchronize user data with the client</h3> |
| |
| <p> |
| 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 |
| <code>WidgetUtil.registerDataKeys( String... )</code>. Now the appear under the URL |
| that was given to the JavaScriptLoader. |
| Example: |
| </p> |
| |
| <pre class="lang-java"> |
| WidgetUtil.registerDataKeys( "foo" ); |
| widget.setData( "foo", "bar" ); |
| </pre> |
| |
| <p> |
| The transferred data can then be used in RWT Scripting: |
| </p> |
| |
| <pre class="lang-javascript"> |
| function handleEvent( event ) { |
| var data = event.widget.getData( "foo" ); |
| } |
| </pre> |
| |
| <h2>Client Services</h2> |
| |
| <h3>Improved JavaScriptLoader</h3> |
| |
| <p> |
| The JavaScriptLoader implementation has been improved in the following aspects: |
| </p> |
| <ul> |
| <li><b>Files can be loaded from any URL:</b> |
| 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. |
| </li> |
| <li><b>Browser no longer blocked during loading:</b> |
| 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. |
| </li> |
| <li><b>Scripts appear in Browser Developer Tools:</b> |
| Previously the loaded scripts did not appear in the "sources" or "scripts" tabs of |
| the browsers debugger (e.g. Firebug). |
| </li> |
| </ul> |
| |
| </div> |