First, set resultFormat="e4x" in your data service tag and adjust your
dataProvider specification and labelField spec accordingly.

 

See if that fixes the problem.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Deniz Davutoglu
Sent: Wednesday, January 23, 2008 11:29 AM
To: [email protected]
Subject: [flexcoders] combo box and xml error in flex

 

Hello, I am new in flex and I try to get data from server. When it
contains just one node in xml like this
<rotaters>
<rotater>
<id>30</id>
<name>sdf sdf sd</name>
<size>120x300</size>
</rotater>
</rotaters>
it cast this error :
Error #1034: Type Coercion failed: cannot convert
mx.utils::[EMAIL PROTECTED] to mx.collections.ArrayCollection.
when data retrived from database contains more then one rotater
element it work and dont cast any error.
<rotaters>
<rotater>
<id>30</id>
<name>sdf sdf sd</name>
<size>120x300</size>
</rotater>
<rotater>
<id>42</id>
<name>dfgdfg</name>
<size></size>
</rotater>
</rotaters>

also I have problem with retrieving data from combo when I try to save
combo box label data

<mx:ComboBox width="160" x="54" y="70" enabled="true"
id="rotaterSize">
<mx:ArrayCollection>
<mx:Object label="468x60"/>
<mx:Object label="728x90"/>
<mx:Object label="120x300"/>
<mx:Object label="120x600"/>
</mx:ArrayCollection>
</mx:ComboBox>
it cant retrive value of second element(728x90) exept it all of them
are retrieved.

Thanks
Deniz

 

Reply via email to