RIght I have changed it alot from when I First post. This is the new code. How ever, it does see the WS. And when I click my button, it still does not populate the dg.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"> <mx:WebService id="srv" wsdl="http://70.97.113.6/mls/FindEmployee.cfc?wsdl"> </mx:WebService> <mx:HBox width="100%"> <mx:Panel title="User List" width="50%"> <mx:DataGrid id="dg" dataProvider="srv" width="100%" height="100%"> <mx:columns> <mx:Array> <mx:DataGridColumn headerText="First Name" columnName="LNAME" /> <mx:DataGridColumn headerText="Last Name" columnName="LNAME" /> </mx:Array> </mx:columns> </mx:DataGrid> <mx:ControlBar horizontalAlign="center"> <mx:Button label="Get Data" click="srv.FindEmployeeSort.send()" /> </mx:ControlBar> </mx:Panel> </mx:HBox> </mx:Application> --- In flexcoders@yahoogroups.com, <[EMAIL PROTECTED]> wrote: > 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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Jeremy Rottman > Sent: Tuesday, August 23, 2005 3:52 PM > To: flexcoders@yahoogroups.com > 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=12hmlo8mt/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124854236/A=2894321/R=0/SIG=11dvsfulr/*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 <*> 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/