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
- var currDateTime:String = ""
- private function drawEnd(event:DrawEvent):void
- {
- dateFormatter.formatString = 'YYYY/MM/DD HH:NN:SS';
- currDateTime = String(dateFormatter.format(dtCurrent) + '.' + dtCurrent.getMilliseconds());
- FeatureLayerstewardship.addEventListener(FeatureLayerEvent.EDI}TS_STARTING, editsStartingHandler);
- }
- private function editsStartingHandler(event:FeatureLayerEvent):void
- {
- if (event.adds)
- {
- event.adds[0].attributes['DrawDate'] = currDateTime;
- }
- }
Solved! Go to Solution.
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();
}
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();
}