Thanks Ralf

 

Can you elaborate a bit more please

 

How can I set a property of the button called "topicId". My 

 

I tried the following but it doesn't work

 

<mx:Repeater id="linkrep" dataProvider="{this.helpRelatedData}">


                                                <mx:LinkButton
topicId='linkrep.currentItem.topicId' label='{linkrep.currentItem.title}'
click="displayHelpTopic(topicId)"  color="#0000ff"/>

                 </mx:Repeater>

 

 

topicId is a property of my arrayCollection that is the dataprovider of the
repeater

 

helpRelatedData.addItem({topicId:id, title:title});

 

Thanks

 

Paul

 

 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ralf Bokelberg
Sent: 30 September 2007 11:46
To: [email protected]
Subject: [SPAM] Re: [flexcoders] Passing a property of repeater item

 

That is because the click is executed long after the repeater has done its
work. 
You need to pass in a property of the button itself to displayHelpTopic, eg.
the label. 
Cheers
Ralf. 



On 9/30/07, Paul Steven <[EMAIL PROTECTED]> wrote:

I can't figure out how to pass a property of a repeater item to a function

This is what I am trying but it is not working

<mx:Repeater id="linkrep" dataProvider="{this.helpRelatedData}"> 

<mx:LinkButton label='{linkrep.currentItem.title}'
click="displayHelpTopic(linkrep.currentItem.title)" color="#0000ff"/>

</mx:Repeater> 

Basically I want to pass the value linkrep.currentItem.title but what I have
tried above does not work.

Anyone suggest how I can do this.

The label is displaying correctly.

Thanks in advance

Paul




-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35 

 

Reply via email to