Select to view content in your preferred language

EditWidget (Viewer for Flex 3.4) - Prepopulate fields by code ?

718
1
07-18-2013 01:35 AM
GuillaumeROUSSEL1
Deactivated User
Hi,

I use the EditWidget of a viewer for flex 3.4.

In the editor, I try to prepolutate an address field by code.

For instance :
- getting x/y of the mappoint clicked by the user => OK
- reverse geocoding for this point => OK, address is found
- affect the address to the address field (seem OK)
=> editor.attributeInspector.activeFeature.attributes["address"] = "reverse geocoding address found";

The problem is the editor is opened BEFORE reverse geocoding is finished.

The value of the address field seem correctly changed (because if I validate, the record in database own the correct address), but the field display is not filled for the user.

I try a lot of things :

- bindable var for the address
- editor.attributeInspector.activeFeature.attributes["address"] = "reverse geocoding address found";
- editor.attributeInspector.activeFeature.validateNow();
- editor.attributeInspector.activeFeature.validateProperties();
- editor.attributeInspector.activeFeature.refresh();
- editor.attributeInspector.refreshActiveFeature();
- editor.validateNow();
- ...

Unfortunately, no way to refresh the display !!!

Do you have any idea to correct this point ?

In anticipation, thank you for help !

Guillaume
Tags (2)
0 Kudos
1 Reply
GuillaumeROUSSEL1
Deactivated User
Hi,

Another solution would be to add a new icon near the address field.

After the editor windows is opened, a click on this icon would prepopulate the address field with the address found by the reverse geocoder (like the calendar icon)

According to you, is this a good solution ?

If yes, how to start ?

Thank you !

Guillaume
0 Kudos