Please try the following.

<mx:Repeater id="upcomingRepeater" dataProvider="{this.myXML.stat}" >
                <mx:Text id="upcomingText"
text="{upcomingRepeater.currentItem.empResults}"
                        color="{(upcomingRepeater.currentItem.empStatus == 
'VALID') ?
0xFF0000:0x000000}"/>
</mx:Repeater>

Panhathai

--- In [email protected], Vik <vik....@...> wrote:
>
> 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