TileList uses a dataProvider and cellrenderers to do what you're trying
to do. So you're going to have to add a setValue() to your custom component
that assigns the dataProvider data to your component properties. Your TileList will then take the result from your service and set the
cellRenderer to your component. i.e. <mx:TileList dataProvider="{ myService.result }" width="100%“
height="100%" cellRenderer="MyComponent" itemWidth="120"
itemHeight="108"/> Then in your component do this: <mx:Script> var compProperty: Object; function setValue( str:String, item:Object ) { compProperty =item; } </mx:Script> <mx:Label text="{ compProperty.name}"/> … Rob Rusher RIA Consultant Macromedia Certified Flex Instructor e: -----Original Message----- Hi all: New to Flex 1.5, having problems understanding how to do a seemingly simple thing: populate a TileList with items created out of a HTTPService call. Help/pointers would be appreciated. I have a HTTPServer object: <mx:HTTPService id="myService".... /> I have a custom component: <custom:MyComponent myProperty1="" myProperty2=""/> I would like to build a TileList of MyComponent instances, iterating over the myService.result object to set MyComponent properties. However, I can't seem to find a way to do this. I have tried using a Repeater to handle the myService iteration, but can't find the correct syntax (if there is any) for where to nest the Repeater within the TileList. It would seem logical to try
something like: <mx:TileList ....> <mx:dataProvider> <mx:Repeater
id="r" ....>
<custom:MyComponent
myProperty="{r.currentItem.someValue}".... /> </mx:Repeater> </mx:dataProvider> </mx:TileList> but no dice; compiler complains mightily about naming nested objects. Am I even in the ballpark on this? Thoughts from the group? Thanks in advance, -E- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Filling a TileList with objects from a... Rob Rusher
- [flexcoders] Re: Filling a TileList with objects f... ehogberg
- Re: [flexcoders] Filling a TileList with objects f... Stanislav Zayarsky