Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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
Solved! Go to Solution.
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.
Hi @seanccc.
I'm not clear on what you're trying to do. Can you please provide details of your use case?
Regards.
--Sharon
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
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.
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.