I’ve got an XML file that looks like this:
<students>
<student studentID="40">
<fname>40f</fname>
<lname>40l</lname>
<email>[email protected]</email>
</student>
...
</students>
that are taken in by flex 3 like this:
<mx:XML id="students" xmlns="" source="students.xml" />
I display all the student names in a tilelist like this:
<mx:TileList dataProvider="{students.student}" columnCount="10" x="0" y="{Capabilities.screenResolutionY - 215}" itemRenderer="customItemRenderer" width="100%" height="100" verticalScrollPolicy="on" dragEnabled="true" dragMoveEnabled="true" />
I want to be able to drag/drop a student name into a list box nested in an accordion. I got it all set up to drag/drop, but when i drop the name, all of the information from <student> to </student> appears in the list box.
Anybody able to help?
Here’s my code which displays the accordions as an itemrenderer:
<mx:TileList
dataProvider="{projects.project}"
columnCount="5" x="0" y="78" width="100%" height="{Capabilities.screenResolutionY - 293}"
itemRenderer="projectRenderer"
verticalScrollPolicy="off"
dragEnabled="false" dragMoveEnabled="false" dropEnabled="false"
rollOverColor="0xffffff" selectionColor="0xffffff"
borderThickness="0" />
and here’s the itemrenderer itself:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="800" dragDrop="false" x="0" y="0">
<mx:Accordion x="0" y="0" width="100%" height="100%" borderThickness="1" borderSides="right left">
<mx:Canvas label="{data.title}" width="100%" height="100%">
<mx:Label x="0" y="0" text="{data.location} - {data.time}" width="100%" />
<mx:Label x="0" y="25" text="PR/1D" textAlign="left" />
<mx:List x="50" y="20" width="225" height="25" dropEnabled="true" />
</mx:Canvas>
</mx:Accordion>
</mx:Canvas>