Select to view content in your preferred language

Attributes are not shown in editor class when i use add action

1265
3
12-11-2011 11:50 PM
SuleymanArslan1
Deactivated User
I want to create a editing application and i am using silverlight api.
I am facing problem for some feature layers.
I am not able to update attributes after drawing geometry.
After drawing geometry on map, in EditCompleted event, attribute count return 0 on edit.Graphic.Attributes

Then i compare feature services which is working fine and which is not working.
Only difference i sow, it is not working if feature layer participating relationship class.

Is there a way to solve this problem,

Thanks,

        private void InitializeFeatureEditor()
        {
            featureEditor = this.Resources["FeatureEditor"] as Editor;
            featureEditor.Map = this.MapControl;
            featureEditor.LayerIDs = this.featureLayerIDs.ToArray();
            featureEditor.AutoSelect = widgetConfig.AutoSelect;
            featureEditor.ContinuousMode = widgetConfig.ContinuousAction;
            featureEditor.GeometryServiceUrl = widgetConfig.geometryService.RESTURL;
            featureEditor.EditCompleted += new EventHandler<Editor.EditEventArgs>(FeatureEditor_EditCompleted);

            ButtonSaveEdits.Visibility = (widgetConfig.AutoSave) ? Visibility.Collapsed : Visibility.Visible;
            ButtonAddFreehandPolygon.Visibility = (widgetConfig.UseFreehand) ? Visibility.Visible : Visibility.Collapsed;
            ButtonAddFreehandPolyline.Visibility = (widgetConfig.UseFreehand) ? Visibility.Visible : Visibility.Collapsed;
        }

        private void FeatureEditor_EditCompleted(object sender, Editor.EditEventArgs e)
        {
            if (e.Action == Editor.EditAction.Add)
            {
                Editor.Change edit = e.Edits.FirstOrDefault<Editor.Change>();
                if (!widgetConfig.AutoSave) featureEditor.Save.Execute(null);

                if (edit != null)
                {
                    FeatureLayer fLayer = edit.Layer as FeatureLayer;
                    OpenFeatureDataEditor(fLayer, edit.Graphic);
                }
            }
        }
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
Graphic.Attributes is dependent on FeatureLayer.OutFields. Be sure to set FeatureLayer.OutFields.
0 Kudos
SuleymanArslan1
Deactivated User
I already set outfields. Actually this feature class participating geometric network. Is there any limitation for editing geometric network.

Following error shown in log.

type='ERROR' code='100005' target='' methodName='GraphicFeatureServer.ApplyEdits' machine='' user='?' process='10860' thread='5552' elapsed='30.26327'>Method failed.HRESULT = 0x8004040f : This is a FACILITY_ITF error that is specific to the interface that returned this error. See the documentation of the interface that returned this error for information about this HRESULT.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I already set outfields. Actually this feature class participating geometric network. Is there any limitation for editing geometric network.



The limitations that I know for editing geometric network are:

  • the data must be versionned (see doc)

  • there is no support at the client side to manage the topology. The topology will be updated by the geodatabase at the server side (e.g. after moving a node, you will not see immediatly the impact on the connected edges, but that will be OK after saving and refreshing your data).

That being said for your issue, sorry, I have no clue:(
0 Kudos