Edit widget

This page describes an older version, please read about the latest version at:
http://resources.arcgis.com/en/help/flex-viewer/concepts/

The Edit widget is designed to make the end user editing experience simple and intuitive. It is based on the feature templates editing model - which requires ArcGIS 10. The widget enables new features to be created and existing features to be changed, through the use of feature templates. Feature templates define all the information required to create a feature: the layer where a feature will be stored, the attributes a feature is created with, and the default tool used to create that feature. When a feature is edited, the widget will know its attribute information that can be changed (including support for subtypes and domains). To snap a node to a node of another feature, press down the Ctrl key to enable snapping.

By default, each visible feature layer from the operational layers in the Viewer application is editable with the Edit widget. The widget will automatically know what types of features can be created/edited based on the layer's defined feature template. Feature layers can be made ineditable by specifying the layer name in the widget's <excludelayer> tag.

For example, if the Viewer application had the following feature layers: Homeland Security Incident Points and Homeland Security Incident Areas available as operational layers:

When the Edit widget is activated, it will enable editing of features on both feature layers:

The feature templates of each respective layer will be loaded and ready to use by the Edit widget.

Templates for different feature layers can be accessed by scrolling down the widget scroll bar.

To create a new feature:

The general workflow for creating a new feature with the Edit widget is a 3-step process:

  1. Select a feature template to add and draw the geometry (Edit dialog).
  2. Define the feature's attribute values (Attributes dialog).
  3. Optionally add attachments to the feature (Attachments dialog).

End users select a new feature to create from the template list, then click on the map to create a new feature. For line and polygon features, each single-click creates a vertex and a double-click completes the feature.

After the feature geometry is defined, the attribute values can be specified within the Attributes dialog that appears when the feature has been drawn.

Attachments can optionally be added to the new feature. Click the Show Attachments button (at the lower right corner of the Attributes dialog. The Attachments dialog will appear. An attachment can be added to the feature by clicking Choose a file to attach and browsing to the file location. Click Show Attributes to return to the Attributes dialog, then click OK to complete the new feature.

Feature attachments are stored with the feature layer data back on the server side. Learn more about feature attachments in ArcGIS Desktop help.

To edit an existing feature:

Click an existing feature in the map display, its geometry vertices will appear to enable geometric editing. TheAttributes dialog will also appear to enable attribute editing. Features can also be rotated - the axis of rotation is the feature centerpoint.

To delete an existing feature:

Select an existing feature. Click the Delete button in the Attributes dialog that appears. This will remove the feature.

Undo and Redo options:

The edit widget also provides undo and redo capabilities as part of the Web editing in the Viewer. Undo erases the last edit performed in the Viewer, reverting the edit session to an older state. Redo is the opposite; it reverts the effects of the undo action. By default, the undo/redo buttons are not displayed in the Edit widget; they must be explicitly configured to appear in the widget dialog with the <toolbarvisible> tag. These options do not appear by default to make the Web editing user experience as simple as possible for end users.

Conceptual Workflow

Requires: feature service and geometry service

Test drive the Edit widget or read its tag reference.

2/15/2012