WeCodeThings Library
Library of code bits
Glossary    Contact Us
Need a web designer? visit WeCodeThings.Com for more details
Search  
   
Browse by Category

WeCodeThings Library .: Flex .: Create Flex 3 Remote Object ColdFusion with Result and Fault Handlers for Flex 3



Create Flex 3 Remote Object ColdFusion with Result and Fault Handlers for Flex 3

More about creating a remote object and passing an argument to a cfc from Flex 3 can be found at my blog post, HERE

Create Result function that will handle what comes back from the cfc.

<mx:Script>

      <![CDATA[

            import mx.controls.Alert;

            import mx.rpc.events.FaultEvent;

            import mx.rpc.Fault;

            import mx.rpc.events.ResultEvent;

            private function result(evt:ResultEvent):void {

                  mygrid.dataProvider = evt.result;

            }

            private function fault(evt:FaultEvent):void {

                  Alert.show(evt.fault.message);                 

            }

      ]]>

</mx:Script>

The Source starts from your wwwroot folder on your server. in this expample, the name of my cfc is called "thecfc.cfc", my cfc is located in the folder "cfctest", which is on the wwwroot of my server. Note: case sensitive

<mx:RemoteObject id=”mycfc”

                  destination=”ColdFusion”

                  showBusyCursor=”true”

                  source=”cfctest.thecfc”

                  result=”result(event)”

                  fault=”fault(event)”>

</mx:RemoteObject>



How helpful was this article to you?

Related Articles

article Flex 3 Create Remote Object Destination ColdFusion using ActionScript And MXML Flex 3
You can read more about Flex 3 and Remote...

(No rating)  4-30-2009    Views: 1155   
article Flex 3 Get Data from a CFC ColdFusion using bindable result handler function
More about creating a remote object and...

(No rating)  4-21-2009    Views: 888   
article Flex 3 Fault Message FaultString FaultCode FaultDetail Handler Flex 3
They are plenty ways to display the fault...

(No rating)  4-28-2009    Views: 857   

User Comments

Add Comment
No comments have been posted.




.: Powered by Lore .:Code by WeCodeThings Website Design and Development