Edit Widget Questions

3972
42
09-28-2010 10:14 AM
JasonNielsen
Occasional Contributor
Is there a way to change the order of the attribute fields in the edit widget so they are not alphabetical but rather following the order they are in the xml file?

My second question is 2.0 didn't support snapping but it was mentioned that it would be something later on. Can somebody let me know when they think this would be implemented?

Thanks,

Jason
Tags (2)
0 Kudos
42 Replies
KarlWilson
Occasional Contributor III
I'm having difficulty getting this to work for 2.4.

I've copied in the code between the /*MODIFICATIONS*/ comments in hbostic's post to the basewidget_widgetConfigLoaded function within the if (configXML) statement, and added the createFieldInspectors function. I assume the rest of the EditWidget.mxml displayed was from a version previous to 2.4.

I also added the import com.esri.ags.components.supportClasses.FieldInspector; statement and added the closing slash in the </editablelayers> xml tag, as mentioned by NeoGeo.

When I run the widget I see no difference in the widgets behaviour. Can anyone who has managed to get this to work please offer some help? (jvroegop maybe?)

Cheers,
Karl

Attached is my full EditWidget.mxml
0 Kudos
BenKane
New Contributor III
Karl,
If you succeeded in compiling it with the modifications then it is all about the <fieldnames>, <fieldlabels> and <hiddenfields> tags in the xml file.  Specify the order you want the fields to display in the attribute inspector window with <fieldnames> and assign aliases in <fieldlabels> in the same order.  Any field you put in <hiddenfields> do not put in within the other two tags.  This should work, worked for me...

Ben

I'm having difficulty getting this to work for 2.4.

I've copied in the code between the /*MODIFICATIONS*/ comments in hbostic's post to the basewidget_widgetConfigLoaded function within the if (configXML) statement, and added the createFieldInspectors function. I assume the rest of the EditWidget.mxml displayed was from a version previous to 2.4.

I also added the import com.esri.ags.components.supportClasses.FieldInspector; statement and added the closing slash in the </editablelayers> xml tag, as mentioned by NeoGeo.

When I run the widget I see no difference in the widgets behaviour. Can anyone who has managed to get this to work please offer some help? (jvroegop maybe?)

Cheers,
Karl

Attached is my full EditWidget.mxml
0 Kudos
KarlWilson
Occasional Contributor III
Thanks Ben.

OK I got it working, the issue was human error on my part. I had been modifying the EditWidget.mxml of a different project to the one I was compiling. Duh.

I've updated the attachement on my previous post with the correct EditWidget.mxml.

Karl
0 Kudos
mei09
by
New Contributor II
this has been an interesting thread.

I was wondering if anyone has been able to dyamically change the fields that are availabe for editing during different stages, i.e:
1) create new features : all attribute fields are editable
2) update existing features: only some fields are editable

would appreciate if anyone could point out if this is possible and which event should be used to capture this?

thanks
mei
0 Kudos
MattGiles
New Contributor
Can somebody explain why this only works for layers type feature - using the FeatureServer rest feed. The layers that are editable in my application are type dynamic and the edit widget does not honor the field orders from the xml..
0 Kudos
HaroldBostic
Occasional Contributor II
It's just how the REST endpoint was implemented.  That way you can perform CRUD operations at a feature level or over an array of features.  If you have access to the data being published, you can simply enable feature service access when publishing your map.  Also, be sure you are using an SDE database if you want to leverage the editing capabilities.

See the specification for more detail -> http://services.arcgisonline.com/ArcGIS/SDK/REST/overview.html
0 Kudos
MattGiles
New Contributor
I am using an SDE database and I do have access to enable feature service. My problem is that i have three layers that are editable: Working Points, Working Lines, Working Polygons. These three layers need to be grouped in my TOC. Since I cant group feature services in the TOC on the flex side, I am forced to group the layers in the mxd and call the service as dynamic using the MapServer feed...
0 Kudos
by Anonymous User
Not applicable
I posted this idea a while ago but have just come across the issue again & came across this post.

Appreciate your support to getting this introduced @ the feature service level configuration.

Brad
0 Kudos
RachelS
Occasional Contributor III
Hi,
I'm new to Flex, I'm not using Flex API just the standard Flex out of the box. But I need to reorder my fields and I need to hide some fields, since I can't use the mxml code, will I be able to carry out this using just the first bit if code the above posts say to paste into the xml?
I'm using Flex 2.5 and have so far been able to edit the widget and config file to edit my dataset, but I'm now stuck on reordering fields and hiding fields.

PLease help.
Thanks
Rachel
0 Kudos
philippschnetzer
Occasional Contributor III
Rachel,

The code above requires a function be inserted into mxml...so you are out of luck using only the compiled version.  However, you may have some success if you go to properties of your layer in ArcMap and hit the Fields tab - there you can check on/off certain fields, re-order and create aliases - as far as I know the Edit widget respects those changes made in the field properties...
0 Kudos