Re: [flexcoders] Newbie alert - Trying to populate combobox w. httpservice

2007-01-14 Thread Ben Marchbanks
you have to define the labelField when binding to 
dataProvider that has no label field.

mx:ComboBox id=cbEdition  labelField=myItem 
dataProvider={
  xmlEdition.lastResult.action.item}  /

Ben Marchbanks

::: alQemy ::: transforming information into 
intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918

Mark Bjærgager wrote:
 Being a newbie at Flex2 (and AS) I am trying to populate a combobox with
 specific values from a HTTPService.
 
 The xml is retrieved and the datagrid works fine, but the combobox dont
 display the data.
 What I'd like is to have {title} as label and {edition} as value - later I
 will be using the selected value as a parameter for a new http call.
 
 Any help will be really appreciated.
 
 thanks,
 Mark
 
 Here's my code :
 ?xml version=1.0?
 !-- Simple example to demonstrate the HTTPService tag. --
 mx:Application xmlns:mx= http://www.adobe.com/2006/mxml;
creationComplete=xmlEdition.send();
mx:HTTPService
id=xmlEdition
url= http://flex2.dk/mark/xml/ddt/xmlEdition.xml;
useProxy=false
showBusyCursor=true /
mx:Panel title=DDT height=95% width=95%
paddingTop=10 paddingBottom=10 paddingLeft=10
 paddingRight=10
mx:DataGrid id=dgPosts height=50% width=75%
dataProvider={xmlEdition.lastResult.action.item}
mx:columns
mx:DataGridColumn headerText=Posts dataField=edition/
mx:DataGridColumn headerText=Date dataField=title/
/mx:columns
/mx:DataGrid
mx:ComboBox id=cbEdition dataProvider={
 xmlEdition.lastResult.action.item}  /
/mx:Panel
 /mx:Application
 


[flexcoders] Newbie alert - Trying to populate combobox w. httpservice

2007-01-12 Thread Mark Bjærgager

Being a newbie at Flex2 (and AS) I am trying to populate a combobox with
specific values from a HTTPService.

The xml is retrieved and the datagrid works fine, but the combobox dont
display the data.
What I'd like is to have {title} as label and {edition} as value - later I
will be using the selected value as a parameter for a new http call.

Any help will be really appreciated.

thanks,
Mark

Here's my code :
?xml version=1.0?
!-- Simple example to demonstrate the HTTPService tag. --
mx:Application xmlns:mx= http://www.adobe.com/2006/mxml;
   creationComplete=xmlEdition.send();
   mx:HTTPService
   id=xmlEdition
   url= http://flex2.dk/mark/xml/ddt/xmlEdition.xml;
   useProxy=false
   showBusyCursor=true /
   mx:Panel title=DDT height=95% width=95%
   paddingTop=10 paddingBottom=10 paddingLeft=10
paddingRight=10
   mx:DataGrid id=dgPosts height=50% width=75%
   dataProvider={xmlEdition.lastResult.action.item}
   mx:columns
   mx:DataGridColumn headerText=Posts dataField=edition/
   mx:DataGridColumn headerText=Date dataField=title/
   /mx:columns
   /mx:DataGrid
   mx:ComboBox id=cbEdition dataProvider={
xmlEdition.lastResult.action.item}  /
   /mx:Panel
/mx:Application