<?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: Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847598#M10536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you want to capture an event before, durring, or after then you need to look into using dojo/aspect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jul 2015 19:14:49 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-07-03T19:14:49Z</dc:date>
    <item>
      <title>Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847597#M10535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a followup to &lt;A _jive_internal="true" href="https://community.esri.com/message/532305#532305"&gt;https://community.esri.com/message/532305#532305&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two fields using custom Dijits that are pulldowns populated from a store object.&amp;nbsp; The behavior I'd like to see is that when I change one of the pulldowns I hook onto that event and change the contents of the store for the other pulldown.&amp;nbsp; It is the same behavior you would see in ArcGIS desktop with changing a subtype and getting a new domain assigned to a field (except subtypes / domains are bugged in feature services and I want to chain together five of these fields in sequential pulldowns). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been fiddling with the onchange event of the dijit.&amp;nbsp; I can set it to be a function of my choosing.&amp;nbsp; The problem is that the viewer wants to replace the function I've assigned with the function it wants to assign as part of the out of the api. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function(){var h=g._toArray(arguments),e=c?(a||b.global)&lt;F&gt;:f;return e&amp;amp;&amp;amp;e.apply(a||this,d.concat(h))}&lt;/F&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I watch the requests being sent to the server this function is related to the applyedits method being called to write the new value to the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I'm unable to override the onchange event of the dijit, is it going to be possible to have dijits that influence each other?&amp;nbsp; Is there another potential direction I could take to achieve this behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 16:17:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847597#M10535</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2015-07-03T16:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847598#M10536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you want to capture an event before, durring, or after then you need to look into using dojo/aspect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2015 19:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847598#M10536</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-03T19:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847599#M10537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That looks exactly like what I'm looking for.&amp;nbsp; I haven't gotten it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at this sample &lt;A href="http://jsfiddle.net/phusick/d7ymY/" title="http://jsfiddle.net/phusick/d7ymY/" rel="nofollow noopener noreferrer" target="_blank"&gt;Avoiding onChange on ComboBox when chaning selection dynamically - JSFiddle&lt;/A&gt; I've blended that into my code.&amp;nbsp; The ON seems to get overwritten just like the regular onChange which I'd expect, the WATCH looks great and I may be able to get the behavior I need from it, the AFTER bombs with a "TypeError: Unable to get property 'after' of undefined or null reference".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've placed the dojo/aspect in my define block at the top of the widget, and included aspect in the function declaration of the widget.&amp;nbsp; It seems that it 'should' be fine...&amp;nbsp; Have I missed a concept somewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below is in my onOpen function of the Edit widget.&amp;nbsp; I've tried a variation of it in the getLayers sections of the code as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; this.assetCodeComboBoxDijit = new dijit.form.ComboBox({
&amp;nbsp; store:this.assetStores.codeStore
&amp;nbsp; });
 console.log(this.assetCodeComboBoxDijit);
 //this.assetCodeComboBoxDijit.on("change", function(value) { console.log("on:", value); });
 //this.assetCodeComboBoxDijit.watch("value", function(name, oldValue, newValue) {console.log("watch:", name, oldValue,newValue);});
 aspect.after(this.assetCodeComboBoxDijit, "onChange", function(duno, value) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("onChange:", value);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847599#M10537</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2021-12-12T10:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847600#M10538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With some clearer thinking my issues with aspect seem to be that it isn't in Dojo 1.6 and therefore the ArcGIS javascript api.&amp;nbsp; &lt;A href="http://dojotoolkit.org/reference-guide/1.6/dojo/aspect.html"&gt;http://dojotoolkit.org/reference-guide/1.6/dojo/aspect.html&lt;/A&gt; goes to nothing.&amp;nbsp; Without replacing anything and using a local api it looks like I can't use that.&amp;nbsp; The suggestion did lead me to the watch method which has let me build a series of five cascading Comboboxes which get their values from a rest service providing the valid values for the previously selected Combobox!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 20:01:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847600#M10538</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2015-07-10T20:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847601#M10539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I use aspect often in my code and so does esri WAB widgets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 20:42:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847601#M10539</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-10T20:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom editor field dijit, cascading pulldowns, and hooking onto the onchange event?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847602#M10540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, somewhere I've got a keyboard operator error then.&amp;nbsp; I'll give it another shot and see what I can make happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 13:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/custom-editor-field-dijit-cascading-pulldowns-and/m-p/847602#M10540</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2015-07-13T13:05:18Z</dc:date>
    </item>
  </channel>
</rss>

