Select to view content in your preferred language

Attribute Inspector in Mobile Flex

713
2
07-23-2013 08:28 AM
MattSheehan
Occasional Contributor III
I'm having a bit of a brain fart. I am updating an attribute inspector with current lat/long using the following code:


for each(var updateatts:* in (list.dataProvider as ArrayList).source)
{
   
    if((updateatts as FormField).label == "Longitude")
    {
 (updateatts as FormField).feature.attributes["Longitude"] = 1.0;
 dispatchEvent(new AttributeInspectorEvent(UPDATE_FEATURE, false, (updateatts as FormField).featureLayer, (updateatts as 
         FormField).feature));
    }
}



I'd like the form (see attached) to dynamically updated with this new data. Any good suggestions?

I should add when we close the attribute inspector, then reopen the data is updated. I'd like the update to occur without the need to close the inspector window.

Thanks

--Rory
Tags (2)
0 Kudos
2 Replies
YannCabon
Esri Contributor
Hi,

Try

for each(var updateatts:FormField in (list.dataProvider as ArrayList).source)
{
    if(updateatts.label == "Longitude")
    {
 updateatts.feature.attributes["Longitude"] = 1.0;
 dispatchEvent(new AttributeInspectorEvent(UPDATE_FEATURE, false, updateatts.featureLayer, updateatts.feature));
         updateatts.dispatchEvent(new FormFieldEvent(FormFieldEvent.DATA_CHANGE));
    }
}
0 Kudos
MattSheehan
Occasional Contributor III
That worked. Thanks Yann.
0 Kudos