Martin,
What I do on my site is in the Search widget.js I publish the search widgets results like this:
_onSelectResult: function(e) {
....
this.publishData({
'selectResult': e
});
this.publishData({
'target': 'eSearch',
'feature': result.feature
});
},
Then in the eSearch:
onReceiveData: function(widgetName, WidgetId, data){
if(data.message && data.message === "Deactivate_DrawTool"){
this.drawBox.deactivate();
}
if(data && data.target && data.target === 'eSearch'){
if(data.feature.geometry.type === "polygon"){
this.search(data.feature.geometry.getCentroid(), 0);
}else{
this.search(data.feature.geometry, 0);
}
}
},