Hi , I am working with Tile List which displays the product and description of it. However, I would like to display the contents in TileList based on range of values. The range of values are provided by combobox as - 0-5,6-10,etc. e.g. Display the products whose value is between 0-5 .
The dataprovider for TileList is XML. My question is, when a value in combobox is selected ( e.g. 0-5) how to manipulate the xml data so that TileList view is updated. I am thinking I should use a switch statement and write logic for each selected ID. But how to design the logic? Do I need to form a new xml object for each view ? or should I use ArrayCollection to achieve this? Here is the skeleton of my code : <?xml version="1.0" encoding="utf-8"?> <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="932" height="400" creationComplete="srv.send()"> <mx:Script> <![CDATA[ private function xmlLoaded():void { catalog = srv.lastResult.catalog; } ]]> </mx:Script> <mx:HTTPService id = "srv" url="data/catalog.xml" useProxy="false" result="xmlLoaded();" /> <mx:Model id="catalog" /> <!-- Using inline item renderer --> <mx:TileList id="ItemDisplay " rowCount="3" columnCount="3" rowHeight="150" columnWidth="150" dataProvider="{catalog.item}" width="100%" height="97%" y="0" x="0" verticalScrollPolicy="auto" visible="true"> <mx:itemRenderer> <mx:Component > <mx:VBox width="50" height="50" horizontalAlign="center" clipContent="false" verticalAlign="middle" > <mx:Image source="{'images/'+ data.image}" height="100" width="100" /> <mx:Label text="{data.name}" textDecoration="underline" fontStyle="italic" fontThickness="11" fontWeight="bold"/> </mx:VBox> </mx:Component> </mx:itemRenderer> </mx:TileList> </mx:Module> XML file : <?xml version="1.0" encoding="utf-8"?> <catalog> <item itemId="1"> <name>mug_1</name> <description>Borland cofee mug 1</description> <price>3</price> <image>mug_1.jpg</image> <category>Cofeemugs</category> <color>white</color> </item> <item itemId="2"> <name>mug_2</name> <description>Borland cofee mug 2</description> <price>3</price> <image>mug_2.jpg</image> <category>Cofeemugs</category> <color>black</color> </item> --------- -------- </catalog> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

