Hey Jeremy,

Add this to the tree: labelField="DIR"

Do you have any examples where you'll have sub dirs or files within a dirs? 

If so, I've noticed an issue with loading Objects into the tree as a dataprovider.  The only way I was able to get it to work was making sure that my sub values array was named "children" within the object.  Any other name (even though it's an array) and the tree won't display the sub nodes for those values.  I'm interested to see if you're able to get it to work using structs from CF without having to use the "children" name.  The two instances I tried was an array from a CFC, and a manually created object within AS 3.0.


Brendan

BTW... if it helps, i've attached a screenshot from ServiceCapture of your CFC return... handy dandy tool...



On 3/24/06, Jeremy Rottman <[EMAIL PROTECTED]> wrote:
L060001 is an active fileNum

--- In [email protected], "Brendan Meutzner" <[EMAIL PROTECTED]>
wrote:
>
> Jeremy,
>
> Give me a filenum value that will retrieve some data from your web
> service...
>
> Thanks,
>
> Brendan
>
>
>
> On 3/23/06, Jeremy Rottman <[EMAIL PROTECTED]> wrote:
> >
> > In my app, I have a section that is suposed to display in a tree all
> > documents that are in a specific folder.
> >
> > The issue I have is that, when I test the code, the tree has this
> > output [object Object].
> >
> > Is this because it not formated correctly in my cfc? Or is it
> > something more sinister and evil.
> >
> > I have this cfc code. This code works.
> >
> >         <cffunction name="displayDocsListQry" access="remote"
> > returntype="array" output="true">
> >                 <cfargument name="fileNum" required="no"
type="string" />
> > <cfdirectory action="" recurse="yes"
> >
> >
directory="#APPLICATION.storePath##APPLICATION.systemInfo.fld_officeCode#/L060001"
> > name="ListDir" />
> >
> > <cfquery name="ListDirQry" dbtype="query">
> >    select * from ListDir
> >    where type = 'Dir'
> > </cfquery>
> > <cfset dirArray = arrayNew(1)>
> > <cfset dcounter = 1>
> > <cfset fcounter = 1>
> >    <cfloop query="ListDirQry">
> >        <cfset dirArray[dcounter] = structnew()>
> >            <cfset dirArray[dcounter].dir = ListDirQry.name>
> >            <cfquery name="ListFileQry" dbtype="query">
> >                select * from ListDir
> >                where type = 'File' and directory =
> >
> >
'#APPLICATION.storePath##APPLICATION.systemInfo.fld_officeCode#/#arguments.fileNum#/#dirArray[dcounter].dir#'
> >            </cfquery>
> >                <cfloop query="ListFileQry">
> >                    <cfset dirArray[dcounter].file = ListFileQry.name>
> >                </cfloop>
> >                            <cfif dcounter neq ListDirQry.RecordCount>
> >            <cfset dcounter = dcounter + 1>
> >                    </cfif>
> >    </cfloop>
> >         <cfreturn dirArray />
> > </cffunction>
> >
> > Now, I call this function like this.
> >
> > Webservice --
> >         <!-- POPULATES TREE -->
> >         <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>
> >
> > AS Connected to the webservice:
> >
> >                             function
> > DocDisplayModdisplayDocsListQry(fileNum){
> >
DocDisplayMod.displayDocsListQry
> > (fileNum);}
> >
> >                                 // called when results received
> >                                 function
> > DocDisplayModdisplayDocsListQryResult( result ){
> >                                         DocTree.dataProvider = result;
> >                                 }
> >
> >                                 function
> > DocDisplayModdisplayDocsListQryFault ( event ){}
> >
> >
> > Code for my tree:
> > <mx:Tree x="10" id="DocTree" rootVisible="true" y="10" height="75%"
> > width="85%"/>
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> >
> >
> >
>







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







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




<<attachment: serv_capt_grab.jpg>>

Reply via email to