Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I am writing code in order to customize my widget and, on a simple guide I'm reading, I can see there are some TW functions like TW.Runtime.Widgets but also I know TW.getStyleFromStyleDefinition or TW.purgeJqElement, TW.log.error.
Is there anywhere a list of all functions I can get from TW?
Solved! Go to Solution.
I don't think so, When I wan't to know something I dig in with the Chrome developer tools, it's a bad way to do it, as when they release new version they can change anything, but there isn't any official way of knowing it, neither an official Javascript API fro Client Side Extensions.
Sorry,
Carles.
I don't think so, When I wan't to know something I dig in with the Chrome developer tools, it's a bad way to do it, as when they release new version they can change anything, but there isn't any official way of knowing it, neither an official Javascript API fro Client Side Extensions.
Sorry,
Carles.
Mh, ok... I do the same but I hoped there was a more "official" way. Even because sometimes I realize I take a longer way to get somewhere just because I didn't know it
Another alternative is using/searching the javascript snippets provided in the service edit UI.
Hi Sajid,
If I understood well the question, Fabio was asking for UI Extensions javascript code, not server side Javascript code.
Carles.
Got it. Won't the same JavaScript APIs work for extension code as well?
Hi Sajid,
Not at all, Server Side Javascript it's executed on a Javascript engine on the Server and on server's TW Java context code. UI Javascript it's executed on client side browser Javascript engine with TW Javascript context code.
Carles
Thanks for clearing my misconception!
Even so, there are some server side Javascript codes that are not listed in snippet UI.
Hi Quan-Dung,
Again, Fabio wasn't asking for any thing related to Snippet's UI, it's not server side javascript, it's Custom UI Extension Javascript, where you don't have any help.
Best Regards,
Goodmorning;
yes, Carles is right; if I got it right Quang-Dung and Sajid are talking about, saying in a very naif way, the code you write in order to add a Service where you can get the help of snippets; am I right?
I am working on the creation of a widget so it's not on Thingworx platform; I will import it in TW leter ,when it'll be done.
Is there any best practices document around widget development?
Thanks.
This is the best I've found. If anyone has any better document, would be more than welcome
Fabio,
Those API documents at that link are the extent of our documentation for Widget services.
Meghan
The links that Fabio added are to the 6.5 documentation - this is the same link, but to the 7.0 documentation which includes the additional Widget documentation that I mentioned in my other comment. It is no longer in it's own document and has been enhanced.
The latest version of the Extension Development Guide rolled a lot of the Widget documentation into it in an effort to not have as many resources scattered across different download mediums, which is something we are still working on.
In addition to combining these docs, a significant amount of information regarding the API's available to Widgets (at both ide and runtime) was added/updated when this info got moved into the central document. Please download the latest version here and let me know if this helps you out at all or if you see gaps. The heading to look for is 'Widget API: Mashup Builder' - it should be all the way at the bottom.
The latest version of document will always be available from a link on the Eclipse Plugin Download page in the marketplace here: http://marketplace.thingworx.com/Items/eclipse-plugin-for-thingworx-extensions
I would definitely suggest downloading the newest version of that guide each time there is a release. ThingWorx has people actively working to improve our documentation in areas such as the one you point out here.
Hope this helps!
Thanks!
I'm reading this document and it's really useful