JQuery, Eclipse RAP and a carousel

JQuery, Eclipse RAP and a carousel

A few weeks ago, my colleague Ralf Sternberg, announced that RAP supports a JQuery integration. What we still needed to do was to create an example that shows how to integrate some JQuery stuff into RAP. Yesterday I took a little time to work on it. I used the JQueryUI Carousel widget as a base. Two hours later the integration and a book store example were completed. You can see the result in the screencast below.

The special thing about this integration is that it uses the SWT Browser widget with BrowserFunctions. This makes this type of integration very lightweight and simple to develop. As I mentioned before, two hours were enough to create the example. Of course, besides JQuery you can integrate all kinds of Frameworks, Mashups and other things that are running in a browser. Ian Bull highlighted this by developing a GMap example. The cool thing about this technique is that it works with RAP (RWT) and RCP (SWT).

I made the source code publicly available via github. You can find the repository here. It would be great to see some other examples. So, please feel free to post your examples in a comment.

  • flashcloud
    Posted at 4:31 pm, December 11, 2010

    oh, it’s wrong when use RAP1.4-M3 to run it

  • flashcloud
    Posted at 4:33 pm, December 11, 2010

    in Carousel.java,the “addProgressListener” method is not exists at RAP1.4-M3!

  • Posted at 5:27 am, April 5, 2011

    Hi Holger,

    Thanks for the posting this really cool sample. It opens up a lot of possibilities. I have been trying to port a jquery form builder to RAP . The plugin makes a lot of ajax calls using the jquery get function, which makes calls to a backend php script . I replaced some of these calls by using SelectionListeners and browser functions as you have used in the Caraousel example. But it seems a lot of work to replace all of them.

    So I wanted to know if it is possible to pass a url to the jQuery get() function, which can communicate with the RAP framework and call the appropriate function in the backing class. This way i wont have to write all of the javascript all over again