sorry about the delay in getting back to you.I edited the uncompiled version of the esearch widget in Flashbuilder.The esearch widget is massive so I wont post all of the code, as I also added other features like the ability to export my search result to a shapefile. Here I create a Drop Down List, With a list of my services for the user to choose from
<s:DropDownList id="serviceDdl" change="serviceChanged(event)">
<s:ArrayList>
<fx:Object data="Tenements" label="Tenements" url="http://xxx/arcgis/rest/services/Tenements/MapServer"/>
<fx:Object data="Drilling" label="Drilling" url="http://xxx/arcgis/rest/services/Drilling/MapServer"/>
</s:ArrayList>
</s:DropDownList>
As the DDL is changed, it calls servicechanged which calls my private function loadLayer which holds the code below
if (serviceDdl.selectedItem.data == "Drilling")
{
cboLayerText.dataProvider.removeItemAt(0);
cboLayerText.dataProvider.removeItemAt(0);
}
If Drilling service is selected then it removes the first two items of the cboLayerText combobox (Because those layers are not under the drilling service.
else if (serviceDdl.selectedItem.data == "Tenements")
{
cboLayerText.dataProvider.removeItemAt(3);
cboLayerText.dataProvider.removeItemAt(2);
}
If tenements is selected then it removes my last two layers from the combobox, because they are layers from the drilling service and not tenements servicecboLayerText is the combobox that grabs the url of the layer that is selected (which you set in the .xml config of the widget) Thus the search is done on my final selected layerI don't know if any of these concepts work in Python.