AnsweredAssumed Answered

Setting InfoWindow content disables Editor Widget attributes display

Question asked by bb1769 on Apr 10, 2013
Latest reply on Nov 24, 2014 by Admin14
I'm having the same issue this user posted about a year ago, which apparently didn't get a resolution:
http://forums.arcgis.com/threads/56331-Custom-infoTemplate-conflicts-with-default-editor-widget-infoTemplate

My application has both an editor widget and a custom identify tool. The identify uses the standard map.infoWindow.setContent() to display the information about features clicked. The application uses the Popup dijit for the InfoWindow.

If I only interact with the editor widget in displaying/editing attributes, it works fine. However if I use the identify tool to display information in the infoWindow, and then go back to the editor to select and display attributes, the infoWindow still shows the content last set by the identify tool. Oddly enough, the infowindow's title does get set properly - but not the content.

I used Chrome debugger's pretty-print function and it appears that the editor widget calls _onEditFeature when displaying the attributes. I see that function calls infoWindow.setTitle, but not .setContent. I know that if I don't use the identify and go to edit different features, the infoWindow content does get updated with each feature's attributes. So I suspect the code is calling individual elements within the form that it has created, but of course that form no longer exists if another tool has replaced the infoWindow contents. In any event, it seems that this is a problem for any application that uses the editor widget and any other function with the InfoWindow.

I'm going to try to do a destroy on the editor whenever the identify tool is used (then recreate when reopening the editor), but that is either going to introduce dependencies I don't want or more complex code. If anyone has a better solution please share.

BTW I haven't worked for Esri for over 4 years, but haven't been able to get the Forum folks to remove the icon from my posts!

Outcomes