|
What I have done in the past is dumped the
form name which gives me the mxml code. Once I dump the code I can see what the
flex components I am using at that point I go to http://livedocs.macromedia.com/flex/15/asdocs_en/
and look up the specific component type and find out what properties and
functions are available. The flex API reference does give you a list of all
components what properties are included like the dataProvider. Larry From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Adams Hi, On 03/11/05, Do you have CF 7.1? If so: CFM Page. <cfform action=""
method="post" name="frm_test"
preloader="no" format="flash"
height="800" width="600" skin="haloblue"
>
<cfformitem type="script">
function getSites()
{
//create connection the flash services gateway already exists you will not need
to download or install anything new for coldfusion 7.1
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("http://<your
domain>/flashservices/gateway/");
var myService:mx.remoting.NetServiceProxy;
var responseHandler =
{};
//put the controls in scope to avoid calling _root
var selectBoxY = selectBoxY;
responseHandler. results: Object ):Void
{
//when results are back, populate the
cfselect
selectBoxY.dataProvider = results;
}
responseHandler.onStatus = function( stat: Object ):Void
{
//if there is any error, show an alert
alert("Error while calling cfc:" + stat.description);
}
//get service the first attribute is the path to your cfc
myService = connection.getService("wip.com.circuit", responseHandler
);
//make call
myService.GetSites();
}
</cfformitem>
<cfselect name="selectBoxY" label="Site"
required="yes" width="200" site
is required." >
</cfselect> </cfform> CFC: <cfcomponent displayname="circuit" >
<cffunction access="remote" name="getSites"
output="false" returntype="query">
<cfscript>
var sitesQuery = queryNew("data,label");
queryAddRow(sitesQuery);
querySetCell(sitesQuery,'data','1');
querySetCell(sitesQuery,'label','Dillon');
queryAddRow(sitesQuery);
querySetCell(sitesQuery,'data','6');
querySetCell(sitesQuery,'label','
queryAddRow(sitesQuery);
querySetCell(sitesQuery,'data','10');
querySetCell(sitesQuery,'label','Plaza');
</cfscript>
<cfreturn sitesQuery >
</cffunction> </cfcomponent> Here all you should have to change is the domain name and
change the path to the cfc. This should give you a basic example of how to call a cfc
using flash remoting. I must reference ASFusion because 99% of this code is pulled
from their site. From: [EMAIL PROTECTED]
[mailto:
[EMAIL PROTECTED]] On Behalf Of Stephen
Adams
Oh, all the tutorial I've seen seem to show that you
have to install it. How do I call CFC's using flash remoting from CF server? On
03/11/05, Muzak <[EMAIL PROTECTED]
> wrote: Remoting is built into ColdFusion. No need to buy
anything to use it with Forms.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
- RE: [CFCDev] Using CFC's with Flash forms without ... Chalmers, Larry
- Re: [CFCDev] Using CFC's with Flash forms wit... Marco Antonio C. Santos
- RE: [CFCDev] Using CFC's with Flash forms wit... Chalmers, Larry
- Re: [CFCDev] Using CFC's with Flash forms... Laura Arguello
