0 Replies Latest reply on Sep 23, 2009 10:43 AM by Clizzle

    1120: Access of undefined property when using an XMLListCollection

    Clizzle Level 1

      I am pretty new to flex...and to XML.  I am grabbing some XML data from a webservice using the HTTPService tag, this works great.  I can assign the XML data to an ArrayCollection or and XMLListCollection (prefer to work with the ArrayCollection because eventually the data will be coming out of a salesforce.com data base instead of an XML webservice).


      I can access most of the tags in my XML document without an issue, but for some reason I can't access the elements in the "attachedDocs" tag.  A sample of the XML is below


      - <products>
      -      <product>
                 <modelNumber>1794sc IRT8I</modelNumber>
                <description>8 Channel Isolated RTD/Thermocouple Module</description>
      -           <attachedDocs>
      -                <document>
                          <docName>webport demo instructions.pdf</docName>
      -                <document>
      I tried to use the mx:label and mx:text tagst to display the <docName> property, but I get the 1120 error....I thought maybe because there are multiple <document> per <attachedDocs> I needed to use the mx:list as shown below:



      <mx:List dataProvider="{data.attachedDocs.document}" />


      if I only drill down to the <document> level I see [object,Object]  displayed, which I expect, but when I try to actually bind to the <docName> value I again get the 1120 error:



      <mx:List dataProvider="{data.attachedDocs.document}" labelField="docName"/>


      (the above code is part of a custom itemRenderer called by the following code in my main application:






      id="list6" dataProvider="{productList}"









      'productSelected'" />

      Is there something I need to do to get access to the children of the <attachedDocs> attribute?