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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

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

zaki4594
2-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

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

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

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

Top Tags