Skip to main content
6-Contributor
July 4, 2024
Solved

Trying to refresh mashup

  • July 4, 2024
  • 2 replies
  • 1569 views

 

MC_10978167_0-1720092571919.png

 

 

The above general request grid is populated using a collection widget... now when clicked on
reopen button, a pop-up window will opened like below.

MC_10978167_1-1720092685474.png

 

On close of this pop-up window I would like to

refresh the grid.

I tried by binding the "windowClosed" event of the navigate function to refresh mashup in the collection widget mashup but the grid is not getting refreshed.....

MC_10978167_2-1720092756481.png

Would like to know if their is an alternative way to refresh the grid.

2 replies

Rocko
19-Tanzanite
July 4, 2024

Maybe bind the windowClosed event to the service that populates the grid.

Or bind the "RefreshRequested" event from the mashup to that service.

6-Contributor
July 4, 2024

Lets say in mashup "A"  a collection widget is used, another mashup (let say mashup "B" : child mashup)  is used to populate the cells in the collection widget.

In mashup "B" we have a navigation function that allows for the window pop-up on button click. On closing the window pop-up I'm trying to refresh mashup "B" using window closed event but that's not working, I'm assuming its not working because its the collection widget child mashup.... I need help to re-populate the collection cells to show the latest data.

 

Rocko
19-Tanzanite
July 4, 2024

What I was trying to say it that "refresh" itself does not run any services. You have to define what refresh should do. By re-running the service (you can test this by temporarily adding a button to do so manually) you will re-get the data from the server, causing the widgets to repopulate.

 

In case your events are not propagated, you can try to use a session variable for master-child communication https://community.ptc.com/t5/ThingWorx-Developers/How-to-invoke-a-service-in-a-parent-mashup-from-child-mashup-in/m-p/935681