<?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: Editor updates geometry regardless of updateGeometryEnabled=false in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272402#M6370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have come up with a workaround to this issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works for my paticular case as I only need to deal with one feature at a time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This workaround acts like a toggle to show/close the AttributeInpector window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click once on the feature and thefeature will be selected and have the AttributeInpector shown. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click a second time on the feature and the feature will be de-selected and the AttributeInpector will close.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//add listeners when the editor component is created.
editor.attributeInspector.addEventListener(AttributeInspectorEvent.SHOW_FEATURE,attribute_showHandler);
map.infoWindow.addEventListener(Event.CLOSE,attribute_closeHandler);

/**
 * Removes listener from the attributeInspector's activeFeature.
 */
protected function attribute_closeHandler(event:Event):void
{
 if (editor.attributeInspector.activeFeature)
 {
&amp;nbsp; editor.attributeInspector.activeFeature.removeEventListener(MouseEvent.CLICK,attributeFeature_clickHandler);
 }
}

/**
 * Adds listener to the attributeInspector's activeFeature.
 */
protected function attribute_showHandler(event:AttributeInspectorEvent):void
{
 event.feature.addEventListener(MouseEvent.CLICK,attributeFeature_clickHandler);
}

/**
 * Clears the FeatureLayers selection. Clearing the selection will also trigger the attribute_closeHandler.
 * Workaround to prevent the user moving the features vertices or moving the entire feature.
 * Without this, the feature will show vertice's on the second click, and the entire graphic will be able to be moved on the third click, 
 * even with editor.updateGeometryEnabled="false".
 */
protected function attributeFeature_clickHandler(event:MouseEvent):void
{
 featureLayer.clearSelection();
}

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:18:07 GMT</pubDate>
    <dc:creator>MarkHoyland</dc:creator>
    <dc:date>2021-12-11T13:18:07Z</dc:date>
    <item>
      <title>Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272401#M6369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am finding some interesting things with the Editor component.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Editor updates geometry regardless of updateGeometryEnabled=false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All I want to do is edit attributes as part of a workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I click a feature once and the attribute window opens as expected, click it a second time I can the move the vertices, click a third time I can move the entire feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas why this is happening? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to take advantage of the Editor components undo and redo feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:esri="http://www.esri.com/2008/ags"&amp;gt;
 
 &amp;lt;fx:Script&amp;gt;
&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp; import com.esri.ags.layers.FeatureLayer;
&amp;nbsp;&amp;nbsp; import com.esri.ags.tools.EditTool;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; import mx.events.FlexEvent;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; protected function editor_creationCompleteHandler(event:FlexEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var editTool:EditTool = editor.editTool;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editTool.allowAddVertices = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editTool.allowDeleteVertices = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.templatePicker.visible = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.templatePicker.includeInLayout = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.selectionDropDownList.visible = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.selectionDropDownList.includeInLayout = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.deleteButton.visible = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.deleteButton.includeInLayout = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.drawDropDownList.visible = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.drawDropDownList.includeInLayout = false;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; ]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;
 
 &amp;lt;esri:Map id="map"&amp;gt;
&amp;nbsp; &amp;lt;esri:extent&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:WebMercatorExtent minlon="-97.53" minlat="37.43" maxlon="-97.26" maxlat="37.64"/&amp;gt;
&amp;nbsp; &amp;lt;/esri:extent&amp;gt;
&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/&amp;gt;
&amp;nbsp; &amp;lt;esri:ArcGISDynamicMapServiceLayer id="opsLayer" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSFields/MapServer"/&amp;gt;
&amp;nbsp; &amp;lt;esri:FeatureLayer id="featureLayer"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode="selection"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields="[activeprod, field_name, polydate, status, prod_oil]"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSFields/FeatureServer/0"/&amp;gt;
 &amp;lt;/esri:Map&amp;gt;
 &amp;lt;s:BorderContainer x="55" y="10"&amp;nbsp; &amp;gt;
&amp;nbsp; &amp;lt;esri:Editor id="editor" width="300" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addEnabled="false"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deleteEnabled="false"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateAttributesEnabled="true" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateGeometryEnabled="false"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; creationComplete="editor_creationCompleteHandler(event)" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayers="{[featureLayer]}" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map="{map}" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; toolbarCutVisible="true" toolbarMergeVisible="true" toolbarReshapeVisible="false" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; toolbarVisible="true"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 &amp;lt;/s:BorderContainer&amp;gt;
&amp;lt;/s:Application&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 04:20:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272401#M6369</guid>
      <dc:creator>MarkHoyland</dc:creator>
      <dc:date>2012-01-10T04:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272402#M6370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have come up with a workaround to this issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works for my paticular case as I only need to deal with one feature at a time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This workaround acts like a toggle to show/close the AttributeInpector window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click once on the feature and thefeature will be selected and have the AttributeInpector shown. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Click a second time on the feature and the feature will be de-selected and the AttributeInpector will close.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//add listeners when the editor component is created.
editor.attributeInspector.addEventListener(AttributeInspectorEvent.SHOW_FEATURE,attribute_showHandler);
map.infoWindow.addEventListener(Event.CLOSE,attribute_closeHandler);

/**
 * Removes listener from the attributeInspector's activeFeature.
 */
protected function attribute_closeHandler(event:Event):void
{
 if (editor.attributeInspector.activeFeature)
 {
&amp;nbsp; editor.attributeInspector.activeFeature.removeEventListener(MouseEvent.CLICK,attributeFeature_clickHandler);
 }
}

/**
 * Adds listener to the attributeInspector's activeFeature.
 */
protected function attribute_showHandler(event:AttributeInspectorEvent):void
{
 event.feature.addEventListener(MouseEvent.CLICK,attributeFeature_clickHandler);
}

/**
 * Clears the FeatureLayers selection. Clearing the selection will also trigger the attribute_closeHandler.
 * Workaround to prevent the user moving the features vertices or moving the entire feature.
 * Without this, the feature will show vertice's on the second click, and the entire graphic will be able to be moved on the third click, 
 * even with editor.updateGeometryEnabled="false".
 */
protected function attributeFeature_clickHandler(event:MouseEvent):void
{
 featureLayer.clearSelection();
}

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272402#M6370</guid>
      <dc:creator>MarkHoyland</dc:creator>
      <dc:date>2021-12-11T13:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272403#M6371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am looking to incorporate your code into my edit widget but can't figure out where the code should be placed. Can you please give me some direction?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 20:46:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272403#M6371</guid>
      <dc:creator>PatrickMullen1</dc:creator>
      <dc:date>2012-01-12T20:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272404#M6372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Patrick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The code I added was a quick workaraound but not entirely foolproof. If th euser qwuiclky double or triple clicks a selected feature, the vertice's and move handles would still come up. Plus I had some extra requirements oustside of the attribute Inspector that was giving me some grief.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have come up with a different solution by extending the Editor component. I am in the testing phase at the moment and will post here when finished.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending on your requirements it may be a better solution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What exactly are you trying to achieve. What is your workflow or use case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you able post your widget code I can have a look at what you need.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 19:14:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272404#M6372</guid>
      <dc:creator>MarkHoyland</dc:creator>
      <dc:date>2012-01-13T19:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272405#M6373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply Mark.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workflow is quite simple. I have a feature class that holds property management data. Due to the ever changing nature of the data and how it comes from multiple sources within the organization, I thought having an editable layer on the flexviewer would offer a quick way to access and edit the data. But I do not want users to be able to edit the geometries of the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was looking for something like this. &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html#/Attribute_Inspector_edit/01nq0000005z000000/"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html#/Attribute_Inspector_edit/01nq0000005z000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have this working but not sure how to implement the search widget inside of that application because the edit feature would be useless if users cant easily locate the property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So very simply, I just need to disable updating geometries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 18:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272405#M6373</guid>
      <dc:creator>PatrickMullen1</dc:creator>
      <dc:date>2012-01-16T18:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272406#M6374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick workaround but it is strange !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i use the FLEX API agslib-2.5-2011-11-30.swc and Editor updates geometry regardless of &lt;/SPAN&gt;&lt;SPAN style="font-family:Arial Black;"&gt;updateGeometryEnabled=false&lt;/SPAN&gt;&lt;SPAN&gt; !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have tested the edit widget of the Flexviewer 2.5 with updategeometry="false" in the configXML and it's work fine while the logic is the same as previously !!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT WIDGET CODE :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //updateGeometry
&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; if (configXML.updategeometry.length() &amp;gt; 0)
&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;&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; updateGeometry = configXML.updategeometry == "true";
&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;SPAN style="font-family:Arial Black;"&gt;editor.updateGeometryEnabled = updateGeometry&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272406#M6374</guid>
      <dc:creator>aureliensebert</dc:creator>
      <dc:date>2021-12-11T13:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Editor updates geometry regardless of updateGeometryEnabled=false</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272407#M6375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think its a bug in FlexViewer 2.5 and it seems to be working in 3.0 API&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2012 04:51:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/editor-updates-geometry-regardless-of/m-p/272407#M6375</guid>
      <dc:creator>PriyaRam</dc:creator>
      <dc:date>2012-09-09T04:51:09Z</dc:date>
    </item>
  </channel>
</rss>

