Here is my sample XML for an XML document that consists of metadata about print templates:
<TemplateList>
<PaperSizeTemplates PaperSize="8.5x14">
<Template>Letter ANSI A Landscape</Template>
<Template>Letter ANSI A Portrait</Template>
</PaperSizeTemplates>
<PaperSizeTemplates PaperSize="A3_11.5x16">
<Template>A3 Landscape</Template>
<Template>A3 Portrait</Template>
</PaperSizeTemplates>
<PaperSizeTemplates PaperSize="A4_8.5x11">
<Template>A4 Portrait Custom</Template>
<Template>A4 Portrait Custom1</Template>
<Template>A4 Portrait Custom2</Template>
</PaperSizeTemplates>
</TemplateList>
I have a spark DropDownList whose dataProvider I want to set such that the PaperSize attribute values for all PaperSizeTemplates elements display in the DropDownList.
For example, for the XML shown above, I want my DropDownList to display the following:
8.5x14
A3_11.5x16
A4_8.5x11
I tried the following:
<s:DropDownList id="paperSizeDDL" dataProvider="{_layoutTemplatesXML.paperSizeTemplates.paperSize as XMLListCollection}" />
but nothing appears in the drop down list.
Help on this would be greatly appreciated.
Please provide the correct way to do this using data binding and my example XML.
Thanks!