My on the fly thought on this would be have an item renderer for the repeater 
(eve though I'd go with a List for performance reasons), to override the data 
setter in your item renderer and check there if the value is valid leave the 
text alone or put it black and red if invalid. <mx:Text id="upcomingText" 
text="{upcomingRepeater.wil be wrapped the renderer class. Probably there is a 
lighter way, you cand dig a little bit into the docs ...

HTH,
Claudiu




________________________________
From: Vik <[email protected]>
To: [email protected]
Sent: Friday, February 27, 2009 11:56:18 AM
Subject: [flexcoders] Hie


Hie

My xml is like this:

<stat>
<empResults>guan completing 9 years in 6 months and 5 days.</empResults>
<empStatus>INVALID</empStatus>
</stat>
<stat>

<empResults>kumar completing 4 years in 11 months and 18 days.</empResults>
<empStatus>VALID</empStatus>
</stat>
<stat>

<empResults>kies completing 4 years in 11 months and 26 days.</empResults>
<empStatus>INVALID</empStatus>
</stat>
<stat>

<empResults>roy completing 4 years in 11 months and 26 days.</empResults>
<empStatus>VALID</empStatus>
</stat>

I want to show it in my vbox as text boxes like

guan completing 9 years in 6 months and 5 days.

kumar completing 4 years in 11 months and 18 days.

kies completing 4 years in 11 months and 26 days.

roy completing 4 years in 11 months and 26 days.


Please note color is red for those whose empStatus in INVALID.

currently my code is like:
<mx:Repeater id="upcomingRepeater" dataProvider= {<myXML>}>
<mx:Text id="upcomingText" text="{upcomingRepeater. currentItem}"/>
</mx:Repeater>

This above code shows me all in black as I have not applied this empStatus to 
format. So how to do that?



Thankx and Regards

Vik
Founder
www.sakshum. com
www.sakshum. blogspot. com

   


      

Reply via email to