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
<*> 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
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
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.

