The default resultFormat is "object" which causes Flex to convert your
XML into a structure of nested dynamic objects.  You have no control
over this conversion.

 

Set resultFormat="e4x" and process the XMLList into your own
ArrayCollection.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of adrianpomilio
Sent: Tuesday, June 17, 2008 1:45 PM
To: [email protected]
Subject: [flexcoders] Issue - XML values being converted to Scientific
Notation in ArrayCollection

 

Okay, so I am bringing in a string with a value of 33E-30 for Train Id. 
A JSP is returning the following XML to Flex via an HTTPService call:
<train>
<trainId>33E-30</trainId>
</train>

The above is showing up in the ResultObject of the http service call as:
3.2999999999999997e-29

So when viewing my ArrayCollection I am not getting the string 33E-30,
which is what I want.

All other values for this XML are working correctly, unless it is some
number followed by an E (3E-4, 44E-2, etc)

It looks like Flex is treating this as some mathematical formula
instead of as a string, even though it is typed as a string. Any
ideas on how to work around this? 

I am thinking that it is happening when the xml is being returned to
Flex. 

Any ideas? 

 

Reply via email to