Select to view content in your preferred language

Attribute inspector no editable

1671
1
Jump to solution
09-11-2014 02:29 PM
ionarawilson1
Deactivated User

I have an application that is using the editor and the attribute inspector. I need to add a string showing the current date to a field. Everything works but after creating the feature and selecting it again I can see the string in that field in the attribute inspector but the attribute inspector is not editable anymore for that feature. Is it possible to add a string to a field and still have that feature editable in the attribute inspector? Thanks

  1. var    currDateTime:String = "" 
  2. private function drawEnd(event:DrawEvent):void 
  3.    { 
  4.     dateFormatter.formatString = 'YYYY/MM/DD HH:NN:SS';  
  5. currDateTime = String(dateFormatter.format(dtCurrent) + '.' + dtCurrent.getMilliseconds());    
  6.   
  7.    FeatureLayerstewardship.addEventListener(FeatureLayerEvent.EDI}TS_STARTING, editsStartingHandler);   
  8.          }
  9.              
  10.      private function editsStartingHandler(event:FeatureLayerEvent):void 
  11.             { 
  12.                 if (event.adds) 
  13.                 { 
  14.                      
  15.                     event.adds[0].attributes['DrawDate']  =  currDateTime; 
  16.                 } 
  17.                  
  18.              
  19.             } 
0 Kudos
1 Solution

Accepted Solutions
ionarawilson1
Deactivated User

I fixed the issue! Just create a editscomplete event and refresh the feature layer and the attribute inspector!

protected function myFeatureLayerstewardship_editsCompleteHandler(event:FeatureLayerEvent):void

    {

               

                myFeatureLayerstewardship.removeEventListener(FeatureLayerEvent.EDITS_STARTING, editsStartingHandler);

       

              myFeatureLayerstewardship.refresh();

              myEditor.attributeInspector.refresh();

}

View solution in original post

0 Kudos
1 Reply
ionarawilson1
Deactivated User

I fixed the issue! Just create a editscomplete event and refresh the feature layer and the attribute inspector!

protected function myFeatureLayerstewardship_editsCompleteHandler(event:FeatureLayerEvent):void

    {

               

                myFeatureLayerstewardship.removeEventListener(FeatureLayerEvent.EDITS_STARTING, editsStartingHandler);

       

              myFeatureLayerstewardship.refresh();

              myEditor.attributeInspector.refresh();

}

0 Kudos