Mx 5.10.0 beta: many applyContext calls on custom widget at cancel of page

I have a page with tabs, one of the tabs has the pivot table widget. When testing the application with Mx 5.10.0 beta, after clicking cancel (default cancel button), the page showed no less than four progress indicators, which do not disappear. I checked the browser log, the widget received: applyContext applyContext callback on subscribe to context object change applyContext applyContext applyContext uninitialize I changed the widget to deal with this so the progress indicators are gone. However, this is a bit too much. It also makes closing the page take longer. I checked with 5.9.1, the widget receives upon cancel of the page: suspend callback on subscribe to context object change, I suppose this is the rollback I will change my widgets to ignore other events while the widget is suspended. Edit: the suspend/resume is also called when a button is clicked. So I cannot use that to detect a close of the page. Makes it even more important to reduce the number of events fired at the widget. I hope that 5.10 final behaves the same as 5.9.1 does now.
3 answers

Thank you for your feedback. We'd like to investigate this issue as soon as possible.

Could you create a ticket for us and include a test project? If you could mention the ticket number here, we can investigate the issue.


After clicking on a cancel button, the containing form is first suspended to prevent triggering any object notifications on its widgets. Second, it calls rollback on the form, which notifies all subscribed dataviews. A dataview knows which object it's displaying and asks the server to do a rollback on that particular object.

After receiving an answer from the server, the object is changed and an object notification is sent out to all subscribers, including other dataviews displaying that object. Dataviews using the object as the root of a reference also get this notification. This notification ultimately triggers a call to refresh() for dataviews which in turn calls applyContext() if the dataview isn't suspended.

Please note that object notifications and rollback events use different mechanisms.

The suspend / resume mechanism is broken in the 5.10 beta. Because of this, applyContext() is always called by every dataview listening to object notifications. Since every tab implicitly creates a dataview, quite a few calls to applyContext() are made. The reason that you do get these updates in a dataview using an association is that the object being rolled back is the root object of the association.


Hi Marcel,

Thanks for the feedback! We are looking into it.