Hi to all,I developed a simple solution to use any web service as datasource for a combobox in the editor component.We have several fields in features that refer to external ids, so I have to find a generic way to connect those data.So my solution is to build programmatically the editor fields and with my custom IFieldRenderer propose a combobox with the label instead of the id.There are 3 variables, the endpoint that is the webservice. The labelField that is the field from the webservice to use as label and valueField that is the value to save inside the feature.Example:var endpoint:String = "https://api.github.com/orgs/tirug/public_members"; // Editor Field configuration var field:FieldInspector = new FieldInspector(); field.featureLayer = featureLayer; field.fieldName = "user_id"; // feature field field.label = "Username"; field.visible = true; // Setup the custom renderer var renderer:ClassFactory = new ClassFactory(CustomDataSourceComboRenderer); renderer.properties = { labelField: "login", valueField: "id", endpoint: endpoint }; field.renderer = renderer; field.rendererIsEditor = true; editor.attributeInspector.fieldInspectors = [ field ]
The complete solution is here:https://gist.github.com/lukefx/9230816Happy coding!