Skip to main content
1-Visitor
January 25, 2016
Question

How to design a custom widget using Java Source Code ?

  • January 25, 2016
  • 2 replies
  • 4360 views

I am trying to build a custom widget and I create a UI using JavaFX. Now how do I implement my java source code for ThingWorx Mashup Widget design?

I use Thingworx-eclipse-plugin and ThingWorx-Extensions-SDK to build the extension. My java application perfectly run in my computer, but when I use this extension in Mashup no design appears there.

2 replies

1-Visitor
January 25, 2016

Thingworx widgets for Mashups are strictly written in JavaScript, as they are executed in the browser, not on the server. Java UI code will not work.

12-Amethyst
January 26, 2016

Hi Asaduzzaman,

Dave is not completely right - in fact there are ways to use and combine JavaFX based applets and javascript code in WebPages. See JavaFX and JavaScript for details. But I would not recommend this approach as Java applets are getting more and more outdated and the big browsers start to suppress them. And nowadays the native Java widgets are not more capable or interactive than corresponding widgets based on HTML5 and JavaScript. Documentation how to create your own UI Widgets can be found here: Creating UI Widgets for ThingWorx, Widget API (IDE) and Widget API (Runtime).

Cheers, moritz