Skip to main content
1-Visitor
November 19, 2015
Question

How to enable user customizable (drag & drop) UI widgets on a runtime mashup?

  • November 19, 2015
  • 2 replies
  • 4900 views

Hi - had a customer ask if a runtime mashup UI could be created to enable drag & drop UI widgets of their choice (already wired up at design time) to create their own dashboard layout and save it as a personalised view. Obviously this is what is possible at design time, but in this use-case a standard non technical user wants to personalise their dashboard UI view.

Any ideas folks? Has anyone done this in their solution?

2 replies

1-Visitor
November 27, 2015

This is possible. We have a couple of widgets that support drag and drop ​within the widget. ​We used JQuery .on() to attach the appropriate handlers for 'dragstart' and 'drop' to the elements we wanted and it worked fine. We did have trouble using the .draggable() method, but since that didn't give us anything much superior to the .on() approach we didn't pursue it. We haven't tried dragging between widgets.

1-Visitor
August 23, 2017

Hi David/AnyOne,


Could you please help me, how to implement that feature in our widget.

I am very new on thingworx platform.

I am creating an application and i have a requirement for a widget which has some functionality at run time.

I just wanted to bind data to that widget in composer and placed at one position and when i go to run our application Drag that Widget and placed at our choice and save that widget location.

i have already posted as a new post, link is given  How to Create Drag-able UI Widget at Run Time ?

i have already followed lot's of document but stuck at this point.

If any one have some idea around this Please help me from scratch (step wise step) and share screenshot.

Thanks,

Ram Avadh Maurya

1-Visitor
December 8, 2015

Andrew, what you want to use is a "Dashboard". This is a widget on your mashup. It enables the exact same features you have described. More information on how to use it can be found on ThingWorx documentation.

aleckie1-VisitorAuthor
1-Visitor
December 8, 2015

Hi Tiago, thanks for the heads-up on the Dashboard widget use. Unfortunately, there is scant guidance on the PTC TW support help file content on how to use the Dashboard widget, or do things like persist a specific user's sub-layout in a Dashboard. It seems to show it allows a user to add gadgets - from the standard design-time gadget palette? How would these be exposed at runtime only?

1-Visitor
December 10, 2015

Andrew, users can only add gadgets during runtime. They can only add gadgets that you make available to them on a Gadget Library. They can not add widgets from the design-time palette. The Gadget Library is just another mashup that gets added to the Dashboard using the Dashboard property "MashupToAddGadget".