View Single Post
  #2 (permalink)  
Old 07-24-2008, 04:45 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Repeater conditional creating ui


"vikceo" <webforumsuser@macromedia.com> wrote in message
news:g69vl8$9nk$1@forums.macromedia.com...
> Well i have a Array as a datasource say values {"A","B","C","D"}
>
> using a repeater i want to create a ui with each value in the array as a
> label
> element. this is pretty easy.
>
> but, I want to do it on the basis of some condition like say if the value
> in
> the array is "C' then i dont want to create a label for it..


Your question isn't very clear, but it sounds like you want to ignore C
completely.

If so, use an ArrayCollection instead and filter out C with a
filterFunction.

If that is not what you want to do, then just use something like this in the
label's visibility property within your itemRenderer file:

<mx: label visibility="{myProperty!='C'}" text = "{myProperty}" />

HTH;

Amy


Reply With Quote