maqetta/maqetta — comment on commit cdbe110b5e180b47c86fe537f416324cab743de4
File: maqetta.core.client/WebContent/davinci/ui/widgets/NewFile.js line 72
By JonFerraiolo:

I don't remember everything, but I'm pretty sure it has to do with *dynamic* menu creation and attaching onclick handlers to the menu items. I tried to create a skeleton dropdownbutton without any menu items, and then have JS logic populate the menu, but as I remember I couldn't find a reliable way in Dijit to get a handle to the menu object within the dropdown button when the dropdown button is defined as part of the template. As I remember, there is no formal API to provide the menu object. The only way I could have a reliable handle to the menu was to create the menu in JS and then create the dropdownbutton in JS, passing in the handle for the menu. This is all fuzzy memories, but maybe you can pass these fuzzy memories to the Dijit people to see if it triggers any realizations.