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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Refresh widget on data change

FS_10272716
10-Marble

Refresh widget on data change

Hello,

 

I built a mashup with a dropdown and a collection widget below.

The collection widget contains a dynamic amount of mashups (items). Those mashups have a dynamic height. Using the dropdown I can switch between objects and display the data of the currently selected object.

However, those objects all have different data and therefore the height of the mashup inside the collection widget is dynamic.

 

I am calculating the mashup height in a service and using the property CellHeightField of the collection widget I managed to make it dynamic.

 

Everytime I load the page (and the collection widget) the dynamic hight works fine.

The problem is that the widget does not rebuild/refresh when the height changes when I switch to a different object using the dropdown without reloading the page of course. So basically the new height is stored in the CellHeightField but the widget / mashup does not apply the new height and keeps using the old height.

 

When resizing the browser window the mashup rebuilds and uses the new height.

I tried location.reload() but I do not want a reload of the entire page, I just need a way to rebuild a single widget or the mashups inside.

 

Is there a way to achieve this?

Best regards

3 REPLIES 3
slangley
23-Emerald II
(To:FS_10272716)

Hi @FS_10272716.

 

You can use the Expression function by binding SelectedItemsChanged in the drop-down widget to the Evaluate option of the Expression.  When creating the Expression, add TW.location.reload() in the content and click Done:

 

 

Regards.

 

--Sharon

Hi @slangley, unfortunately it did not help. Calling TW.location.reload(); in the expression does not have any effect on the UI.

Best regards

slangley
23-Emerald II
(To:FS_10272716)

Hi @FS_10272716.

 

Can you share your mashup so we can take a look?

 

Thanks.

 

--Sharon

Top Tags