Couple of things I see
The labelField for the tree should be  labelField="@label"

Also in your webservice the result handler should be something like 
this:
<mx:operation name="displayDocsListQry" 
            result="DocDisplayModdisplayDocsListQryResult(event)"
and the handler would be:
                    function DocDisplayModdisplayDocsListQryResult( 
event:mx.rpc.events.ResultEvent ){
                         DocTree.dataProvider = event.result;
                         }


--- In flexcoders@yahoogroups.com, "Jeremy Rottman" <[EMAIL PROTECTED]> 
wrote:
>
> I have a tree in my app that is supsoed to display a tree of 
folders and
> documents under those folders. The folders are suposed to be nodes 
and
> the documents are suposed to be children of those nodes.
> 
> Right now, my tree does not display any structure.  Can somenoe 
help me
> with this, it is starting to be a pain in my ass.
> 
> HEre is my tree code.
> 
>                  <mx:Canvas label="Document Information" 
width="100%"
> height="100%">
>                      <mx:Panel x="10" y="10" borderAlpha="1.0"
> width="381" height="307" layout="absolute">
>                          <mx:Tree x="10" id="DocTree" 
labelField="LABEL"
> showRoot="true" y="10" height="75%" width="85%"/>
>                       </mx:Panel>
>                      <mx:Panel x="415" y="10" width="90%" 
height="307"
> borderAlpha="1.0" layout="absolute">
>                          <mx:DataGrid x="0" y="10" width="90%"
> height="75%">
>                              <mx:columns>
>                                  <mx:DataGridColumn 
headerText="Column 1"
> dataField="col1"/>
>                                  <mx:DataGridColumn 
headerText="Column 2"
> dataField="col2"/>
>                                  <mx:DataGridColumn 
headerText="Column 3"
> dataField="col3"/>
>                              </mx:columns>
>                          </mx:DataGrid>
>                      </mx:Panel>
>                  </mx:Canvas>
> 
> 
> Webservice to call my cfc.
> 
>      <mx:WebService id="DocDisplayMod" useProxy="false"
> wsdl="http://flex.homesmartagent.com/cfc/adminList.cfc?wsdl";
> showBusyCursor="true">
>          <mx:operation name="displayDocsListQry"
>              result="DocDisplayModdisplayDocsListQryResult(
> DocDisplayMod.displayDocsListQry.result )"
>              fault="DocDisplayModdisplayDocsListQryFault( 
event )" />
>      </mx:WebService>
> 
> Webservice AS Functions:
>                  // POPULATES TREE
> 
>                  function DocDisplayModdisplayDocsListQry(fileNum){
>                      DocDisplayMod.displayDocsListQry(fileNum);}
> 
>                  // called when results received
>                      function DocDisplayModdisplayDocsListQryResult
(
> result ){
>                           DocTree.dataProvider = result;
>                           }
> 
>                  function DocDisplayModdisplayDocsListQryFault ( 
event
> ){}
> 
> Data returned from my cfc.
> 
>    <?xml  version="1.0" encoding="utf-16" ?>   - <#>  <fileNum
> label="L060001">   - <#>  <directory label="AD">     <document
> label="01010506.txt"  />    </directory>  - <#>  <directory
> label="SPDS">     <document label="03010506.txt"  />     <document
> label="03020506.txt"  />    </directory>  - <#>  <directory 
label="PC">
> <document label="02010506.txt"  />     <document 
label="02020506.txt" 
> />     <document label="02030506.txt"  />    </directory>   
</fileNum>
>







--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to