AnsweredAssumed Answered

"No Features Selected" with Multiple Attribute Inspectors

Question asked by townofsnowflake on May 14, 2014
Latest reply on May 15, 2014 by townofsnowflake
I have a map with a single point layer for which I've assigned an Attribute Inspector with a custom "Edit Button". When the layer is clicked, the Attribute Inspector displays properly:


When the edit button is clicked, I have an "EditMode" function, which should display an Attribute Inspector. This time with editable fields. When the 2nd Attribute Inspector's info window is displayed, "No Features Selected" is displayed in the content rather than a list of editable fields. Any ideas why is this happening?


I'm using the Multiple Attribute Inspectors Sample as a guide.

Once the feature layer (globals.eventsMSL) has been added, initInfoWindow adds the Attribute Inspector to my globals.eventsMSL layer:

 function initInfoWindow(results){       console.log("in the initInfoWindow function: " +;      globals.query = new Query();   globals.eventsMSL.on("click", function(evt){    if ( {;    };     var layerInfos = [{     'featureLayer': globals.eventsMSL,     'isEditable': false,     'showAttachments': false,     'showDeleteButton':false    }]     var attInspector = new esri.dijit.AttributeInspector({     layerInfos: layerInfos    }, dojo.create("div"));     globals.query.objectIds = [evt.graphic.attributes.OBJECTID];     globals.eventsMSL.selectFeatures(globals.query, FeatureLayer.SELECTION_NEW, function(features){"");;, 240);,;                           var editButton = new Button({              label: "Edit",              "class": "editButton"             });    , attInspector.deleteBtn.domNode, "after");              editButton.on("click", function() {         editMode(features);    });         });    });   }

The "EditMode" Function should display an Attribute Inspector:
  function editMode(features){      if ( {;    }    var layerInfos = [{     'featureLayer': globals.eventsMSL,     'isEditable': true    }];      var attInspector = new esri.dijit.AttributeInspector({     layerInfos: layerInfos    }, dojo.create("div"));         var editScreenPoint = globals.evt.screenPoint;;, 185);,;      attInspector.on("delete", function(evt) {;    });     attInspector.on("attribute-change", function(evt) {        });    }