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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to render mashup in the custom widget ?

seanccc
17-Peridot

How to render mashup in the custom widget ?

Hi

 

How can I render mashup in the custom widget ?  something like the Collection widget .  But I couldn't find the client API to render a mashup by it's name .  Anyone knows it ? 

 

Regards,

Sean

1 ACCEPTED SOLUTION

Accepted Solutions
drichter
14-Alexandrite
(To:seanccc)

Hi,

 

you can look into the source code of the standard widgets when you have access to the twx-server. The formatted widget code can found in tomcatfolder (in my case /usr/share/tomcat8.5/8.5.41/webapps/Thingworx/). You can find the code for build time under Builder/mashup-common-widget-builder.js and the runtime code under Runtime/mashup-common-widget-runtime.js. Inside this you can search for TW.Runtime.Widget.mashupcontainer

 

I hope this helps a bit.

View solution in original post

6 REPLIES 6
slangley
23-Emerald II
(To:seanccc)

Hi @seanccc.

 

I'm not clear on what you're trying to do.  Can you please provide details of your use case?

 

Regards.

 

--Sharon

seanccc
17-Peridot
(To:slangley)

@slangley ,

 

I want to build a custom widget which acts as a container widget , like the contained mashup or collection which allows to put a inner mashup in it.  My widget will has a input paramter named innerMashup and it's type is Mashup,  so during runtime my widget is supposed to call a method like innerMashup.render() I assume ,  right ?   but what's  the exact API of innerMashup.render() ?   And if possible ,  It would be better if I can get the mashup paramters of the innerMashup during design time .

 

Regards,

Sean

drichter
14-Alexandrite
(To:seanccc)

Hi,

 

you can look into the source code of the standard widgets when you have access to the twx-server. The formatted widget code can found in tomcatfolder (in my case /usr/share/tomcat8.5/8.5.41/webapps/Thingworx/). You can find the code for build time under Builder/mashup-common-widget-builder.js and the runtime code under Runtime/mashup-common-widget-runtime.js. Inside this you can search for TW.Runtime.Widget.mashupcontainer

 

I hope this helps a bit.

seanccc
17-Peridot
(To:drichter)

@drichter ,

Thank you for the hint .  I'll look up the code .

 

Regards,

Sean 

slangley
23-Emerald II
(To:seanccc)

Hi @seanccc.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for participating in our community.

 

Regards.

 

--Sharon

You can also look at BMCollectionView Source code here: https://github.com/BogdanMihaiciuc/BMCollectionView which it's the parent of actual ThingWorx Collection View.

Top Tags