Hey Zahy,The attributeInspector works with the selected feature(s) on a feature layer. In your case you can select the newly created feature based on its object(unique) id. e.g:
protected function draw_drawEndHandler(event:DrawEvent):void
{
var featureLayer:FeatureLayer = templatePicker.selectedTemplate.featureLayer; // current featureLayer
featureLayer.addEventListener(FeatureLayerEvent.EDITS_COMPLETE,featureLayer_editsCompleteHandler); // listening for edits complete
featureLayer.applyEdits([ event.graphic ], null, null); // saving the newly created feature
}
private function featureLayer_editsCompleteHandler(event:FeatureLayerEvent):void
{
var addResult:FeatureEditResult = event.featureEditResults.addResults[0];
if (addResult.success === true)
{
var query:Query = new Query();
query.objectIds = [ addResult.objectId ];
event.featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW); // selecting the newly created feature
}
}
AttributeInspector.activeFeature property would be updated with selection complete. You could now show the infoWindow with the attributeInspector for the newly created feature.Hope that helps.