Re: [flexcoders] Webservice array question

2005-02-25 Thread Jeff Steiner
Tracy,

Thanks. For some reason I was referencing the index after the column name.

Got it up and running.

Jeff
http://www.flexauthority.com

- Original Message - 
From: Tracy Spratt [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, February 24, 2005 2:05 PM
Subject: RE: [flexcoders] Webservice array question



 What exactly is the format of the data in result? If result works with a
 datagrid then you must have an array of three elements each containing
 an Item.

 So you should be able to do:
 ...result[0].myColumnName //item.property
 ...result[1].myColumnName
 ...result[2].myColumnName

 If you have to navigate through the result to make the dtagrid work,
 then that should be the start of the array:
 ..result.DATA[0].myColumnName

 Tracy

 -Original Message-
 From: Jeff Steiner [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 24, 2005 4:14 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Webservice array question


 I have a problem that I am sure just about everyone on this list could
 answer - but for the life of me I cannot figure it out.

 I have a webservice that is returning a Query object from a CFC. I can
 reference the result in a datagrid but I want to have a bit more control
 over it. I would like to create 3 seperate Labels and force the output
 on
 those Labels to the individual rows (and the data) from the result.

 Here is what I have so far:
 mx:WebService id=samples wsdl=http://localhost/samples.cfc?WSDL;
 showBusyCursor=true

 mx:operation name=getTop3Samples /

 /mx:WebService

 mx:Button click=samples.getTop3Samples.send(); label=go  /

 mx:TextInput text={samples.getTop3Samples.result.ID[0]} /

 mx:TextInput text={samples.getTop3Samples.result.ID[1]} /


 From CFC:
 cffunction name=getTop3Samples access=remote returntype=query

 cfquery name=leftNavSamples datasource=dsn maxRows=3

 SELECT ID

 FROM TABLE

 /cfquery

 cfreturn leftNavSamples

 /cffunction




 Thanks in advance,
 Jeff
 http://www.flexauthority.com




 Yahoo! Groups Links












 Yahoo! Groups Links












Webservice array question

2005-02-24 Thread Jeff Steiner
I have a problem that I am sure just about everyone on this list could
answer - but for the life of me I cannot figure it out.

I have a webservice that is returning a Query object from a CFC. I can
reference the result in a datagrid but I want to have a bit more control
over it. I would like to create 3 seperate Labels and force the output on
those Labels to the individual rows (and the data) from the result.

Here is what I have so far:
mx:WebService id=samples wsdl=http://localhost/samples.cfc?WSDL;
showBusyCursor=true

mx:operation name=getTop3Samples /

/mx:WebService

mx:Button click=samples.getTop3Samples.send(); label=go  /

mx:TextInput text={samples.getTop3Samples.result.ID[0]} /

mx:TextInput text={samples.getTop3Samples.result.ID[1]} /


From CFC:
cffunction name=getTop3Samples access=remote returntype=query

cfquery name=leftNavSamples datasource=dsn maxRows=3

SELECT ID

FROM TABLE

/cfquery

cfreturn leftNavSamples

/cffunction




Thanks in advance,
Jeff
http://www.flexauthority.com