http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentation&file=00000419.htm
p.s. rtfm
On 7/7/05, Abdul Qabiz <[EMAIL PROTECTED]> wrote:
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:flexcoders@yahoogroups.com] 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/
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.