Alex, thanks
your hint was good.
Since the id was attribute of province
xml part=
<province id="3" selected="false">Utrecht</province>

i could use [EMAIL PROTECTED]

which i think is a little odd, or a bit 'hidden' for me, how can i 
see that i can use all the attributes off a listitem.
But thanks, you pointed out the right direction. and i see Flex 
undelaying nature a little bit more clear.

By the way i started with a commodore 16, which also asked for 
compact programming.( i saw your windows remark)

Gerard
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I would use selectedItem.id
> 
>  
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of gdruiven
> Sent: Sunday, November 11, 2007 1:41 PM
> To: [email protected]
> Subject: [flexcoders] mx:List name/value pair
> 
>  
> 
> Hi , i'm new with flex an dthis list, not with actionscript and 
flash.
> 
> my problem is, i have a mx:List and it's data comes out of a xml 
which
> i get from the server.
> 
> it's a list of provinces, and they have a name and an id.
> 
> I want to send the id back to the server when someone selects a
> province.
> 
> i fill the list with dataProvider. But when i show the name of
> province, the listId.value is also the name of the province, but i
> want the value to be the id.
> 
> Is there a way to show Province name in the list, and let the 
province
> id be the value?
> that is without writing to much as3.
> without using <mx:dataProvider><mx:Object label="" data="
> /></mx:dataProvider> (also because i do not see how to fill this
> dynamicly.
> 
> Gerard Druiven
>


Reply via email to