I'm creating a dynamic from via a repeater that creates ComboBoxes
surrounded in FormItems on the fly. My XML looks like the following:
<combo>
<label>label name</label>
<id>id name</id>
<required>true</required>
<dataprovider>{arrARRAY}</dataprovider>
<selected>1</selected>
</combo>
<combo>
....
</combo>
I convert the XML to an XMLList (based on combo), then this XMLList to
an XMLCollection, which I in turn use in my repeater:
<mx:Repeater id="rpComboBox" dataProvider="{xmlCollection}">
<mx:FormItem label="{rpComboBox.currentItem.label}"
required="{rpComboBox.currentItem.required}">
<mx:ComboBox
dataProvider="{rpComboBox.currentItem.dataprovider}" />
</mx:FormItem>
</mx:Repeater>
The repeater works fine and creates the required ComboBoxes.
The problem I'm having is with the dataProvider of the ComboBox. The
dataprovider in my XML is an array that has been predefined with label
and data fields. Using this in a ComboBox that has been manually
created works fine, and displays as expected. However using the
method described above just causes the ComboBox to have one value of
"[object Object],[object Object], ..." and not the labels and data as
expected. I've tries using <dataprovider>arrARRAY</dataprovider>, but
this just gives me a literal value of arrARRAY, so I think {arrARRAY}
must be the right thing to pass.
I've used various different syntaxes in the repeaters combobox
dataprovider field, but have had no success!
Can anyone shed some light on how to solve this?
Thanks,
K.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/