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

How to render mashup in the custom widget ?

SOLVED
Highlighted
Pearl

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
Highlighted

Re: How to render mashup in the custom widget ?

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
Highlighted

Re: How to render mashup in the custom widget ?

Hi @seanccc.

 

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

 

Regards.

 

--Sharon

Highlighted

Re: How to render mashup in the custom widget ?

@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

Highlighted

Re: How to render mashup in the custom widget ?

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

Highlighted

Re: How to render mashup in the custom widget ?

@drichter ,

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

 

Regards,

Sean 

Highlighted

Re: How to render mashup in the custom widget ?

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

Highlighted

Re: How to render mashup in the custom widget ?

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

Tags (1)
Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!