Here’s the working code:

<?xml version="1.0" encoding="utf-8"?>

 

<mx:Application initialize="ProductSvc.send()" xmlns:mx="http://www.macromedia.com/2003/mxml" verticalGap="20">

 

    <mx:HTTPService id="ProductSvc" url="">

        <mx:request>

            <StoreId>{store.selectedItem.data}</StoreId>

        </mx:request>

    </mx:HTTPService>

 

    <mx:HBox id="b1">

        <mx:Label text="Select a Store:"/>

                                    <mx:ComboBox id="store">  

                                                <mx:dataProvider>

                                                            <mx:Array>

                                                         <mx:Object label="Natural Comfort Footwear Inc." data="" />

                                                         <mx:Object label="Waterside Shops" data="" />

                                                         <mx:Object label="Citrus Park Town Center" data="" />

                                                         <mx:Object label="855" data="" />

                                                         <mx:Object label="St. Armonds" data="" />

                                                         <mx:Object label="Tierra Verde" data="" />

                                                         <mx:Object label="Northwood Plaza" data="" />

                                                         <mx:Object label="Tyrone Sq Mall" data="" />

                                                         <mx:Object label="Bell Tower Shops" data="" />

                                                         <mx:Object label="Johns Pass" data="" />

                                                            </mx:Array>

                                                </mx:dataProvider>

                                    </mx:ComboBox>

        <mx:Button label="Get Store Inventory List" click="ProductSvc.send();"/>

 

    </mx:HBox>

 

    <mx:DataGrid id="dgInvList" dataProvider="{ProductSvc.result.products.product}" width="100%" height="100%">

        <mx:columns>

            <mx:Array>

                <mx:DataGridColumn columnName="ProductId" headerText="Product Id"/>

                <mx:DataGridColumn columnName="name" headerText="Name"/>

                <mx:DataGridColumn columnName="description" headerText="Description"/>

                <mx:DataGridColumn columnName="price" headerText="Price"/>

                <mx:DataGridColumn columnName="image" headerText="Image Location/Name"/>

                <mx:DataGridColumn columnName="thumbnail" headerText="Thumbnail Location/Name"/>

                <mx:DataGridColumn columnName="QTYONHND" headerText="Qty On Hand"/>

            </mx:Array>

        </mx:columns>

    </mx:DataGrid>

 

</mx:Application>

 

When I try to get the CB store list, I get an error on “            <StoreId>{store.selectedItem.data}</StoreId>       ”  that the data is not static

 

I looked through the archives, the closest thing I could find was for CF I tried to modify it but was unsuccessful

 

JT

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Sauro, Nick
Sent: Monday, July 25, 2005 11:41 AM
To: [email protected]
Subject: RE: [flexcoders] Populating combo box's

 

->DataModel  Use a single databmodel, and reference that data model from both the DG and the CB

 

Nick Sauro + R O U N D A R C H + bus 212.909.2335 + mob 914.882.3687

 

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of James
Sent: Monday, July 25, 2005 11:12 AM
To: [email protected]
Subject: [flexcoders] Populating combo box's

I’m looking for help to populate a combo box which in turn populates a data grid. Can anyone point me in the right direction?

 

JT




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to