Basic Problem Using ClientScripting [message #1085290] |
Mon, 12 August 2013 18:14 |
Mark Leone Messages: 69 Registered: April 2012 |
Member |
|
|
I'm trying to use ClientScripting for the first time. I'm following the insrtuctions in the RAP wiki, and I must be missing something.
I have a SWT Label instance, and I want to add a listener on the client side to detect MouseEnter and MouseExit events. I'm supposed to add the ClientListener instance on the Java widget, specifying the event type, per the wiki example
widget.addListener( SWT.Verify, new ClientListener( javascript) );
The wiki says that MouseEnter and MouseExit events are supported on the client side, but I don't see how to specify them in the Java API. The only static members in the SWT class that refer to mouse events are MouseDoubleClick, MouseDown, and MouseUp.
So I tried adding a MouseDown listener, just to see if at least that works. I added the following line
label.addListener(SWT.MouseDown, (Listener) new ClientListener("function handleEvent(event) {console.log('mouse down');}"));
and I get this exception
java.lang.ClassNotFoundException: org.eclipse.rap.rwt.internal.remote.RemoteObjectFactory cannot be found by org.eclipse.rap.clientscripting_0.1.100.20130109-1900
There are no dependency issues shown when I click Validate on the Bundles tab of the Rap launcher. I'm using RAP 2.1 and the latest version of clientscripting from the incubator p2 repo (0.1.100).
I should also point out that the widget is running in a fragment project, since there is an RCP version of the app. When the RAP fragment is present, it replaces my Label class with a class that is the same except that it adds the ClientListener to the Label instance . The fragment has a dependency on the clientscripting plugin, and I tried re-exporting the dependency.
edit: I just tried it without single-sourcing it. With just a plugin and no fragment, I get the same exception.
[Updated on: Mon, 12 August 2013 19:54] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07031 seconds