Hey.. Thanks again for responding.
Yeah..I was wondering why I could not find the properties in combobox. But, I think I get now. Kshama On Fri, May 8, 2009 at 3:11 PM, Ravi Mishra <[email protected]> wrote: > > Hi Kshama, > > I think u understood it wrong. RangeStart and RangeEnd are not > attribute from comboboxes rather i said that the items in your > combobox should be like that. > > I meant the items in comboBox should have some fields like: > > Label (0-5 or 6-10....) > RangeStart(0 or 6 ....) > RangeEnd(5 or 10 .....) > > I hope i made myself clearer this time. > > And there is no difference if u are using XMLListCollection or > ArrayCollection. > > HTH, > > -Ravi > > On May 8, 7:13 pm, Kshama Pawar <[email protected]> wrote: > > Hi Ravi, > > > > Thanks for the response. > > > > I have not yet come across Rangestart and RangeEnd in Combobox. I am > > assuming they are its attributes ( just like id).Anyways, I will research > > further on that. > > > > Instead of ArrayCollection, I have been thinking of using XMLList > > collection. Would that make significant difference. > > > > Kshama > > > > On Fri, May 8, 2009 at 9:13 AM, Ravi Mishra <[email protected]> > wrote: > > > > > Hi Kshama, > > > > > The comboBox items should be some objects with following fields: > > > > > 1. Label, > > > 2. RangeStart, > > > 3. RangeEnd > > > > > And set the result format of HTTPService to object. Collect the result > > > of HTTPService in an ArrayCollection which is bindable. > > > > > Then finally write a filterFuntion for the arrayCollection. Filter > > > function should be something like this: > > > > > private function filterFun(item:Object):boolean{ > > > if(item.itemId >= comboBox.selectedItem.RangeStart && item.itemId <= > > > comboBox.selectedItem.RangeEnd){ > > > return true; > > > } > > > return false; > > > } > > > > > then assing this filter function to the filterFunction property of > > > arrayCollection. > > > > > HTH, > > > > > -Ravi > > > > > On May 8, 3:42 am, "[email protected]" <[email protected]> > > > wrote: > > > > 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 -~----------~----~----~----~------~----~------~--~---

