We’ve built custom dashboard widgets using the ThingWorx API for real-time equipment monitoring, but data binding isn’t refreshing properly. The widgets display initial data correctly, but subsequent updates don’t reflect in the UI even though the API returns fresh data.
Our widget event handling subscribes to property changes, and API data binding is configured through the Mashup Builder. When we manually trigger a refresh, nothing happens. The Mashup Builder refresh events seem disconnected from the actual data flow.
The binding works on initial load but breaks on subsequent updates. Has anyone encountered similar widget refresh issues with the API data binding mechanism?
Thanks Sarah. I checked the property definitions and both flags are set correctly. The weird part is that the dataUpdated event fires on initial load but not on subsequent updates. Could this be related to how Mashup Builder handles refresh cycles for bound properties?
I’ve seen this before. The issue is usually that the property change event isn’t being triggered correctly. When you call setProperty, make sure you’re actually changing the value reference, not just mutating the existing object. ThingWorx uses reference equality checks for change detection.
Also verify that your widget’s property definition has the correct binding configuration in the metadata. The isBindingSource and isBindingTarget flags need to be set appropriately.
This sounds like the classic widget lifecycle issue. When data updates come in, the widget needs to explicitly call updateProperty() to notify the Mashup Builder framework. Just setting internal state won’t trigger the binding refresh. Also make sure your afterRender() method isn’t preventing subsequent updates by only initializing listeners once without proper cleanup.