I'm attempting to enable popups on layers in an ArcGISDynamicMapServiceLayer programmatically. Ultimately I'd like to move this code into the LocalLayer widget. I've gotten something working for feature layers, but I'm struggling a bit on layers within MapServices. I'm digging into LayerInfoForDefaultService.js now and am trying to figure out the path.
It looks like you can't call enablepopup() on those layers until they have infotemplates loaded. I'm going to try including an infotemplate in the locallayer configuration. I'm hunting through the code that is called when I hit the dropdown for the layer for the first time (it appears to populate the info template at that time if it's blank).