Select to view content in your preferred language

Mobile Flex: New Feature Add Edit to Non Edit Mode

614
2
09-06-2013 05:28 AM
MattSheehan
Deactivated User
We have an issue when adding a new feature then moving into non-edit mode, see the video below:

http://www.webmapsolutions.com/question/editquestion/editquestion.html

Just wondering what we are missing in the code?

Thx

--Matt
Tags (2)
0 Kudos
2 Replies
MikeDahm
Frequent Contributor
Are you using the Editor?

If so, You could try to set up the edit menu button to have an event handler when it is active and not active.  My mobile programs that use editing when an edit button is clicked on use this.  When the editor is clicked off I set the myEditor templatePicker selected to null, and disable the editor and call out the featurelayer isEditable = false.  I also sometimes use a separate feature layer pointed at the mapserver instead of featureserver for the infowindow.  That way the infowindow will not show editable fields.  When a selection is made, it selects both the featureserver and mapserver layer but only draws the infowindow to the mapserver uneditable layer when a feature is clicked.

myEditor.templatePicker.selectedTemplate = null;
     myEditor.enabled = false;
     editorGroup.visible = false;
     StreetTreesEdit.isEditable = false;
0 Kudos
MikeDahm
Frequent Contributor
I also use custom field inspectors for my tables.  Another way to make them show up as not editable is to use two different ItemRenderers for the field inspector.  I create custom field inspector ItemRenderers, some are editable and some are not.  When I have the editor turned off I can set the editor for the field inspector to the non-editable ItemRenderer.

Below are two different ItemRenderers for the field inspector editors that I use.   When the editor is active I can set a field inspector to use the rFST1 and when not editing I can set it to rFST2.
   
protected var rFST1:ClassFactory = new ClassFactory(fiFieldRenderer_Spinner);
protected var rFST2:ClassFactory = new ClassFactory(FieldRenderer_String_No_Edit);
0 Kudos