cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to refresh parent page containing collection widget cells after closing a popup window?

SOLVED
Highlighted
Guest

How to refresh parent page containing collection widget cells after closing a popup window?

Hi,

I have a main mashup that contains a collection widget with some cells. Each of this cell has a button that navigates me to a popup window if clicked (using navigation function). In this case, if the user click an 'Add' button in the popup window, this will add something in the corresponding cell of the collection widget. My problem is once I click the "Add" button the cell is not updating in the main mashup unless i click on reload button on top. So I was thinking is there any way that I can refresh the main mashup on the event of the popup window close?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to refresh parent page containing collection widget cells after closing a popup window?

Hello @zaki4594,

  1. Add a session parameter, e.g. "refreshCalendar";
  2. When you close the popup, use an expression to put some value there, e.g. Math.random();
  3. On the parent mashup use refreshCalendar as an input to the "empty" validator (e.g. which always returns true). Make sure you specified "Auto evaluate", this will make it fire every time the session value changes;
  4. Finally, bind True event from the validator to whatever service you use to refresh your calendar;

I admit that it's not the most elegant approach, but it's the only one I found working reliably while solving a similar issue (was building a kanban page). By the way, at the end of the day we decided to go with a custom widget, partially because of the lack of drag-and-drop functionality, but chiefly because of performance issues (turned out that collections can be shockingly inefficient to render).

 

Regards,
Constantine

View solution in original post

2 REPLIES 2

Re: How to refresh parent page containing collection widget cells after closing a popup window?

Hi,

 

I don't know if this helps you, but please check this article: https://www.ptc.com/en/support/article?n=CS249317

 

Best regards,

Raluca Edu

Re: How to refresh parent page containing collection widget cells after closing a popup window?

Hello @zaki4594,

  1. Add a session parameter, e.g. "refreshCalendar";
  2. When you close the popup, use an expression to put some value there, e.g. Math.random();
  3. On the parent mashup use refreshCalendar as an input to the "empty" validator (e.g. which always returns true). Make sure you specified "Auto evaluate", this will make it fire every time the session value changes;
  4. Finally, bind True event from the validator to whatever service you use to refresh your calendar;

I admit that it's not the most elegant approach, but it's the only one I found working reliably while solving a similar issue (was building a kanban page). By the way, at the end of the day we decided to go with a custom widget, partially because of the lack of drag-and-drop functionality, but chiefly because of performance issues (turned out that collections can be shockingly inefficient to render).

 

Regards,
Constantine

View solution in original post

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________