Dojo FAQ: Why does RoundRectStoreList.set(“store”) not reset the data in the object?

One pretty common issue we get in the dojo-interest mailing list asks why RoundRectStoreList.set("store", store); doesn’t actually appear to be setting the store properly? That is, the data in the RoundRectStoreList doesn’t actually render the data in the new store, but instead keeps old data rendered.
An example of this error:

Here, you will see that the data in the list never actually changes, even though we’re attempting to set the store using the .set() function.

Simply put, this is because that while RoundRectStoreList does inherit from dijit/_WidgetBase, it doesn’t actually use a _setStoreAttr method to handle setting the store. Instead it implements a RoundRectStoreList.setStore(store); method, which must be used instead. This method will handle the rerendering of the list with new data.

This issue can be difficult to spot, as the syntax is correct for widgets that inherit from dijit/_WidgetBase; however, once you understand how RoundRectStoreList works under-the-hood for setting its store, this issue is easily worked around.