Select to view content in your preferred language

Using states to control editing

522
1
11-02-2011 01:03 PM
MarcGuidry
Emerging Contributor
Hi,
I'm trying to use states to turn on and off editing capabilities, and the states are changed on a button click.  Once the user clicks the button it activates the "editing" state, and the Feature Templates should appear - but they don't.
<esri:Editor id="lebuEditor"
   width="100%" height="100%"
   geometryService="{myGeometryService}"
   map="{mainMap}"
   toolbarVisible="false"
   includeIn="editing"/>

I think the problem might be that when I initially set it up, the editor feature layers stated on the application initialize.  How do I initialize when the state is changed?
protected function application_initializeHandler(event:FlexEvent):void
   {
    lebuEditor.featureLayers = [ lebuPoints, frenchPoints ];
    
   }

Does this seem right, or is it something else?  Anybody know how to get it to start when the state changes?  Thanks
Tags (2)
0 Kudos
1 Reply
MarcGuidry
Emerging Contributor
Nevermind, I figured it out using enterState event.
0 Kudos