Skip to main content
7-Bedrock
November 7, 2020
Question

How to use contained mashup from custom widget

  • November 7, 2020
  • 2 replies
  • 1520 views

Hello,

 

we are using a custom widget to generate a dynamic HMI depending on the provided configuration. For this we would like to reuse some Thingworx Mashups. Our first try was to use <embed>, but this provides a very poor performance.

 

What is the correct way of adding embedding Thingworx Mashups into custom widgets? We already tried to debug the mashup-container widget, but couldn't figure out how to reuse it for us.

 

i.e. we already tried this without success:
TW.Runtime.Workspace.Mashups.Current.rootWidget.appendTo($("customContent"), prop);

2 replies

5-Regular Member
November 9, 2020


Hello @EloyHz,

 

Can you please provide a simple use case to detail this scenario ?

 

Thank you,

EloyHz7-BedrockAuthor
7-Bedrock
November 9, 2020

We are using an extension called AngularJSExtension, so we can improve the widget development times.

 

For this use case we don't want to rebuild the mashups in Angular itself. Thingworx provides the functionality to update properties by listening to a websocket. We want to use this feature, which is only available in a normal mashup. Thats why we want to embed a standard thingworx mashup into one of our Angular widgets.