Hi Rajesh, id should be string following rules for a variable name(should not start with numbers, should not contain some special chars except $ etc). You can not pass a binding expression there.
Why do you want to assign a dynamic id? Since you are using repeater to generate ViewStack, you know the order of ViewStacks and you can always refer by their index? -abdul -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rajesh Jayabalan Sent: Thursday, July 07, 2005 4:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] using Repeater Hi, when I try to use the value from repeator for a viewstack id I get a "id '{rp.currentItem.mrcName}' is not a valid identifier" error. I am trying to create viewstack with dynamic ids and pass the id to a function. Here is my code. Rajesh J <mx:Panel id="main" title="Services" width="65%" height="100%"> <mx:Accordion id="accordion" width="100%" height="100%"> <mx:Repeater id="rp" dataProvider="{getMRC.result.mrcategories.mrcategory}"> <mx:VBox label="{rp.currentItem.mrcName}" creationComplete="getItems(event.target.getRepeaterItem().mrcid)" width="100%" height="100%"> <mx:ViewStack id="{rp.currentItem.mrcName}" changeEffect="Fade" width="100%" height="100%"> <ThumbnailView id="thumbView" label="Product Catalog" dataObject="{getCatItems.result.catalog.product}" change="selectedItem=event.target.selectedItem"/> </mx:ViewStack> <mx:ControlBar height="50"> <mx:HBox horizontalGap="0"> <mx:Image source="{currentView=='thumb'?thumbOn:thumbOff}" mouseDown="changeView('thumb',event.target.getRepeaterItem().mrcName)" mouseOver="event.target.source=thumbRoll" mouseOut="event.target.source=currentView=='thumb'?thumbOn:thumbOff"/> <mx:Image source="{currentView=='grid'?listOn:listOff}" mouseDown="changeView('grid',event.target.getRepeaterItem().mrcName)" mouseOver="event.target.source=listRoll" mouseOut="event.target.source=currentView=='grid'?listOn:listOff"/> </mx:HBox> </mx:ControlBar> </mx:VBox> </mx:Repeater> </mx:Accordion> </mx:Panel> -- 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 -- 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/