Re: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-24 Thread Tariq Ahmed
The book in general has some best practices to pretty much everything. 
But your CF approach sounds good; we're in a similar situation in that 
we have a large knowledge management system built in CF - there will 
never be a plan to redo that in another language, and the flex stuff we 
build just adds onto the existing 'product'.

[EMAIL PROTECTED] wrote:

Thanks for the advice, Tariq.  I ordered the book last week and am looking 
forward to giving it a read.  Does the book give examples on how to create a 
result handler? In terms of CFCs, I'm converting a MVC Fusebox 4 coldfusion 
app to a Flex interface.  Since the application is allready very large and 
there are already thousands of programming hours put into the controller and 
model sections, I wanted to re-use as much of my CF code as possible.  My idea 
is to call CFCs that will have a number of cfincludes, mimicking a fuseaction 
as close as possible.  I realize this will lead to very tight dependency on 
CF, but I'm committed at this point.  Do you see any other drawbacks to this 
approach?

   -Original Message- 
   From: flexcoders@yahoogroups.com on behalf of Tariq Ahmed 
   Sent: Sat 7/23/2005 1:13 PM 
   To: flexcoders@yahoogroups.com 
   Cc: 
   Subject: Re: [flexcoders] Flex and CFCs -- problems displaying 
 recordsets in datagrids
   
   




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




Re: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-23 Thread Tariq Ahmed






Good stuff!

- Well I don't know if there's really a standard with respect to CF to
Flex communications. Certainly there are naming convention standards
that I see being adopted from the Flash/Java development side of
things, and having things returned in a non-predictable manner can cost
you over time. So the question is whether to put the time up front, or
later (eg hiring new guys w/o CF background that were expecting a field
to be called firstName and it turns out to be FIRSTNAME). In general I
would say stick to and enforce a convention that your team is
comfortable with, and minimize dependency on assumptions of any
particular platform (eg if you decide to switch from CF to Java
sometime in the future). On the flipside we also create our external
facing CFCs with no assumption that it's Flex communicating with it.

- I would highly recommend the iteration::two book on rich internet
applications which talks about patterns. As for invoking a result
handler function vs direct assignment. I guess it depends. But in
general as your apps get more complex you'll probably end up needing a
result handler to do more than just assigning the results.


[EMAIL PROTECTED] wrote:

  
  
  Hi Tarik,
  
  Please ignore my previous messages. I was
able to get it working. I misunderstood the capitalization advice. I
had capitalized the entire field, when only the first letter needed to
be.
  
  A couple of follow-up questions, if you
don't mind:
  
I see contrary advice on how to return data
from CF. Some say through an array and others just take the recordset
directly. Which would you consider best practice? I want to settle on
a standard as I build out my first Flex app.
In the RemoteObject tag, is it better to
just pass the event to a function (i.e., fault="doFault(event)"
result="doResult(event)") or through more implicit calls (i.e.,
fault="mx.controls.Alert.show(event.fault.faultstring) mx:method
name="doResult" result="handleResult(event)"). Again, I'm just looking
for a best practice I can standardize on.
  
  Thank you,
  Darius








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

Computer software testing
  
  
Macromedia flex
  
  
Development
  
  


Software developer
  

   
  







  
  
  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.



  










RE: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-23 Thread dfatta
Thanks for the advice, Tariq.  I ordered the book last week and am looking 
forward to giving it a read.  Does the book give examples on how to create a 
result handler? In terms of CFCs, I'm converting a MVC Fusebox 4 coldfusion app 
to a Flex interface.  Since the application is allready very large and there 
are already thousands of programming hours put into the controller and model 
sections, I wanted to re-use as much of my CF code as possible.  My idea is to 
call CFCs that will have a number of cfincludes, mimicking a fuseaction as 
close as possible.  I realize this will lead to very tight dependency on CF, 
but I'm committed at this point.  Do you see any other drawbacks to this 
approach?

-Original Message- 
From: flexcoders@yahoogroups.com on behalf of Tariq Ahmed 
Sent: Sat 7/23/2005 1:13 PM 
To: flexcoders@yahoogroups.com 
Cc: 
Subject: Re: [flexcoders] Flex and CFCs -- problems displaying 
recordsets in datagrids


 



--
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/
 
winmail.dat

RE: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-22 Thread Philippe Maegerman





I think the workaround for caps was 

SELECTStuff as StuffFROM 
tbl

Philippe 
Maegerman


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff 
SteinerSent: vendredi 22 juillet 2005 6:01To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Flex and CFCs -- 
problems displaying recordsets in datagrids


When returning data 
from a CFC  most of the time it changes the name to all caps. For 
example:

SELECT Stuff FROM 
Table

Cfreturn 
query

Output it 
as:
event.result[0].STUFF;


Jeff
Founder
Flex 
Authority
http://www.flexauthority.com

We are actively seeking 
contributors for the site. Have a sample that you want to share with the 
world? Send it to us!




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of coldfsSent: Thursday, July 21, 2005 4:35 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Flex and CFCs -- 
problems displaying recordsets in datagrids

Hi,I'm new to Flex and have been working over the last few weeks 
to integrate this product with 
CF. One of my central aims is to be able to pass data from Flex to a CFC which houses a query and will 
return a recordset back to 
Flex. Through piecing together examples here and there, I've figured out how to call the CFC and send data to 
it from Flex, but I've been unable 
to figure out how to display the recordset in a Flex datagrid. Any help/examples, best practices, 
on how to do this would be greatly 
appreciated. My existing code follows. The query recordset returns two fields. The error I receive 
is:1 Error found. 
Error /FlexToCFC2.mxml:19 
There is no property with the name 
'text'.--?xml version="1.0" 
encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="*" 
mx:Script 
![CDATA[  
 
 private function 
doClick():Void{  
 
ro.GetUpdateAuthorization(input.text);  
} 
   
private function doResult(event:Object):Void{  
 output.text = 
event.result;  
} 
   
private function doFault(event:Object):Void{  
 alert("Error invoking CF: " + 
event.fault.faultstring);  
} 
  
]] 
/mx:Script  mx:RemoteObject id="ro" 
endpoint="http://gx270dev.childsupport.net/flashservices/gateway" 
 
  
source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 
 
  
fault="doFault(event)"   
 
result="doResult(event)" 
/mx:RemoteObject  mx:Panel 
title="Updates"  
mx:Form defaultButton="sendButton"  
 mx:FormItem label="Input:" 
direction="horizontal"  
  mx:TextInput 
id="input"/  
  mx:Button 
id="sendButton" label="Send" 
click="doClick()"/  
 /mx:FormItem  
 mx:DataGrid id="output" width="520" 
wordWrap="true"  
  
mx:columns  
  
mx:Array  
  
mx:DataGridColumn width="200" headerText="Update Form" 
columnName="Function"/  
   
mx:DataGridColumn width="320" headerText="Description" 
columnName="Description"/  
 
/mx:Array  
 /mx:columns  
 /mx:DataGrid  
/mx:Form 
/mx:Panel/mx:ApplicationMany thanks,Darius





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

Computer software testing
  
  
Macromedia flex
  
  
Development
  
  


Software developer
  

   
  







  
  
  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.



  






--**STATEMENT OF CONFIDENTIALITY** 
This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.
We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.--


RE: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-22 Thread Allen Manning
Darius,

Rather than passing ColdFusion recordsets directly back to Flex, what we did
is transform the results into an array of CFCs or an array of structs and
let the automatic AS type translation transform these results into native AS
value objects.

I would be weary of too tightly coupling your Flex layer with the specifics
of your server side.

HTH,
Allen
www.prismix.com/



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of coldfs
Sent: 22 July 2005 00:35
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex and CFCs -- problems displaying recordsets in
datagrids

Hi,

I'm new to Flex and have been working over the last few weeks to 
integrate this product with CF.  One of my central aims is to be able 
to pass data from Flex to a CFC which houses a query and will return 
a recordset back to Flex.  Through piecing together examples here and 
there, I've figured out how to call the CFC and send data to it from 
Flex, but I've been unable to figure out how to display the recordset 
in a Flex datagrid.  Any help/examples, best practices, on how to do 
this would be greatly appreciated.  My existing code follows.  The 
query recordset returns two fields.  The error I receive is:

1 Error found. 
 
Error /FlexToCFC2.mxml:19 
There is no property with the name 'text'.

--


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
xmlns=*

mx:Script
![CDATA[

private function doClick():Void{
ro.GetUpdateAuthorization(input.text);
}

private function doResult(event:Object):Void{
output.text = event.result;
}

private function doFault(event:Object):Void{
alert(Error invoking CF:  + 
event.fault.faultstring);
}

]]
/mx:Script

mx:RemoteObject id=ro 
endpoint=http://gx270dev.childsupport.net/flashservices/gateway; 

source=Model.mUtilities.mUpdate.qry_UpdateAuthorization 
fault=doFault(event) 
result=doResult(event)

/mx:RemoteObject

mx:Panel title=Updates
mx:Form defaultButton=sendButton
mx:FormItem label=Input: 
direction=horizontal
mx:TextInput id=input/
mx:Button id=sendButton 
label=Send click=doClick()/
/mx:FormItem
mx:DataGrid id=output width=520 
wordWrap=true
  mx:columns
mx:Array
  mx:DataGridColumn width=200 
headerText=Update Form columnName=Function/
  mx:DataGridColumn width=320 
headerText=Description columnName=Description/
/mx:Array
  /mx:columns
/mx:DataGrid
/mx:Form
/mx:Panel

/mx:Application


Many thanks,
Darius








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




RE: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-22 Thread dfatta





Hi 
Allen,

I'm 
very interested in learning how you achieved this. I continue to be 
confused by all varying syntax one can use to access data using AMF. It 
looks like your approach is certainly a best practice. Do you have an 
example you could share of your cfc, mxml, and actionscript. I just need 
one good sample to get off and running.

Many 
thanks,
Darius

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of Allen 
  ManningSent: Friday, July 22, 2005 1:23 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Flex and CFCs 
  -- problems displaying recordsets in 
  datagridsDarius,Rather than passing 
  ColdFusion recordsets directly back to Flex, what we didis transform the 
  results into an array of CFCs or an array of structs andlet the automatic 
  AS type translation transform these results into native ASvalue 
  objects.I would be weary of too tightly coupling your Flex layer with 
  the specificsof your server 
  side.HTH,Allenwww.prismix.com/-Original 
  Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] OnBehalf Of coldfsSent: 22 July 
  2005 00:35To: flexcoders@yahoogroups.comSubject: [flexcoders] Flex and 
  CFCs -- problems displaying recordsets indatagridsHi,I'm 
  new to Flex and have been working over the last few weeks to integrate 
  this product with CF. One of my central aims is to be able to pass 
  data from Flex to a CFC which houses a query and will return a recordset 
  back to Flex. Through piecing together examples here and there, I've 
  figured out how to call the CFC and send data to it from Flex, but I've 
  been unable to figure out how to display the recordset in a Flex 
  datagrid. Any help/examples, best practices, on how to do this would 
  be greatly appreciated. My existing code follows. The query 
  recordset returns two fields. The error I receive is:1 Error 
  found. Error /FlexToCFC2.mxml:19 There is no property with the 
  name 
  'text'.--?xml 
  version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" 
  xmlns="*" 
  mx:Script 
  ![CDATA[  
private 
  function doClick():Void{ 

  ro.GetUpdateAuthorization(input.text); 
   } 

   private function 
  doResult(event:Object):Void{ 
output.text = 
  event.result;  
  }  
private 
  function doFault(event:Object):Void{ 
alert("Error 
  invoking CF: " + 
  event.fault.faultstring); 
   } 

  ]] 
  /mx:Script 
   mx:RemoteObject id="ro" 
  endpoint="http://gx270dev.childsupport.net/flashservices/gateway" 

   
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 

   fault="doFault(event)" 

   
  result="doResult(event)" 
  /mx:RemoteObject 
   mx:Panel 
  title="Updates" 
   mx:Form 
  defaultButton="sendButton" 
mx:FormItem 
  label="Input:" 
  direction="horizontal" 

   mx:TextInput 
  id="input"/ 

   mx:Button id="sendButton" label="Send" 
  click="doClick()"/ 

  /mx:FormItem 
mx:DataGrid 
  id="output" width="520" 
  wordWrap="true" 
 
  mx:columns  

  mx:Array 

   mx:DataGridColumn width="200" 
  headerText="Update Form" 
  columnName="Function"/ 

mx:DataGridColumn width="320" 
  headerText="Description" 
  columnName="Description"/ 

  /mx:Array 

  /mx:columns 

  /mx:DataGrid 
   
  /mx:Form 
  /mx:Panel/mx:ApplicationMany 
  thanks,Darius--Flexcoders Mailing 
  ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  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



  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.



  









RE: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-22 Thread dfatta





Hi 
Tarik,

Please 
ignore my previous messages. I was able to get it working. I 
misunderstood the capitalization advice. I had capitalized the entire 
field, when only the first letter needed to be.

A 
couple of follow-up questions, if you don't mind:

  I see 
  contrary advice on how to return data from CF. Some say through an array 
  and others just take the recordset directly. Which would you consider 
  best practice? I want to settle on a standard as I build out my first Flex 
  app.
  In 
  the RemoteObject tag, is it better to just pass the event to a function (i.e., 
  fault="doFault(event)" result="doResult(event)") or through more implicit 
  calls (i.e., fault="mx.controls.Alert.show(event.fault.faultstring) 
  mx:method name="doResult" result="handleResult(event)"). Again, I'm 
  just looking for a best practice I can standardize on.
Thank 
you,
Darius

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of Tarik 
  AhmedSent: Thursday, July 21, 2005 6:28 PMTo: 
  flexcoders@yahoogroups.comSubject: Re: [flexcoders] Flex and CFCs 
  -- problems displaying recordsets in datagridsHi 
  Darius, welcome.Some things to keep in mind:- CF and it's CFCs are 
  not case sensitive, where as Flex is. Eg if you do a CFQUERY and just send 
  the results back, all the fields will be upper case.- I think on your 
  doResult you'll need output.dataProvider = 
  event.result._items;Here's some articles that should help you 
  out:http://www.bpurcell.org/blog/index.cfm?mode=entryentry=1019http://www.richinternet.de/blog/index.cfm?entry=831FE26E-0D70-9C2D-2549E1D1978CF1B0coldfs 
  wrote:Hi,I'm new to Flex and have been working 
  over the last few weeks to integrate this product with CF. One 
  of my central aims is to be able to pass data from Flex to a CFC which 
  houses a query and will return a recordset back to Flex. Through 
  piecing together examples here and there, I've figured out how to call 
  the CFC and send data to it from Flex, but I've been unable to figure 
  out how to display the recordset in a Flex datagrid. Any 
  help/examples, best practices, on how to do this would be greatly 
  appreciated. My existing code follows. The query recordset 
  returns two fields. The error I receive is:1 Error 
  found.  Error /FlexToCFC2.mxml:19 There is no property 
  with the name 
  'text'.--?xml 
  version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" 
  xmlns="*" 
  mx:Script 
  ![CDATA[ 

   private function 
  doClick():Void{ 

  ro.GetUpdateAuthorization(input.text); 
   } 

   private function 
  doResult(event:Object):Void{ 
output.text = 
  event.result; 
   } 

   private function 
  doFault(event:Object):Void{ 
alert("Error 
  invoking CF: " + 
  event.fault.faultstring); 
   } 

  ]] 
  /mx:Script 
   mx:RemoteObject id="ro" 
  endpoint="http://gx270dev.childsupport.net/flashservices/gateway" 

   
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 

   fault="doFault(event)" 

   
  result="doResult(event)" 
  /mx:RemoteObject 
   mx:Panel 
  title="Updates" 
   mx:Form 
  defaultButton="sendButton" 
mx:FormItem 
  label="Input:" 
  direction="horizontal" 

   mx:TextInput 
  id="input"/ 

   mx:Button id="sendButton" 
  label="Send" 
  click="doClick()"/ 

  /mx:FormItem 
mx:DataGrid 
  id="output" width="520" 
  wordWrap="true" 
 
  mx:columns  

  mx:Array 

   mx:DataGridColumn width="200" 
  headerText="Update Form" 
  columnName="Function"/ 

mx:DataGridColumn width="320" 
  headerText="Description" 
  columnName="Description"/ 

  /mx:Array 

  /mx:columns 

  /mx:DataGrid 
   
  /mx:Form 
  /mx:Panel/mx:ApplicationMany 
  thanks,Darius 
  





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



  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.



  









Re: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-21 Thread Tarik Ahmed
Hi Darius, welcome.

Some things to keep in mind:
- CF and it's CFCs are not case sensitive, where as Flex is. Eg if you 
do a CFQUERY and just send the results back, all the fields will be 
upper case.
- I think on your doResult you'll need output.dataProvider = 
event.result._items;

Here's some articles that should help you out:
http://www.bpurcell.org/blog/index.cfm?mode=entryentry=1019
http://www.richinternet.de/blog/index.cfm?entry=831FE26E-0D70-9C2D-2549E1D1978CF1B0



coldfs wrote:

Hi,

I'm new to Flex and have been working over the last few weeks to 
integrate this product with CF.  One of my central aims is to be able 
to pass data from Flex to a CFC which houses a query and will return 
a recordset back to Flex.  Through piecing together examples here and 
there, I've figured out how to call the CFC and send data to it from 
Flex, but I've been unable to figure out how to display the recordset 
in a Flex datagrid.  Any help/examples, best practices, on how to do 
this would be greatly appreciated.  My existing code follows.  The 
query recordset returns two fields.  The error I receive is:

1 Error found. 
 
Error /FlexToCFC2.mxml:19 
There is no property with the name 'text'.

--


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
xmlns=*

   mx:Script
   ![CDATA[
   
   private function doClick():Void{
   ro.GetUpdateAuthorization(input.text);
   }
   
   private function doResult(event:Object):Void{
   output.text = event.result;
   }
   
   private function doFault(event:Object):Void{
   alert(Error invoking CF:  + 
event.fault.faultstring);
   }
   
   ]]
   /mx:Script
   
   mx:RemoteObject id=ro 
endpoint=http://gx270dev.childsupport.net/flashservices/gateway; 
   
   source=Model.mUtilities.mUpdate.qry_UpdateAuthorization 
   fault=doFault(event) 
   result=doResult(event)

   /mx:RemoteObject
   
   mx:Panel title=Updates
   mx:Form defaultButton=sendButton
   mx:FormItem label=Input: 
direction=horizontal
   mx:TextInput id=input/
   mx:Button id=sendButton 
label=Send click=doClick()/
   /mx:FormItem
   mx:DataGrid id=output width=520 
wordWrap=true
 mx:columns
   mx:Array
 mx:DataGridColumn width=200 
headerText=Update Form columnName=Function/
 mx:DataGridColumn width=320 
headerText=Description columnName=Description/
   /mx:Array
 /mx:columns
   /mx:DataGrid
   /mx:Form
   /mx:Panel

/mx:Application


Many thanks,
Darius





  





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





RE: [flexcoders] Flex and CFCs -- problems displaying recordsets in datagrids

2005-07-21 Thread Jeff Steiner










When returning data from a CFC 
most of the time it changes the name to all caps. For example:



SELECT Stuff FROM Table



Cfreturn query



Output it as:

event.result[0].STUFF;





Jeff

Founder

Flex Authority

http://www.flexauthority.com



We are actively seeking contributors for
the site. Have a sample that you want to share with the world? Send
it to us!











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of coldfs
Sent: Thursday, July 21, 2005 4:35
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex and
CFCs -- problems displaying recordsets in datagrids





Hi,

I'm new to Flex and have been working over the
last few weeks to 
integrate this product with CF. One of my
central aims is to be able 
to pass data from Flex to a CFC which houses a
query and will return 
a recordset back to Flex. Through piecing
together examples here and 
there, I've figured out how to call the CFC and
send data to it from 
Flex, but I've been unable to figure out how to
display the recordset 
in a Flex datagrid. Any help/examples, best
practices, on how to do 
this would be greatly appreciated. My
existing code follows. The 
query recordset returns two fields. The
error I receive is:

1 Error found. 

Error /FlexToCFC2.mxml:19 
There is no property with the name 'text'.

--


?xml version=1.0
encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml

xmlns=*

 mx:Script
 ![CDATA[

 

 private function doClick():Void{

 
ro.GetUpdateAuthorization(input.text);

 }

 

 private function doResult(event:Object):Void{

  output.text =
event.result;

 }

 

 private function doFault(event:Object):Void{

  alert(Error
invoking CF:  + 
event.fault.faultstring);

 }

 
 ]]
 /mx:Script
 
 mx:RemoteObject
id=ro 
endpoint=http://gx270dev.childsupport.net/flashservices/gateway


 

source=Model.mUtilities.mUpdate.qry_UpdateAuthorization 

 
fault=doFault(event) 

 
result=doResult(event)

 /mx:RemoteObject
 
 mx:Panel
title=Updates

 mx:Form
defaultButton=sendButton

  mx:FormItem
label=Input: 
direction=horizontal

 
 mx:TextInput id=input/

 
 mx:Button id=sendButton 
label=Send
click=doClick()/

 
/mx:FormItem

  mx:DataGrid
id=output width=520 
wordWrap=true

  
mx:columns
 
  mx:Array

 
 mx:DataGridColumn width=200 
headerText=Update Form
columnName=Function/

 
  mx:DataGridColumn
width=320 
headerText=Description
columnName=Description/

 
/mx:Array

 
/mx:columns

  /mx:DataGrid

 /mx:Form
 /mx:Panel

/mx:Application


Many thanks,
Darius














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



  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.