Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I have a UI in which I have a combo box having 19 mashup names and a browse widget in which I wanted to browse the image from pc and once I selected the image, when I click on apply button I want the selected image to be set as mashup background style for selected mashup from combo.
The basic idea is to make the background of mashup as configurable.
Please give some idea on how I can achieve this.
Thanks,
Shalini V.
Solved! Go to Solution.
Hello,
Just my five cents. You can replace MediaEntity content with uploaded content programmatically:
var newContent = Things["UploadsRepository"].LoadImage({ path: uploadedPath }); Resources["EntityServices"].UpdateMediaEntity({ name: 'YourMediaEntityName', content: newContent });
But to see the changes the user will have to refresh the page (e.g. CTRL+F5) or wait for quite some time, since ThingWorx caches style definitions.
You can probably use MediaEntity's Dynamic Content capability. Unfortunately I've never worked with it myself, so I cannot provide any details on that.
/ Constantine
Hi @Constantine ,
Thanks for your response.
I have a doubt, should I create a thing in which I should be writing a service LoadImage?
Things["UploadsRepository"].LoadImage({ path: uploadedPath });
Could you please clarify this alone?
Regards,
Shalini V.