----------------------------------------------------------------------
Ian....
Q: Once a tag|object|code like that below is executed what do I have?
You have a link between Flex and the CFC. Not a permanet link, not a
connection, just a way to call REMOTE methods of your cfc.
Q: What can I do with what I have?
You can call the remote methods of the CFC
Q: Why do some examples use <mx:method...> child tags?
I think those are for web services, not "remote objects". The only
real difference is the web services go via SOAP, and the remoteobject
uses AMF ("remoting")
Q: How do I use the instance data in my CFC?
You mean persistent data? You can't. You can't have persistent data
in your remote objects without Flex Data Services. You could, in
theory, call a CFC that stores persistent data in session, but the CFC
itself is instantiated each time you call it. I think.
Q: How do I use the methods?
See this bit of code.. it's not complete but should give you an idea.
<mx:RemoteObject id="ro" source="cfcs.mycfc">
<mx:Operation name="getStates">
</mx:RemoteObject>
<mx:ComboBox id="foo" dataProvider="{ro.getStates.lastResult}"
labelField="STATE"/>
<mx:Button id="btnLoadStates" label="Load combo box" click="ro.getStates();">
----
<cfcomponent>
<cffunction name="getStates" access="remote" returnType="query">
<cfset var states = queryNew("ABBREV,STATE","varchar,varchar")>
<cfset QueryAddRow(states,1)>
<cfset querySetCell(states,"ABBREV","NC",1)>
<cfset querySetCell(states,"STATE","North Carolina",1)>
<cfreturn states>
</cffunction>
</cfcomponent>
Q: (your example follows)
> <mx:RemoteObject
> id="mobCalCFC"
> destination="ColdFusion"
> source="CFC.MobileCalendar"
> showBusyCursor="true"
> fault="mobCalCFC_faults(event)">
put the fault on the child tags.. along with the result if you want.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 &
Flex 2
Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU
Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4003
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37