<Plan xmlns="http://domain.com/BackOffice/DocumentMetadata" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ChartLabel>1406238</ChartLabel>
<Industry>MANUFACTURING</Industry>
<IndustryOverride/>
<PlanName/>
<PlanNameOverride/>
<PlanNumber>1406238</PlanNumber>
<PlanSizeGroup>50-149</PlanSizeGroup>
<PlanSizeGroupOverride/>
</Plan>
and here is the code I use to populate my XMLListCollection object:
var x:XML = new XML(event.message.body);
namespace docResponse = "http://domain.com/BackOffice/DocumentMetadata";
use namespace docResponse;
dmws = x..Document;
plans_ac = new XMLListCollection(x..PlanData.Plans.Plan);
tf.text = plans_ac.toString();
And here is my DataGrid:
<mx:DataGrid dataProvider="{plans_ac}" x="71" y="116" width="545" height="146" showHeaders="true" id="planList_dg">
<mx:columns>
<mx:DataGridColumn headerText="Plan Number" dataField="PlanNumber"/>
<mx:DataGridColumn headerText="Plan Name" dataField="PlanName"/>
<mx:DataGridColumn headerText="Industry" dataField="Industry"/>
<mx:DataGridColumn headerText="Group Size" dataField="PlanSizeGroup"/>
</mx:columns>
</mx:DataGrid>
--- In flexcoders@yahoogroups.com, "bhaq1972" <[EMAIL PROTECTED]> wrote:
>
> Can you show us what your webservice returned data looks like.
> dont know if this helps but my webservice returned data was a string
> and i did the following
> private function returnWebService(event:ResultEvent):void
> {
> var xmlobj:XML = new XML(event.result);
> var xc3:XMLListCollection = new XMLListCollection(xmlobj.children
> ()); //in my eg, xmlobj.children() populated the dg
> dg.dataProvider = xc3;
> }
>
>
> --- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
> ben.clinkinbeard@ wrote:
> >
> > Hello, I am populating an XMLListCollection with the results of a
> > WebService call (in AS, not MXML), and setting that
> XMLListCollection
> > as the dataProvider for my DataGrid. I can see that it is binding
> the
> > data, because if the XML contains 5 nodes, I can roll over 5 items
> in
> > the DataGrid. The problem is that the DataGrid doesn't display the
> > content of the nodes, they're just blank roll overs. If I write
> > something like this:
> >
> > plans_xmlcoll.getItemAt(2).PlanNumber out to a textfield, the value
> > shows up, so I know it is there. My DataGrid column whose dataField
> > value is set to PlanNumber shows nothing, however.
> >
> > Why would the data not be showing up in the DataGrid?
> >
> > Thanks,
> > Ben
> >
> > PS - I take it the resultFormat of a WebService called via AS is
> > automatically (and unchangeably) E4X? Why do mx.rpc.soap.WebService
> > and mx.rpc.soap.mxml.WebService have different capabilities? Heck,
> why
> > are there even separate classes?
> >
>
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.