RE: [flexcoders] Icon in the Panel bar

2005-10-03 Thread dfatta
Title: Message





You'll 
have to write a custom class for this.  It's a real pain...using the 
Embed() function won't do it.
 
Darius

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Simard, GhislainSent: Monday, October 03, 2005 11:12 
  AMTo: 'flexcoders@yahoogroups.com'Subject: [flexcoders] 
  Icon in the Panel barHow to add an icon in the Panel bar? 
   
  Thanks





--
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] Calls to CFCs

2005-09-29 Thread dfatta
Title: Message





I 
wrote a blurb on how to integrate Flex and CFCs.  It might be of some 
help.
 
http://www.cflex.net/showfiledetails.cfm?ObjectID=303
 
Darius

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Greg JohnsonSent: Thursday, September 29, 2005 9:35 
  AMTo: flexcoders@yahoogroups.comSubject: Re: 
  [flexcoders] Calls to CFCsHere is the start of the CFC 
  function        
                      
  I tried the change on 
  the variables and nothing.I then replaced the variables I was sending 
  with '' and in the cfc made innovators a string vs array and still got the 
  error message.Peter Farland wrote: 
  

I could probably solve your JRun errors too if you 
posted them... but that aside, I can help you turn on server side tracing 
for the CFMX 7 version of the gateway what you need to do is look out 
for the gateway-config.xml file that is specific to the gateway that you're 
calling. It might be under:
 
/WEB-INF/coldfusion/gateway-config.xml
 
I believe the servlet that's mapped to /flashservices 
will have an init param in /WEB-INF/web.xml that points you to the location 
of the configuration file that the gateway is using.
 
Anyway, in this file you'd set the logger to 
debug:
 
(whatever gateway 
logger implementation CF uses would be listed here... I think it was 
coldfusion.flash.ColdFusionLogger if I remember 
correctly)
 
You should then be able to look at the log to see a 
dump of the AMF traffic that went through the gateway's serializer... this 
might give you a clue as to which parameters are being sent to your CFC 
method.
 
I think CFMX 7 redirects log info to a flash.log. If 
you started JRun from the command line and wanted to just see this info on 
the console you could always switch to use the 
DefaultLogger:
 
flashgateway.log.DefaultLogger
 
 
Also, I'd still like to look at the  
and  tag signatures for your CFC 
method
 
 
In any case, can you try this 
instead:
 
var otd_tech_after_db:String = "";var 
otd_tech_before_db:String = "";
 
If 
it's not that, can you try narrowing down which attribute is causing it in 
the call (i.e. by sending null or something you know is a primitive type or 
a structure that could not possibly contain non-primitive types for the 
aforementioned Boolean, String or Class types... i.e. don't necessarily 
trust an API to return you a primitive until you've tracked down the 
cause)?
 
 



From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 
On Behalf Of Greg JohnsonSent: Thursday, September 29, 
2005 11:22 AMTo: flexcoders@yahoogroups.comSubject: 
Re: [flexcoders] Calls to CFCsI tried to set that once 
and started getting J-Run errors.  We are running MX7.I am not 
exactly doing that.  The related code that is run when that message 
shows up is below where Person_List is a datagrid, and otd_tech_after_db is 
empty at the time of the cfc callvar otd_tech_after_db:String = new 
String();var otd_tech_before_db:String = new String();function 
initFunction() {    
MainNavigation.visible=false;    
Selections.visible=false;    otd_tech_before_db = 
getToday();}function getToday():String {    
var today_date:Date = new Date();    var date_str:String 
= 
((today_date.getMonth()+1)+"/"+today_date.getDate()+"/"+today_date.getFullYear());    
return date_str;}private function getTechSearch():Void { 
        
mr_cfc.get_tech_search(otd_tech_before_db, otd_tech_after_db, 
getPIDs());}private function getPIDs():Array 
{     var SelectionPIDs:Array = new 
Array();     for (var i=0; i         SelectionPIDs[i] = 
Person_List.dataProvider[i].PERSON_ID;    
 }     return 
SelectionPIDs;}private function 
doResultGetTechSearch(result:Array):Void {    var 
TempObject:Object = new Object();    var 
GetTechSearchArray:Array = new Array();    for(var i=0; i 
< result.length; i++){ TempObject = 
result[i]; 
GetTechSearchArray.push(TempObject);    
}    OTD_TECH_RESULTS.dataProvider = 
GetTechSearchArray;}Peter Farland 
wrote: 

  
  Are you setting remote-objects-debug in 
  flex-config.xml? What version of ColdFusion are you using? 
  
   
  Re: the unsupported type in stream message... are you 
  doing anything like the following:
   
  var s:String = new String("foo");
  var 
  b:Boolean = new Boolean(true);
  var n:Number = new 
  Number(4);
   
  Unfortunately in AS1/AS2 the Flash Player does not 
  recognize the Object form of String, Boolean or Number type for 
  serialization purposes so it sends them (yes, oddly) as an unsupported 
 

[flexcoders] ColdFusion & Flex: How to integrate CFCs, Flex, RemoteObjects, etc.? My Guide for Newbies...

2005-09-13 Thread dfatta





Hi, 

 
It's 
amazing what desperation will do...also in a way, sad, that I had to try so long 
to get relatively simple functionality to work between CF and Flex.  In 
almost 10 years or programming, this is easily one of the most frustrating 
challenges I've ever encountered.  To say there's a lack of documentation 
on this subject is a huge understatement.
 
Enough 
venting...so, for any of you struggling CF programmers out there 
pounding your head against the wall trying to integrate Flex with CF, here are 
the steps (or secrets).  Let me just condition my instructions by saying 
that I'm not an expert in anyway on J2EE (and definitely not Flex) so I welcome 
any feedback.  My explanations are from a newbie 
perspective.
 
Also, 
I'd like to thank John Zhao of Macromedia, Tom Link's blog (http://tomlink.net/blog/index.cfm?mode=entry&entry=B662BEF9-7E97-A3B0-E3FB286E23BDAA50), 
and the users of this forum for helping me a long the way to this 
solution.
 
INSTALLATION AND DEPLOYMENT OF FLEX ON A J2EE 
SERVER
 
Install Flex onto a J2EE server (I use 
Websphere).  The steps are quite clear and can be found at: http://www.macromedia.com/support/documentation/en/flex/1/install.html.  
You need to be a little familiar with the J2EE platform and installing WAR 
files.
 
The 
trick here is that in order for CF and Flex to talk, you need to make sure you 
create a file in your CF root called 'crossdomain.xml'.  It should have the 
following statements:
 
  
 
CALLING A CFC FROM 
FLEX
 
The 
consensus in the Flex community seems to be that using the AMF protocol leads to 
the best performance and as such, calling RemoteObjects is the data model 
of choice when integrating with CF.
 
1) Using the RemoteObject tag, call a 
CFC
 
 
  
 
 

id: 
Identifier of RemoteObject call.  Will be called by ActionScript function 
below.
endpoint: The Flash gateway is part of CFMX 7 (not sure 
about CFMX 6.1).  Simply substitute your hostname and the path 
/flashservices/gateway.
source: This should be the relative path (separated by 
dots instead of slashes) to the CFC you're calling.
fault: 
Not entirely sure what this does, but I think it sends event errors to the 
debugger which then popup as alerts.
showBusyCursor: Optional.  Basically just shows 
the little clock while your CFC is being called.
 

name: 
Name of function in CFC.
result: ActionScript function that will handle the 
resultset from CF.  The result keyword represents the type of event 
returned from Flex.
 
2) Write ActionScript function to call 
CFC
 
I 
decided that the most efficient means to communicate with CFCs was to send 
single Arrays of parameters, instead of individual values, but it's your 
choice.  In this example I've hardcoded them.
 
ActionScript:
/*The 
doClick() function will be called later in your MXML file*/
 
private function 
doClick():Void{
var QueryArray:Array = new 
Array();
 
/*Notice that the 
queries start at element '0', not 1 as in 
CF.  */
QueryArray[0] = 
"jricha";QueryArray[1] = 
99;QueryArray[2] = 
"No";QueryArray[3] = 
"No";
 
*/This is a call 
to the RemoteObject, its method, and passes the above 
query.ro.invUpdateAuthorization(QueryArray); }
 
SETTING UP YOUR 
CFC
 
1) Calling the 
CFC
 
You'll 
want your CFC to accept the Array and return Array of Structures.  In this 
example, I call a query and the package the results accordingly to send back to 
Flex.
 

 
    
 

  

 

  

 
 


 
 
 

    
   

 


     

 
  
 
CREATE AN ACTIONSCRIPT FUNCTION TO ACCEPT CFC 
RESULTS
 
1) 
There will be a function that accepts the results from the CFC.  It 
was earlier defined in our Remote Object method:
 
result="doResult(event.result)"/>
 
This 
was a particularly confusing aspect to this entire process.  Flex needs 
values as objects in order to bind them to a datagrid or other components.  
As such, we must take our CFC Array and convert it to an array of objects.  
There's a lot of talk about ValueObjects, but I don't necessarily understand 
them except to the extent that they represent the data returned from a 
recordset.  I'm sure there's a more elegant process of doing this...but 
this works...at least for now...;-)
 
ActionScrpt:
 
/* Our 
CFC returns our structure of Arrays into the result Array. 
*/
private function doResult(result:Array):Void 
{
/* 
Create a new object */var UpdateVO:Object = new 
Object();
 
/* Create an 
array to house the objects */var 
UpdateResult:Array = new Array();
 
/* 
Loop over result array and populate new array with objects 
*/for(var i=0; i < result.length; 
i++){ UpdateVO = 
result[i]; UpdateResult.push(UpdateVO);}
 
/* This is Flex magic as far as 
I'm concerned, but basically your new array of objects can be assigned to 
your Flex component (in this case a datagrid as shown below) and it 
automatically puts all the piec

RE: [flexcoders] Referencing results from NetConnection Debugger

2005-08-31 Thread dfatta





Ahhh...That makes more 
sense...Thanks!!

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of KellySent: 
  Wednesday, August 31, 2005 4:21 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Referencing 
  results from NetConnection Debugger
  
  Whether it is a 
  reserved word or not had nothing to do with why it didn’t work in this 
  particular instance.
   
  It didn’t work 
  because the same variable name was being used in two 
  places.
   
  var result:Array = 
  result[0];
   
  This line was 
  overwriting every value in the array except for the first 
  one.
   
   
   
  
  
  
  
  From: 
  flexcoders@yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of Tracy 
  SprattSent: Wednesday, 
  August 31, 2005 6:50 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Referencing 
  results from NetConnection Debugger
   
  Hey man, don’t feel 
  bad, the goldurn compiler really should catch reserved 
  words!
  Tracy
   
  
  
  
  
  From: 
  flexcoders@yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com] 
  On Behalf Of 
  [EMAIL PROTECTED]Sent: Wednesday, August 31, 2005 6:38 
  PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Referencing 
  results from NetConnection Debugger
   
  
  That was it!! One 
  day, my brain will inevitably explode from a syntax 
  error...:-)
  
   
  
  Many 
  thanks!
  
  Darius
  
-Original 
Message-From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com]On Behalf Of Kelly RSent: Wednesday, August 31, 2005 12:01 
PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Referencing 
results from NetConnection Debugger

Dont 
name your internal variable result:
var result:Array = 
result[0];Name it something else like 
myResult:
var myResult:Array = 
result[0];
 

  
  
  
  From: "coldfs" 
  <[EMAIL PROTECTED]>Reply-To: flexcoders@yahoogroups.comTo: 
  flexcoders@yahoogroups.comSubject: 
  [flexcoders] Referencing results from 
  NetConnection DebuggerDate: Wed, 31 Aug 2005 17:43:43 
  -Hi,Here's the RO result using the NetConnection 
  Debugger.  I have a function that can always read the first array element, 
  but the others aren't 
  readable.  I've tried every combination but can't reference 
  the other array 
  elements.  I would greatly appreciate any help? 
  Thanks,Darius--AS 
  functionprivate function 
  handleSearchResult(result:Array):Void{/this works, displays 
  'Inactive'var result:Array = 
  result[0];alert(result["CStatus"]);//this doesn't work, blank 
  valuevar result:Array = 
  result[1];alert(result["CStatus"]);--NetConnection 
  Debugger--Result 
  (object #2).[0] (object 
  #3)..AStatus: 
  ""..CStatus: 
  "Inactive"..PStatus: 
  ""..BirthDate (object 
  #4)..."Tue May 1 
  01:00:00 GMT-0700 2001".[1] (object #5)..AStatus: ""..CStatus: "Active"..PStatus: ""..BirthDate (object 
  #6)..."Sat May 7 
  01:00:00 GMT-0700 2000".[2] (object #7)..AStatus: ""..CStatus: "Inactive"..PStatus: "Never"..BirthDate (object 
  #8)..."Sun Feb 2 
  00:00:00 GMT-0800 1998".[3] (object #9)..RecordCount: 
  1--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  
  
  SPONSORED 
  LINKS 
  
  

  
Web 
site design 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. 

   
  
  
  
  
   






--
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
  
  
Software design and development
  
  
Macromedia flex
  
  


Software development 

RE: [flexcoders] Referencing results from NetConnection Debugger

2005-08-31 Thread dfatta





That 
was it!! One day, my brain will inevitably explode from a syntax 
error...:-)
 
Many 
thanks!
Darius

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of Kelly RSent: 
  Wednesday, August 31, 2005 12:01 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Referencing 
  results from NetConnection Debugger
  
  Dont name your internal variable result:
  var result:Array = 
  result[0];Name it something else like myResult:
  var myResult:Array = 
  result[0];
  
  
  

From: "coldfs" <[EMAIL PROTECTED]>Reply-To: 
flexcoders@yahoogroups.comTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Referencing 
results from NetConnection DebuggerDate: Wed, 31 Aug 2005 
17:43:43 -Hi,Here's the RO result using the 
NetConnection Debugger.  I have a function that can always read the 
first array element, but the others aren't readable.  I've tried 
every combination but can't reference the other array elements.  I 
would greatly appreciate any help? Thanks,Darius--AS 
functionprivate function 
handleSearchResult(result:Array):Void{/this works, displays 
'Inactive'var result:Array = 
result[0];alert(result["CStatus"]);//this doesn't work, blank 
valuevar result:Array = 
result[1];alert(result["CStatus"]);--NetConnection 
Debugger--Result (object #2).[0] (object 
#3)..AStatus: ""..CStatus: 
"Inactive"..PStatus: ""..BirthDate (object 
#4)..."Tue May 1 01:00:00 GMT-0700 2001".[1] (object 
#5)..AStatus: ""..CStatus: 
"Active"..PStatus: ""..BirthDate (object 
#6)..."Sat May 7 01:00:00 GMT-0700 2000".[2] (object 
#7)..AStatus: ""..CStatus: 
"Inactive"..PStatus: "Never"..BirthDate (object 
#8)..."Sun Feb 2 00:00:00 GMT-0800 1998".[3] (object 
#9)..RecordCount: 
1--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 

SPONSORED 
LINKS 

  
  
Web 
  site design 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. 
  








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



  









RE: [flexcoders] CFC debugging & netConnectionDebugger

2005-08-25 Thread dfatta





N I C 
E ...This is a huge advancement forward in 
debugging Flex with CFC...I'm beginning to see the 
light...;-)
 
But, 
(there's always a 'but')...I'm not using Application.cfc, but 
Application.cfm...should I just define the following in the 
cfc?
 
   // error trapping 
parameters   request.error.email = "[EMAIL PROTECTED]";   request.error.enableEmail 
= false;   request.error.enableErrorFile = 
true;
 
A big 
thank you from all of us CFCers,
Darius

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of MalcolmSent: 
  Thursday, August 25, 2005 5:42 PMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] CFC debugging & 
  netConnectionDebugger
  
  In recent posts to the group I can see people having 
  with fun tracking down bugs in their CFC’s from Flex. Inspired me to write a 
  post on flex daddy…
   
  http://www.flexdaddy.info/2005/08/26/waiter-there-is-a-bug-in-my-cfc/
   
  A very handy CustomTag is available for download that 
  returns all cfcatch information to the netConnectionDebugger. No more 
  “debugging in the dark” as Darius put it :]
   
  Cheers,
  Malcolm





--
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] Is it possible to return multiple recordsets to Flex from one Remote Object call

2005-08-19 Thread dfatta





Allen 
& Stephen,
 
Thank 
you both for you advice.  I like your ideas of passing back an Array of 
Value Objects.  I've read only generalities on how to actually code 
this.  Currently, my Flex app calls a cfc that includes a query and 
populates an Array of Structures.  I took a stab at trying to re-code this 
but have gotten stuck (code below).  I think I'm still unclear as to how to 
build an array of VOs (let alone returning multiple one's).  Can you take a 
look? 
 
BTW, I 
just finished Chapter 8 of your great book, Stephen! I know all us Flex newbies 
are indebted to you for this invaluable resource.
 
Best 
regards,
Darius
 
 
Flex:

private function 
getObject():Void{   var aperson :Object = new 
Object();   aperson.username="dfatta";   aperson.CCode= 
"37";   aperson.CFlag="No";   aperson.COAFlag 
= 
"No";   ro.getObject({p:aperson});  }
 
 
CFC:


 
  "Array">   ArrayNew(1)>  p[1] 
>  p[2]>  p[3]>  p[4]>
 

 
   
  
 
     

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of Allen 
  ManningSent: Friday, August 19, 2005 5:19 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Is it possible 
  to return multiple recordsets to Flex from one Remote Object 
  call
  
  Darius,
   
  I don’t know, 
  passing back an uber array feels a bit monolithic (but maybe good for 
  performance?).  Why not break them down into different Array’s of Value 
  Objects.
   
  For 
  example:
   
  EmployeeListVO – 
  array of Employee VOs
  InvoiceListVO – 
  array of Invoice VOs
  FooListVO – array 
  of Foo VOs
   
  Now you have the 
  fine grained control of just asking for one or all of them.  And you can 
  do what you want with each.  We represent our VOs as CFCs.  This 
  allows you to type the package path in the returnType attribute of your 
  CFCs.  Queries and Structures are not typed, you could get anything back 
  and ColdFusion won’t report any problems.  How do you check for a well 
  formed Struct or a well formed Query?  You might also want to look at the 
  advantages of automatic object conversion into ActionScript.  You could 
  have a 1:1 mapping between FooVO.cfc and 
FooVO.as.
   
  Hope that 
  helps,
  Allen
  www.prismix.com/
   
   
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mika KiljunenSent: 19 August 2005 06:42To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Is it possible 
  to return multiple recordsets to Flex from one Remote Object 
  call
   
  Why not return an 
  arrray containing recordsets and then setting the recordsets from the array as 
  dataproviders to your controls by actionscript as 
  follows:
   
  resultArray looks 
  like:
      
  [0] Recordset1 (an array of resultobjects from query 
  1)
      
  [1] Recordset2 (an array of resultobjects from query 
  2)
      
  [2] Recordset3 (an array of resultobjects from query 
  3)
      
  ….
   
  And:
   myGrid.dataProvider 
  = resultArray[0];
      
  myOtherGrid.dataProvider = resultArray[1];
      
  …
   
   
  -Mika
   
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of coldfsSent: 19. elokuuta 2005 3:40To: flexcoders@yahoogroups.comSubject: [flexcoders] Is it possible to 
  return multiple recordsets to Flex from one Remote Object 
  call
   
  Hi,My Flex app connects to a large ColdFusion 
  application.  When I make calls from Flex via RO to CF, I need to return more than 
  one recordset in order to 
  populate my various datagrids.  I know how to return one recordset as an Array of Structures, but what if 
  I have 5 different querries that 
  have 5 different recordsets.  How does one deal with this?Many thanks for any clarification one can 
  give.Darius
  --No virus found in this incoming message.Checked by 
  AVG Anti-Virus.Version: 7.0.338 / Virus Database: 267.10.12/77 - Release 
  Date: 18/08/2005
  --No virus found in this outgoing message.Checked by 
  AVG Anti-Virus.Version: 7.0.338 / Virus Database: 267.10.12/77 - Release 
  Date: 18/08/2005





--
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] Calling ArrayStructures in CFCs from Flex

2005-08-15 Thread dfatta





Hi 
Malcolm,
 
Thanks 
for your advice.  Jeff's solutions worked well if you want to take a 
look.  I'm going to try to post my completed solution on some site.  

 
Darius

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of MalcolmSent: 
  Wednesday, August 10, 2005 4:48 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Calling 
  ArrayStructures in CFCs from FlexHi Darius,I 
  too went through the same pain (days & days of trying see what data 
  typesI could successfully return from a CFC).I'm still learning 
  but in my somewhat limited experience I could find no wayto return an 
  array datatype, it just wouldn't do it no matter what I tried,same goes 
  for structures. I have successfully returned the 
  followingdatatypes::String:Query:Boolean:Numeric 
  (yet to try):Date (yet to try)It's interesting to note that Flex 
  (somehow) in the background actuallyconverts a ColdFusion query to an 
  array. (Search the group on how these canbe accessed)At the moment 
  I am mostly using queries to get data back. This has theunfortunate side 
  effect of losing typing (everything in the query is astring), thus you may 
  need cast some results etc to their correct type 
  inFlex.Malcolm-Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] OnBehalf Of 
  coldfsSent: Friday, 5 August 2005 7:29 AMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Calling ArrayStructures in 
  CFCs from FlexHi,Using Tom Link's blog (http://tomlink.net/blog/index.cfm?mode=entry&entry=B662BEF9-7E97-A3B0-E3FB286E23BDAA50) 
  and other sources, I've been trying for days to translate queries to 
  arrays of structures (and vice versa).  Whatever I do, the cfc 
  doesn't except my values from Flex as arrays.  I know it's a chunk of 
  code to review, but you'd help a sane man going slowly 
  mad...:-)Many 
  thanks,Darius---index.mxml:---http://www.macromedia.com/2003/mxml">  
    
      
    
      
  endpoint="http://gx270dev.net/flashservices/gateway" 
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 
  fault="mx.controls.Alert.show(event.fault.faultstring)" 
  showBusyCursor="true">  
    result="doResult(event.result)"/>  
    
         
  wordWrap="true" 
  dataProvider="{RecordSetModel}">  
      
    
      
      
    
      
      
  width="200" headerText="Update Form" 
  columnName="Function"/>  
      
      
  width="320" headerText="Description" 
  columnName="Description"/>  
      
       
    
      
    
    
    
      
    
  --fx_UpdateAuthorization.cfc--  
    ("component","qry_UpdateAuthorization")>  
      
    returntype="array">  
    type="array" required="yes">  
    required="yes">  
    required="yes">  
    type="array" 
  required="yes">  
    required="yes">  
    (obj.GetUpdateAuthorization(AuthorizedUserIdObject,CountyCodeObject,CaseFlagObject,CourtOrderAvailableFlagObject,DsnObject))>  
    
  -qry_UpdateAuthorization.cfc-  
    returntype="query">  
    required="yes">  
    required="yes">  
    required="yes">  
    type="array" required="yes">  
      
    DATASOURCE="#Arguments.Dsn#">  
      TYPE="IN" 
  VALUE="#Arguments.AuthorizedUserId#" 
  CFSQLTYPE="CF_SQL_CHAR">  
      VALUE="#Arguments.CountyCode#" 
  CFSQLTYPE="CF_SQL_CHAR">  
      VALUE="#Arguments.CaseFlag#" 
  CFSQLTYPE="CF_SQL_CHAR">  
      DBVARNAME="CourtOrderAvailableFlag" TYPE="IN" 
  VALUE="#Arguments.CourtOrderAvailableFlag#" 
  CFSQLTYPE="CF_SQL_CHAR">  
        
    
    
         
    
  -Base.cfc-  
      
  required="yes">  
      
      
      
        
    
    
    addnewline="yes" 
  output="#varToOutput#">  
    
    
    
  /**  * Converts a query object into an array 
  of structures.  * 
    * @param query 
    The query to be transformed 
    * @return This function returns a 
  structure.   * @author Nathan Dintenfass 
  ([EMAIL PROTECTED])   * @version 1, 
  September 27, 2001   
  */  function 
  QueryToArrayOfStructures(theQuery){  
    var theArray = 
  arraynew(1);    
  var cols = ListtoArray(theQuery.columnlist);  
    var row = 1;  
    var thisRow = 
  "";    var col = 
  1;    for(row = 
  1; row LTE theQuery.recordcount; row = row + 
  1){    
    thisRow = 
  structnew();    

RE: [flexcoders] Calling ArrayStructures in CFCs from Flex

2005-08-12 Thread dfatta
Title: Message





Thanks, Jeff.  That helps...
 
I'm 
still stuck on how to handle the return recordset from the cfc.  If case 
sensitivity doesn't matter, how do you recommend dynamically getting all the 
data into the structure?
 
        
    
    
   
    
   

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of Battershall, 
  JeffSent: Friday, August 12, 2005 6:38 AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Calling 
  ArrayStructures in CFCs from Flex
  Darius,
   
  What 
  you want is an array of structures (what Flex wants), not a structure of 
  arrays (what a CF Query is).  By using queryname.columnList, you get the 
  keys you want to dynamically populate each structure, but unfortunately,  
  case sensitivity of column names isn't preserved - so you may end up hard 
  coding each structure key if case sensitivity of your struct keys matters to 
  your application. Also, your cfset var will have to be placed at the top of 
  the function body, just after your CFARGUMENT tags. 
   
  Jeff
  

-Original Message-From: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf 
Of [EMAIL PROTECTED]Sent: Thursday, August 11, 2005 5:57 
PMTo: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Calling ArrayStructures in CFCs from Flex
Jeff,
 
Great example! It almost works for me except the cfc I call from Flex 
is a facade to my cfc query.  The cfc query returns a variable that 
needs to be converted to an array or whatever before being put into a 
structure.  Do you have any ideas how to do this?  Many thanks, 
Darius
 
 
      
   
 
    
  
        
    
    
   
    
   
    
    
  

 
  
 
  
 
 

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
  Behalf Of Battershall, JeffSent: Thursday, August 11, 2005 
  8:38 AMTo: flexcoders@yahoogroups.comSubject: RE: 
  [flexcoders] Calling ArrayStructures in CFCs from 
  FlexI'm jonny-come-lately to this thread, but I 
  send and return arrays andstructures to/from CFCs all the time.  
  I've abandoned passing backCFQueries as such but convert them to an 
  array of structures first asthat is what Flex UIComponents seem to 
  like. Example code:access="public">  
      
    
      
      
      
    datasource="#getDataSource()#">  
      
    
    
    
      
      
        
        
        
        
      
    
    
      
      
    If you 
  were dealing with a dynamic list of columns the code could bealtered 
  as such:  
      
      
        
    
    
      
    Produced 
  in this fashion, Flex WILL accept this result as an array 
  ofstructures. I'm mystified at the problem you're experiencing. 
  Jeff-Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
  OnBehalf Of MalcolmSent: Wednesday, August 10, 2005 7:48 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Calling 
  ArrayStructures in CFCs from FlexHi Darius,I too went 
  through the same pain (days & days of trying see what datatypes I 
  could successfully return from a CFC).I'm still learning but in my 
  somewhat limited experience I could find noway to return an array 
  datatype, it just wouldn't do it no matter what Itried, same goes for 
  structures. I have successfully returned 
  thefollowingdatatypes::String:Query:Boolean:Numeric 
  (yet to try):Date (yet to try)It's interesting to note that 
  Flex (somehow) in the background actuallyconverts a ColdFusion query 
  to an array. (Search the group on how thesecan be accessed)At 
  the moment I am mostly using queries to get data back. This has 
  theunfortunate side effect of losing typing (everything in the query 
  is astring), thus you may need cast some results etc to their correct 
  typein Flex.Malcolm-Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
  OnBehalf Of coldfsSent: Friday, 5 August 2005 7:29 AMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Calling 
  ArrayStructures in CFCs from FlexHi,Using Tom Link's blog 
  (http://tomlink.net/blog/index.cfm?mode=entry&entry=B662BEF9-7E97-A3B0-E3FB286E23BDAA50) 
  and oth

RE: [flexcoders] Calling ArrayStructures in CFCs from Flex

2005-08-11 Thread dfatta
Title: Message





Jeff,
 
Great 
example! It almost works for me except the cfc I call from Flex is a facade to 
my cfc query.  The cfc query returns a variable that needs to be converted 
to an array or whatever before being put into a structure.  Do you have any 
ideas how to do this?  Many thanks, Darius
 
 
      
   
 
      
        
    
    
   
    
   
    
    
  
 
  
 
  
 
 

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Battershall, JeffSent: Thursday, August 11, 2005 8:38 
  AMTo: flexcoders@yahoogroups.comSubject: RE: 
  [flexcoders] Calling ArrayStructures in CFCs from 
  FlexI'm jonny-come-lately to this thread, but I send 
  and return arrays andstructures to/from CFCs all the time.  I've 
  abandoned passing backCFQueries as such but convert them to an array of 
  structures first asthat is what Flex UIComponents seem to like. 
  Example code:access="public">  
        
        
      
      
  datasource="#getDataSource()#">  
        
    
    
      
      
        
        
        
        
      
    
    
      
      
    If you were 
  dealing with a dynamic list of columns the code could bealtered as 
  such:  
      
        
      
    
    
      
    Produced in 
  this fashion, Flex WILL accept this result as an array ofstructures. I'm 
  mystified at the problem you're experiencing. 
  Jeff-Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] OnBehalf Of 
  MalcolmSent: Wednesday, August 10, 2005 7:48 PMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] Calling 
  ArrayStructures in CFCs from FlexHi Darius,I too went 
  through the same pain (days & days of trying see what datatypes I 
  could successfully return from a CFC).I'm still learning but in my 
  somewhat limited experience I could find noway to return an array 
  datatype, it just wouldn't do it no matter what Itried, same goes for 
  structures. I have successfully returned 
  thefollowingdatatypes::String:Query:Boolean:Numeric 
  (yet to try):Date (yet to try)It's interesting to note that Flex 
  (somehow) in the background actuallyconverts a ColdFusion query to an 
  array. (Search the group on how thesecan be accessed)At the moment 
  I am mostly using queries to get data back. This has theunfortunate side 
  effect of losing typing (everything in the query is astring), thus you may 
  need cast some results etc to their correct typein 
  Flex.Malcolm-Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] OnBehalf Of 
  coldfsSent: Friday, 5 August 2005 7:29 AMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Calling ArrayStructures in 
  CFCs from FlexHi,Using Tom Link's blog (http://tomlink.net/blog/index.cfm?mode=entry&entry=B662BEF9-7E97-A3B0-E3FB286E23BDAA50) 
  and other sources, I've been trying for days to translate queries to 
  arrays of structures (and vice versa).  Whatever I do, the cfc 
  doesn't except my values from Flex as arrays.  I know it's a chunk of 
  code to review, but you'd help a sane man going slowly 
  mad...:-)Many 
  thanks,Darius---index.mxml:---http://www.macromedia.com/2003/mxml">  
    
      
    
      
  endpoint="http://gx270dev.net/flashservices/gateway" 
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 
  fault="mx.controls.Alert.show(event.fault.faultstring)" 
  showBusyCursor="true">  
    result="doResult(event.result)"/>  
    
         
  wordWrap="true" 
  dataProvider="{RecordSetModel}">  
      
    
      
      
    
      
      
  width="200" headerText="Update Form" 
  columnName="Function"/>  
      
      
  width="320" headerText="Description" 
  columnName="Description"/>  
      
       
    
      
    
    
    
      
    
  --fx_UpdateAuthorization.cfc--  
    ("component","qry_UpdateAuthorization")>  
      
    returntype="array">  
    type="array" required="yes">  
    required="yes">  
    required="yes">  
    type="array" 
  required="yes">  
    required="yes">  
    (obj.GetUpdateAuthorization(AuthorizedUserIdObject,CountyCodeObject,CaseFlagObject,CourtOrderAvailableFlagObject,DsnObject))>  
    
  -qry_UpdateAuthorization.cfc-  
    returntype="query">  
    required="yes">  

RE: [flexcoders] Overlay container on panels

2005-07-28 Thread dfatta
Title: Message





Thanks, Sree.  That helps enormously.
 
I'm 
still a bit confused by the HBox and VBox components.  Should one treat the 
HBox as a row (i.e., tr), and a VBox as a cell (i.e., td)? For instance, if I 
want two panels to be side by side, do I put them in one HBox with two nested 
VBox? What would be the syntax for that?
 
I 
can't wait till I get I2 Flex book in the mail.  I need to review some 
basics before I move forward.
 
Darius

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Sreejith UnnikrishnanSent: Wednesday, July 27, 2005 11:11 
  PMTo: flexcoders@yahoogroups.comSubject: Re: 
  [flexcoders] Overlay container on panelsHi, I ran 
  through your code.Looks like you have not quite understood the concept of 
  using mx:Canvas. Also I found that your layout is in total 
  disarray!Use these guidelines for basic layout.   1. You 
  use mx:HBox to layout components horizontally.   2. Use mx:VBox 
  to layout components vertically   3. Use mx:Canvas to layout 
  components over each other or you have  real 
  reason to moce around components on the stage.   4. For your 
  requirement, I assume an accordian would be the best.   5. Try 
  and avoid statically positioning/sizing components. 
  Use  percentages as much as possible. (I 
  myself have started seeing the  beauty of 
  flexi/scalable layouts! and I believe this is what 
  Flex  makes your layout a lot more 
  attractive)If I understand your requirement correctly, you want to 
  just show and hide the shopping cart on click of a button.So do the 
  following.Put all your code, EXCEPT the shopping cart in a VBox/HBox. 
  Lets call it ALLOTHERCODE.And the shopping cart - CARTThen 
  your code should look like this.Let 
  us know if it helps ...I suggest you work with a skeleton structure in the 
  begining with just containers.Once you are happy with the result, 
  populate the PieCharts, Datagrids, etc (typically how you would approach 
  HTML page design)RegardsSree[EMAIL PROTECTED] 
  wrote:> I thought this would do it but I'm still getting the same 
  problem.  I > have one canvas tag that wraps all my other 
  code.  I'm scratching my > head on this one... >  
  > If you could take a second look, I've included the modified code 
  below:>  > Also, a general layout question.  Is it 
  good practice to have one > canvas for your entire application that you 
  then nest other containers > and components in? Just 
  wondering...>  > Thanks,> Darius>  
  >  >  > > http://www.macromedia.com/2003/mxml" 
  > xmlns="*" initialize="doClick()">>  >  
  >  >  >  
  > 
  > 
  >  
  >  >  > 
  endpoint="http://gx270dev.net/flashservices/gateway" 
  > source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" > 
  fault="mx.controls.Alert.show(event.fault.faultstring)" > 
  showBusyCursor="true">>   >  
  >  >  >  
  >  
  > > dataProvider="{PaymentSources}" 
  showDataTips="false" width="68" > height="64" 
  resizeEffect="Resize">>  
  >    
  >  
  > 
  labelFunction="display"/>>   
  > 
  > 
  >  >  
  > 
  width="50" 
  click="cart.visible=!cart.visible"/>> 
  > borderStyle="solid" 
  marginTop="8" marginLeft="8" marginBottom="8" > marginRight="8" 
  visible="false" showEffect="showCart" > hideEffect="hideCart" x="62" 
  y="41">>    
  >   
  >   
  >   
  >   
  > headerText="Name" 
  width="200"/>>   
  > headerText="Price" 
  width="100"/>>   
  >   
  >   
  > 
  >   >  > 
  >  > height="121" >>    
  >  
  >    
  >  
  >  
  >  
  >  
  > columnName="Residence" 
  />>  
  >  
  >  
  >  
  > columnName="Paternity" 
  />>  
  >  
  >  
  >    
  >  
  >    >  
  >    >    > mouseDown="showWindow(true)" 
  wordWrap="true">>  
  >    
  >  
  > 
  columnName="Function"/>>  
  >  
  >    
  >  
  >    >  
  > >  
  >  >> -Original 
  Message-> *From:* 
  flexcoders@yahoogroups.com> 
  [mailto:[EMAIL PROTECTED] Behalf Of 
  *Sreejith> 
  Unnikrishnan> *Sent:* Wednesday, July 27, 2005 
  1:19 PM> *To:* 
  flexcoders@yahoogroups.com> *Subject:* Re: 
  [flexcoders] Overlay container on 
  panels>> The key to overlay is using 
  mx:Canvas and putting the containers> 
  inside> the 
  canvas.> You can then set the visibility of 
  each of those containers.>> 
  Sree>> coldfs 
  wrote:>> > 
  Hi,> >> > 
  I have a vertical container that I need to overlay all other 
  panels> > upon the click of a button.  
  I used the code in the Flex> explorer 
  and> > got everything working except the 

RE: [flexcoders] Overlay container on panels

2005-07-27 Thread dfatta





I 
thought this would do it but I'm still getting the same problem.  I have 
one canvas tag that wraps all my other code.  I'm scratching my head on 
this one...  
 
If you 
could take a second look, I've included the modified code 
below:
 
Also, 
a general layout question.  Is it good practice to have one canvas for your 
entire application that you then nest other containers and components in? Just 
wondering...
 
Thanks,
Darius
 
 
 

 
    
        
        
   
 
  
    
    
      
   
  
  
  
  
  
  
  
  
    
   
     
   
 
          
   
 
       
   
 
   
 
 
 
   
 
   
 
 
 

  -Original Message-From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED]On Behalf Of Sreejith 
  UnnikrishnanSent: Wednesday, July 27, 2005 1:19 PMTo: 
  flexcoders@yahoogroups.comSubject: Re: [flexcoders] Overlay 
  container on panelsThe key to overlay is using 
  mx:Canvas and putting the containers inside the canvas.You can then 
  set the visibility of each of those containers.Sreecoldfs 
  wrote:> Hi,>> I have a vertical container that I need 
  to overlay all other panels> upon the click of a button.  I used 
  the code in the Flex explorer and> got everything working except the 
  ability for the container to> overlay my other panels.  Is there 
  an attribute or other trick to> doing this.>> Thank 
  you,> Darius>> 
  > 
  > 
  > 
  >>   
  > 
  > 
  width="50" 
  click="cart.visible=!cart.visible"/>>    
  >>    
  > borderStyle="solid" 
  marginTop="8" marginLeft="8" marginBottom="8"> marginRight="8" 
  visible="false" showEffect="showCart"> hideEffect="hideCart" x="62" 
  y="41">> 
  > 
  > 
  > 
  > 
  > headerText="Name" 
  width="200"/>> 
  > headerText="Price" 
  width="100"/>> 
  > 
  > 
  >    
  >> --> 
  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 
  .>>> 
  >





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

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) 
  
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=entry&entry=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'.>>--http://www.macromedia.com/2003/mxml" 
  >xmlns="*">>>  
  >  
  >  
  >  
  >  >endpoint="http://gx270dev.childsupport.net/flashservices/gateway" 
  >    
  >  
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 
  >    
    fault="doFault(event)" 
  >    
    
  result="doResult(event)">>>  
  >  
  >  >  
    >  
      >direction="horizontal">>  
      
    >  
      
    >label="Send" 
  click="doClick()"/>>  
      
  >  
      >wordWrap="true">>  
        
  >      
      
  >  
      
    >headerText="Update Form" 
  columnName="Function"/>>  
      
      >headerText="Description" 
  columnName="Description"/>>  
        
  >  
      
  >  
        
  >  
    
  >  
  >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.



  









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'.--http://www.macromedia.com/2003/mxml" 
  xmlns="*">  
    
    
    
    endpoint="http://gx270dev.childsupport.net/flashservices/gateway" 
      
    
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 
      
    fault="doFault(event)" 
      
    
  result="doResult(event)">  
    
      
      
      direction="horizontal">  
      
      
      
    label="Send" 
  click="doClick()"/>  
      
    
      wordWrap="true">  
        
        
      
    
      
    headerText="Update Form" 
  columnName="Function"/>  
      
      headerText="Description" 
  columnName="Description"/>  
        
    
      
    
        
    
    
    
  Many 
  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,
 
As you 
probably noticed, I primarily used your excellent example from your blog.  
Thanks for the head start.  It has really helped.
 
I 
changed the doResult function as you specified and the error disappeared but the 
query still didn't return any results.  I looked at the bpurcell example 
and he converts his record set into an array.  This makes sense except his 
version seems to be using Web Services.  Nevertheless, it looks like I need 
to bind something to the data provider attribute of the DataGrid...I just don't 
know how.
 
Here 
are the edits to my code and the CFC:
 
MXML:
private function 
doResult(event:Object):Void{   output.dataProvider = 
event.result._items;
 
  }
 
 
 
   
  
  
    
  

 
CFC:
 
 
  

 
 
 

 
 
Thanks,
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=entry&entry=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'.>>--http://www.macromedia.com/2003/mxml" 
  >xmlns="*">>>  
  >  
  >  
  >  
  >  >endpoint="http://gx270dev.childsupport.net/flashservices/gateway" 
  >    
  >  
  source="Model.mUtilities.mUpdate.qry_UpdateAuthorization" 
  >    
    fault="doFault(event)" 
  >    
    
  result="doResult(event)">>>  
  >  
  >  >  
    >  
      >direction="horizontal">>  
      
    >  
      
    >label="Send" 
  click="doClick()"/>>  
      
  >  
      >wordWrap="true">>  
        
  >      
      
  >  
      
    >headerText="Update Form" 
  columnName="Function"/>>  
      
      >headerText="Description" 
  columnName="Description"/>>  
        
  >  
      
  >  
        
  >  
    
  >  
  >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.