<?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: Preventing applyEdits() after edition using Editor in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21209#M469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found a way to prevent applyedits from being called. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I added to the feature layer a listener on the editsStarting event (a FeatureLayerEvent). When the event is fired, I call the preventDefault() method which prevents applyEdits().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But before that I need to recover all the updates that were performed by the user. So I created a FeatureLayerEvent (named myEvent), pointing on my feature layer, and in which I store all the updates of the fired event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
protected function featureLayer_editsStarting(event:FeatureLayerEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i:uint; i&amp;lt;event.updates.length; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myEvent.updates.push(event.updates&lt;I&gt;);&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; event.preventDefault(); 
&amp;nbsp;&amp;nbsp; }
&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then when the user clicks on the appropriate button, applyEdits method is called:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
protected function validerIti_clickHandler():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; myEvent.featureLayer.applyEdits(null, myEvent.updates, null);
&amp;nbsp;&amp;nbsp;&amp;nbsp; myEvent.updates = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that when the user clicks on the button to launch applyEdits, the application crashes and the flash editor with it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:51:47 GMT</pubDate>
    <dc:creator>ab1</dc:creator>
    <dc:date>2021-12-10T20:51:47Z</dc:date>
    <item>
      <title>Preventing applyEdits() after edition using Editor</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21208#M468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a feature layer whose geometry is manually edited by the user, using the Editor object. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to prevent the Editor from calling the applyEdits() method, after a feature geometry is edited by the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to give to the user the option of applying his edits by clicking on a button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to prevent the Editor from calling applyEdits() method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2013 08:22:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21208#M468</guid>
      <dc:creator>ab1</dc:creator>
      <dc:date>2013-01-29T08:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Preventing applyEdits() after edition using Editor</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21209#M469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found a way to prevent applyedits from being called. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I added to the feature layer a listener on the editsStarting event (a FeatureLayerEvent). When the event is fired, I call the preventDefault() method which prevents applyEdits().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But before that I need to recover all the updates that were performed by the user. So I created a FeatureLayerEvent (named myEvent), pointing on my feature layer, and in which I store all the updates of the fired event:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
protected function featureLayer_editsStarting(event:FeatureLayerEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i:uint; i&amp;lt;event.updates.length; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myEvent.updates.push(event.updates&lt;I&gt;);&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; event.preventDefault(); 
&amp;nbsp;&amp;nbsp; }
&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then when the user clicks on the appropriate button, applyEdits method is called:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
protected function validerIti_clickHandler():void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; myEvent.featureLayer.applyEdits(null, myEvent.updates, null);
&amp;nbsp;&amp;nbsp;&amp;nbsp; myEvent.updates = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that when the user clicks on the button to launch applyEdits, the application crashes and the flash editor with it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:51:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21209#M469</guid>
      <dc:creator>ab1</dc:creator>
      <dc:date>2021-12-10T20:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Preventing applyEdits() after edition using Editor</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21210#M470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you tell me&amp;nbsp; how to create the myEvent event? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, this is great!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2014 20:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/preventing-applyedits-after-edition-using-editor/m-p/21210#M470</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2014-02-07T20:56:07Z</dc:date>
    </item>
  </channel>
</rss>

