Thank you Karl,
number 1 worked! thanks! :)

about number 2

considering the code:

<mx:XMLList xmlns="" id="listSource">
              <root>
                      <site name="betanews" url="www.betanews.com"/>
                      <site name="dzone" url="www.dzone.com"/>
              </root>
</mx:XMLList>

<mx:List id="siteList" x="10" y="10" dataProvider="{listSource.site}"
labelField="name"/>

I want the click event of the "siteList" to show an Alert with the value of
the "url" attribute of the selected "site" item

can you help me?

thanks in advance

On 2/23/07, Karl Johnson <[EMAIL PROTECTED]> wrote:

   Hi André,

Change your labelField property to be labelField="@name" Because you are
pulling the value from an XML attribute you need to designate it as such
using @ before the property name.

What do you mean you want to return the URL attribute? You want to display
it? Please be more specific about number 2.

Karl

Cynergy

------------------------------
*From:* flexcoders@yahoogroups.com on behalf of André Rodrigues Pena
*Sent:* Fri 2/23/2007 10:01 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Two simple List questions

  Hi all,

I got 2 doubts.

1) I want to populate a List control

so I did

<mx:XMLList xmlns="" id="listSource">
<root>
<site name="betanews" url="www.betanews.com"/>
<site name="dzone" url="www.dzone.com"/>
</root>
</mx:XMLList>

<mx:List id="siteList" x="10" y="10" dataProvider="{listSource.site}"
labelField="name"/>

That's what I understood from the documentation. But it doens't work

Can anybody tell me why?

2) I want to return the "url" attribute from the "site" item. I'm
trying but I'm not getting to do this

THANKS

--
André Rodrigues Pena




--
André Rodrigues Pena

LOCUS
www.locus.com.br

Blog
www.techbreak.org

Reply via email to