<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use any webservice as source for combobox in editor component in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/use-any-webservice-as-source-for-combobox-in/m-p/709170#M15777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I improved a little bit my code, now I'm using a spark ComboBox that permits input by the user, the result is like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As usual the ComboBox datasource is a Web Service where you can choose the label and value field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/1437252/gisweb/creazione_civico.gif" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code for the component is here: &lt;/SPAN&gt;&lt;A href="https://gist.github.com/lukefx/10735071"&gt;https://gist.github.com/lukefx/10735071&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My new component needs this library: &lt;/SPAN&gt;&lt;A href="https://github.com/CodeCatalyst/promise-as3"&gt;https://github.com/CodeCatalyst/promise-as3&lt;/A&gt;&lt;SPAN&gt; but could be completely agnostic using HTTPService directly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2014 13:03:53 GMT</pubDate>
    <dc:creator>LucaSimone</dc:creator>
    <dc:date>2014-04-15T13:03:53Z</dc:date>
    <item>
      <title>Use any webservice as source for combobox in editor component</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/use-any-webservice-as-source-for-combobox-in/m-p/709169#M15776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi to all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I developed a simple solution to use any web service as datasource for a combobox in the editor component.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have several fields in features that refer to external ids, so I have to find a generic way to connect those data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var endpoint:String = "https://api.github.com/orgs/tirug/public_members";&amp;nbsp;&amp;nbsp; // Editor Field configuration var field:FieldInspector = new FieldInspector(); field.featureLayer = featureLayer; field.fieldName = "user_id"; // feature field field.label = "Username"; field.visible = true;&amp;nbsp;&amp;nbsp; // Setup the custom renderer var renderer:ClassFactory = new ClassFactory(CustomDataSourceComboRenderer);&amp;nbsp; renderer.properties = { labelField: "login", valueField: "id", endpoint: endpoint }; field.renderer = renderer; field.rendererIsEditor = true;&amp;nbsp;&amp;nbsp; editor.attributeInspector.fieldInspectors = [ field ]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The complete solution is here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://gist.github.com/lukefx/9230816" rel="nofollow" target="_blank"&gt;https://gist.github.com/lukefx/9230816&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Happy coding!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 14:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/use-any-webservice-as-source-for-combobox-in/m-p/709169#M15776</guid>
      <dc:creator>LucaSimone</dc:creator>
      <dc:date>2014-03-28T14:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use any webservice as source for combobox in editor component</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/use-any-webservice-as-source-for-combobox-in/m-p/709170#M15777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I improved a little bit my code, now I'm using a spark ComboBox that permits input by the user, the result is like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As usual the ComboBox datasource is a Web Service where you can choose the label and value field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="https://dl.dropboxusercontent.com/u/1437252/gisweb/creazione_civico.gif" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code for the component is here: &lt;/SPAN&gt;&lt;A href="https://gist.github.com/lukefx/10735071"&gt;https://gist.github.com/lukefx/10735071&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My new component needs this library: &lt;/SPAN&gt;&lt;A href="https://github.com/CodeCatalyst/promise-as3"&gt;https://github.com/CodeCatalyst/promise-as3&lt;/A&gt;&lt;SPAN&gt; but could be completely agnostic using HTTPService directly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 13:03:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/use-any-webservice-as-source-for-combobox-in/m-p/709170#M15777</guid>
      <dc:creator>LucaSimone</dc:creator>
      <dc:date>2014-04-15T13:03:53Z</dc:date>
    </item>
  </channel>
</rss>

