cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Create Mashup Widget Extension Guide: Examples missing

Helge_Kosuch
6-Contributor

Create Mashup Widget Extension Guide: Examples missing

Hi!  In the "Create Mashup Widget Extension"- Guide it says "You can find examples of widgets in the Tomcat_Installation_Folder/webapps/Thingworx/Common/thingworx/widgets directory." (Source: https://developer.thingworx.com/en/resources/guides/create-mashup-widget-extension/mashup-widget-coding )

 

But im my ThingWorx 8.4 trial installation this directory and its subdirectories contain no single *.js file, but only image files. I guess something has changed since the guide was written. Does anybody have hints where the JS-files for the standard widgets could be obtained? I searched for *.js files in Tomcat_Installation_Folder/webapps/Thingworx and browsed through the results, but nothing looked like the widget sources to me.

 

1 ACCEPTED SOLUTION

Accepted Solutions

 

In Chrome Dev Tools, ThingWorx 8.4:

image.png

 

Or, hidden in a much longer files: 

"C:\Program Files (x86)\ThingWorxH2Trial-8.4.0-SNAPSHOT\tomcat\apache-tomcat-8.5.23\webapps\Thingworx\Builder\mashup-common-widgets-builder.js"

"C:\Program Files (x86)\ThingWorxH2Trial-8.4.0-SNAPSHOT\tomcat\apache-tomcat-8.5.23\webapps\Thingworx\Runtime\mashup-common-widgets-runtime.js"

View solution in original post

9 REPLIES 9

Hi, the guide needs to be updated. In the later ThingWorx versions, the extensibility is revamped with widgets now being web-components.

Helge_Kosuch
6-Contributor
(To:posipova)

Thank you very much! 

 

Will the current widget extension (non-web-component) format become deprecated?

 

I cannot find any information on coding widget extensions as web-components. Any hints?

posipova
20-Turquoise
(To:posipova)

Also I apologize, I misread your question -- the built-in, out of the box widgets will not be in the old format. You can still for now use the old extension format.

Helge_Kosuch
6-Contributor
(To:posipova)

Thank you very much for the answer. 

 

One more question: I cannot (yet) implement widget extensions in the new web component format, correct?

You should be able to for 8.5

Helge_Kosuch
6-Contributor
(To:posipova)

Great! But there is no documentation about that yet, correct? 

 

Unfortunately we are in a hurry with our project. I wonder if it would be much overhead to first develop in the old format and then later convert it to the new format. It would be at least double testing effort.

 

I tried it naively like a standard non-ThingWorx web component would be defined, but unfortunately the trial version is still 8.4 and it the import produced an error. I tried to put an HTML file into the extension but that produced an error, something like "HTML" unknown file type.

 

Now I can answer my own question: You can still find all the sources in http://localhost:8080/Thingworx/Runtime/button/Common/thingworx/widgets/

 

In Chrome Dev Tools, ThingWorx 8.4:

image.png

 

Or, hidden in a much longer files: 

"C:\Program Files (x86)\ThingWorxH2Trial-8.4.0-SNAPSHOT\tomcat\apache-tomcat-8.5.23\webapps\Thingworx\Builder\mashup-common-widgets-builder.js"

"C:\Program Files (x86)\ThingWorxH2Trial-8.4.0-SNAPSHOT\tomcat\apache-tomcat-8.5.23\webapps\Thingworx\Runtime\mashup-common-widgets-runtime.js"

Top Tags