probably a newbie question, but after looking through the 'net, still cannot find an answer... I have an XML object like this:
<questionpools>
<questionpool id="1">
<name>Sample test bank</name>
<description>This is a Sample test bank description</description>
<createdate>2010.10.10</createdate>
<moddate>2010.10.11</moddate>
<createdby>testuser</createdby>
<modby>testuser</modby>
</questionpool>
<questionpool id="2">
<name>alme</name>
<description>newpool</description>
<createdate>2010.10.31</createdate>
<moddate>2010.10.31</moddate>
<createdby>testuser</createdby>
<modby>testuser</modby>
</questionpool>
<questionpool id="9">
<name>pool_new</name>
<description>newpool</description>
<createdate>2010.10.31</createdate>
<moddate>2010.10.31</moddate>
<createdby>testuser</createdby>
<modby>testuser</modby>
</questionpool>
I load this file to an XML variable:
var poolMenuXML:XMLList = questionpoolsXML.questionpools;
poolMenu = new XMLListCollection(poolMenuXML.children());
and bind the 'name' node to a dropdown's label field
<s:DropDownList id="s_poolnumber" dataProvider="{poolMenu}" labelField="name"></s:DropDownList>
but how to add the id attribute as the 'data' field of the dropdown so when an item is selected, it returns that field?
Shall I create a custom component that uses the @id attribute as the source of the 'data' values? (I've also tried to add a node thinking that might help but unfortunately that does not work either...)
thanks peter