You're not declaring the variable userlist. (At least not in this
snippet of code.)
Try putting
private var userlist: Array;
inside <mx:Script> tags.
Grady Haynes
Senior Systems Engineer, IT Services
817.252.4891
[EMAIL PROTECTED]
Practitioners Publishing Company
A Thomson Business
801 Cherry Street, Suite 1300
Fort Worth, Texas 76102
ppc.thomson.com
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jeremy Rottman
Sent: Tuesday, August 23, 2005 3:52 PM
To: [email protected]
Subject: [flexcoders] Error with populationg a Datagrid
I have written a cfc to pull data from my data base and I am calling
this as a ws to be displayed in my datagrid. But when I try to compile
the code I get this error.
There is no property with the name 'userlist'
Here is my mxml code and cfc code.
---MXML---
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:WebService id="srv"
wsdl="http://test.codepirates.com/mls/FindEmployee.cfc?wsdl">
<mx:operation name="employeeQuery"
result="userlist=srv.employeeQuery.result" /> </mx:WebService> <mx:HBox
width="100%">
<mx:Panel title="Restaurant List" width="50%">
<mx:DataGrid id="dg" dataProvider="{userlist}"
width="100%"
height="100%">
<mx:columns>
<mx:Array>
<mx:DataGridColumn headerText="First
Name" columnName="fname" />
<mx:DataGridColumn headerText="Last
Name" columnName="lname" />
<mx:DataGridColumn headerText="UserName"
colum nName="fld_userlogin" />
</mx:Array>
</mx:columns>
</mx:DataGrid>
<mx:ControlBar horizontalAlign="center">
<mx:Button label="Get Data"
click="srv.employeeQuery()" />
</mx:ControlBar>
</mx:Panel>
</mx:HBox>
</mx:Application>
---CFC code---
<cfcomponent displayName="FindEmployee" >
<cffunction name="FindEmployeeSort" access="remote"
returnType="query" output="false">
<!--- FindEmployeeSort body --->
<cfquery name="employeeQuery" datasource="cf_agentPortal">
Select * from tbl_agentPortal_users
Order by lname asc
</cfquery>
<cfreturn employeeQuery />
</cffunction>
</cfcomponent>
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h79kskk/M=362329.6886308.7839368.151
0227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124841984/A=2894321/R=0/SIG=1
1dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk
back!</a>.</font>
--------------------------------------------------------------------~->
--
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h8nul4n/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124843059/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In
low income neighborhoods, 84% do not own computers. At Network for Good, help
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->
--
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/