Jump to: navigation, search

Difference between revisions of "RAP/Custom Widgets"

< RAP
(Remote API based Custom Widget)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
There are several ways to create custom widgets for RAP. This article is not a guide on how to create them, but links to the relevant resources and covers some current issues.<br>  
+
There are several ways to create custom widgets for RAP. This article is not a guide on how to create them, but links to relevant resources for the different RAP versions and covers some current issues. A list of known custom widgets can be found here: [[RAP/Add-Ons]].<br>  
  
 
== SWT-Style Custom Widgets<br>  ==
 
== SWT-Style Custom Widgets<br>  ==
Line 9: Line 9:
 
This guide by the creators of SWT pre-dates RAP, but is still valid for current SWT/RAP versions. The chapters about native-code can be ignored.  
 
This guide by the creators of SWT pre-dates RAP, but is still valid for current SWT/RAP versions. The chapters about native-code can be ignored.  
  
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=html/advanced/custom-widget.html#compound The RAP Developers Guide on Compund and Self-drawing widgets]<br>
+
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=advanced/custom-widget.html#compound The RAP Developers Guide on Compund and Self-drawing widgets]<br>
  
 
The current RAP developers guide covers some RAP-specific aspects of such custom-widgets.  
 
The current RAP developers guide covers some RAP-specific aspects of such custom-widgets.  
Line 23: Line 23:
 
These widgets use HTML and JavaScript, but are not based on RAP-internals. They can be compatible with SWT applications.
 
These widgets use HTML and JavaScript, but are not based on RAP-internals. They can be compatible with SWT applications.
  
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=html/advanced/custom-widget.html#browser The RAP Developers Guide on Browser-based Custom Widgets]<br>
+
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=rwt/custom-widget.html&version=1.5#browser The RAP 1.5 Developers Guide on Browser-based Custom Widgets]<br>
 +
 
 +
*[http://www.eclipse.org/rap/developers-guide/devguide.php?topic=web-embedding.html The RAP 2.x Developers Guide on the Browser Widget]<br>
  
The current RAP developers guide gives an overview of the techniques that can be used to create such custom widgets and links to several examples.
 
  
 
'''Related Issues'''
 
'''Related Issues'''
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=363811 Bug 363811] - [Browser] certain characters in browser function name crash client]<br>
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=363811 Bug 363811] - [Browser] certain characters in browser function name crash client<br>
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=374244 Bug 374244] - SWTException during Browser.evaluate() when trying to retrieve size of browser content<br>
+
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371132 Bug 371132] - [BrowserFunction] - Support calls to browser function while another browser function is pending<br>
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371132 Bug 371132] - [BrowserFunction] - Support calls to browser function while another browser function is pending<br>
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371133 Bug 371133] - [Browser] - Support multiple script executions<br>
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371133 Bug 371133] - [Browser] - Support multiple script executions<br>
Line 37: Line 37:
 
ClientScripting is an Incubator Projects suitable to create RAP custom widgets. It requires at least RAP 1.5.
 
ClientScripting is an Incubator Projects suitable to create RAP custom widgets. It requires at least RAP 1.5.
  
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=html/advanced/custom-widget.html#clientscripting The RAP Developers Guide on ClientScripting-based Custom Widgets]<br>
+
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=rwt/custom-widget.html&version=1.5#clientscripting The RAP 1.5 Developers Guide on ClientScripting-based Custom Widgets]<br>
The current RAP developers guide explaining when ClientScripting is a good solution for creating custom widgets.
+
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=custom-widget.html#clientscripting The RAP 2.x Developers Guide on ClientScripting-based Custom Widgets]<br>
 
*[http://wiki.eclipse.org/RAP/ClientScripting ClientScripting in the RAP Wiki]<br>
 
*[http://wiki.eclipse.org/RAP/ClientScripting ClientScripting in the RAP Wiki]<br>
Detailed and up-to-date explanation of ClientScripting features.
 
  
 
'''Related Issues'''
 
'''Related Issues'''
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371089 Bug 371089] - [ClientScripting] - Synchronize user data from server to client<br>
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371089 Bug 371089] - [ClientScripting] - Synchronize user data from server to client<br>
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371071 Bug 371071] - [ClientScripting] [VerifyEvent] VerifyEvent not fired on programmatic changes<br>
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=371071 Bug 371071] - [ClientScripting] [VerifyEvent] VerifyEvent not fired on programmatic changes<br>
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=406801 Bug 406801] - [ClientScripting] 'use strict' not supported in ClientListener]<br/>
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=391414 Bug 391414] - [Clientscripting] Server side redraw() does not always trigger client side paint event]<br/>
 +
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=404896 Bug 404896] - [ClientScripting] Verify event keyCode is always zero when replacing text]
  
== RAP-native Custom Widget ==
+
== RAP-native Custom Widget (RAP 1.x) ==
Custom widgets based in the internal RAP architecture, like the widgets in the core-framework. Will not run in an SWT-application.
+
Custom widgets '''based in the internal RAP architecture''', like the widgets in the core-framework do. Will not run in an SWT-application.
 +
The RAP 1.4 Developers Guide contains a detailed guide to creating native Custom Widgets. Its based on the older GoogleMaps widget for RAP. Some information may be slightly out of date for RAP 1.5, and more so for RAP 2.x.
  
*[http://eclipse.org/rap/developers-guide/devguide.php?topic=html/advanced/custom-widget.html#native The RAP Developers Guide on native Custom Widgets]<br>
+
== Remote API based Custom Widget ==
  
The current RAP developers guide only compares it to the alternative methods.
+
RAP 2.0 introduced a new Remote API in Java and JavaScript which can be used to create Custom Widgets.  
  
*[http://git.eclipse.org/c/rap/org.eclipse.rap.tools.git/plain/bundles/org.eclipse.rap.help/help/html/advanced/custom-widget.html?h=streams/1.4-maintenance The RAP 1.4 Developers Guide on native Custom Widgets]<br>
+
*[[RAP/Custom_Widgets_FAQ]]
 
+
The RAP 1.4 contains the detailed guide to creating native Custom Widgets. Its based on the older GoogleMaps widget for RAP. Some information may be slightly out of date.
+
 
+
'''Related Issues'''
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=379325 Bug 379325] - custom widget "Could not process server response" <br>
+
'''IMPORTANT''': Your qooxdoo class must no longer extend "CanvasLayout" but "org.eclipse.swt.widgets.Composite".!
+
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=324434 Bug 324434] - [Client] Define a minimal JavaScript API for custom widgets <br>
+

Latest revision as of 06:14, 15 August 2013

There are several ways to create custom widgets for RAP. This article is not a guide on how to create them, but links to relevant resources for the different RAP versions and covers some current issues. A list of known custom widgets can be found here: RAP/Add-Ons.

SWT-Style Custom Widgets

Those are custom widgets like they are created in SWT. There are two types: Compound widgets and Self-drawing widgets.

This guide by the creators of SWT pre-dates RAP, but is still valid for current SWT/RAP versions. The chapters about native-code can be ignored.

The current RAP developers guide covers some RAP-specific aspects of such custom-widgets.

Related Issues

  • Bug 321274 - Compound Custom Widget Focus
  • Bug 370328 - [Canvas] - Text has wrong z-index
  • Bug 375615 - [GC] - Drawing order of image is not correct
  • Bug 370313 - [Canvas] - Tweak canvas performance in IE7/8
  • Bug 361615 - [Canvas] - Implement SWT.NO_BACKGROUND to avoid clearing the canvas rectangle

Browser-based Custom Widgets

These widgets use HTML and JavaScript, but are not based on RAP-internals. They can be compatible with SWT applications.


Related Issues

  • Bug 363811 - [Browser] certain characters in browser function name crash client
  • Bug 371132 - [BrowserFunction] - Support calls to browser function while another browser function is pending
  • Bug 371133 - [Browser] - Support multiple script executions
  • Bug 323803 - [ipad] Browser-widget/iframe broken

ClientScripting-based Custom Widget

ClientScripting is an Incubator Projects suitable to create RAP custom widgets. It requires at least RAP 1.5.

Related Issues

  • Bug 371089 - [ClientScripting] - Synchronize user data from server to client
  • Bug 371071 - [ClientScripting] [VerifyEvent] VerifyEvent not fired on programmatic changes
  • Bug 406801 - [ClientScripting] 'use strict' not supported in ClientListener]
  • Bug 391414 - [Clientscripting] Server side redraw() does not always trigger client side paint event]
  • Bug 404896 - [ClientScripting] Verify event keyCode is always zero when replacing text]

RAP-native Custom Widget (RAP 1.x)

Custom widgets based in the internal RAP architecture, like the widgets in the core-framework do. Will not run in an SWT-application. The RAP 1.4 Developers Guide contains a detailed guide to creating native Custom Widgets. Its based on the older GoogleMaps widget for RAP. Some information may be slightly out of date for RAP 1.5, and more so for RAP 2.x.

Remote API based Custom Widget

RAP 2.0 introduced a new Remote API in Java and JavaScript which can be used to create Custom Widgets.