Update method of widget not triggered on context refresh

5
In a project in Mendix 5.21.0 I use two widgets: AssociatedRadioButtonList, and BootstrapTooltipWidget, both from Mendix. When I do a refresh on the caller of the page of a page where both widgets are placed and I use this entity in both widgets as well, all is going correct and both widgets refresh themselves. I see the update method being properly called in the console as well when adding a console log on calling of the update method. I upgraded this project to 5.21.1 and found out that the update method is only called when initializing the widget, so on first page visit, but is not called anymore when the caller of the page refreshes. So, I did an upgrade to Mx 6.1.0 as well and the issue still persists. Does anybody know what could be going wrong?
asked
2 answers
3

It is correct that the update method of widgets inside a data view is not called when the object itself is refreshed. The update method of nested widgets being called when the object was refreshed was actually a bug, introduced in 5.20.0 and fixed in 5.21.1.

The update (or applyContext) method of a widget is called when the context changes, i.e. when the widget should display another object. In this case a widget might have to re-fetch its content. An example of a situation where this happens is inside a listening data view. When the selection of the widget it listens to changes, the listening data view and its content will be passed a new context.

However when the object itself changes, the widget is only notified if it is subscribed to changes of this particular object. In this case the widget probably only needs to re-render. An example of this is a refresh triggered from a microflow after the value of an attribute is changed. See also the API used to subscribe to changes of an object.

answered
2

It might have something to do with this:

Fix data views doing a full refresh while only the rendering should be updated. (Ticket 463051)

Found in the 5.21.1 release notes

answered