Also, you may see binding warnings, like "Unable to bind to." XML is not an
IEventDispatcher.'  This is kind of a bogus warning, the description anyway.
Fix it like this:

text="{XML(upcomingRepeater.currentItem).empResults}"

 

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of ppongtong
Sent: Friday, February 27, 2009 10:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Hie

 

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 flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
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