Wrap your Image and Text tag in HBox inside Repeater.
 
-Ashish


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Monday, October 24, 2005 12:48 PM
To: [email protected]
Subject: [flexcoders] F2 Alpha: Repeaters and dynamic HTML text?

Full of questions today.  So using Flexbuilder 2 Alpha, I want to use a repeater to show text, and so this works fine:

 

<mx:Repeater id="CMMetricsTextRepeater"

dataProvider="{dataService.result.dashboard.categories.category}">

<mx:Image source="@Embed('assets/bullet.gif')" />

      <mx:Text text="{CMMetricsTextRepeater.currentItem.label}"/>

</mx:Repeater>

 

However, I want that bullet graphic to appear next to the text, but it doesn’t – the bullet appears, but the text that follows drops to the next line.  So, I thought I would try HTML text, but I’m not sure how to use the dynamic data of a repeater since the text is supposed to be enclosed in a CDATA tag.  For example, this does not work:

 

<mx:Repeater id="CMMetricsTextRepeater"

dataProvider="{dataService.result.dashboard.categories.category}">

        <mx:htmlText>

            <![CDATA[<img src=''/>

            {CMMetricsTextRepeater.currentItem.label}

            ]]>

        </mx:htmlText>

</mx:Repeater>

 

What happens is the {CMMetricsTextRepeater.currentItem.label} is shown literally since its in the CDATA tag. How do I use repeaters and dynamic HTML text?  Do I *have* to use Actionscript for this?  If so, how?  Thanks.

 

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


NOTICE:

This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited.



--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to