In your result handler just make an alert that displays the message returned.

 

<mx:method name=”someMethod” result=”Alert.show(event.result)” />

 


From: [email protected] [mailto:[email protected]] On Behalf Of Jeremy Rottman
Sent: Friday, October 07, 2005 12:20 PM
To: [email protected]
Subject: [flexcoders] returning a confirmation

 

I have a simple app that I am I writing, that uses a cf backend. After
a user inserts data into the database, I would like to display a
confirmation to them tell them what file number they have entered. My
cfc works fine, but I am not sure how I should return the confirmation
from my cfc into flex. I have attached my cfc code for one of my
functions.

      <!--- Admin Add Sale Function --->
      <cffunction name="qiAdminAddSale" access="remote" returntype="string"
output="true">
            <cfargument name="fileNum" type="string" required="Yes" />
            <cfargument name="mlsNum" type="string" required="no" />
            <cfargument name="propStreet" type="string" rrequired="Yes" />
            <cfargument name="propNum" type="string" required="Yes" />
            <cfargument name="propDir" type="string" required="no" />
            <cfargument name="propAPN" type="string" required="no" />
            <cfargument name="propCity" type="string" required="Yes" />
            <cfargument name="propState" type="string" required="Yes" />
            <cfargument name="propZip" type="string" required="Yes" />
            <cfargument name="propCoe" type="string" required="Yes" />
            <cfargument name="propPrice" type="string" required="Yes" />
            <cfargument name="buyerName" type="string" required="no" />
            <cfargument name="sellerName" type="string" required="no" />
            <cfargument name="agentId" type="string" required="no" />
            <cfargument name="agentId2" type="string" required="no" />
            <cfargument name="agentId3" type="string" required="no" />
            <cfquery name="qiAdminAddSale" datasource="#application.dsn#">
            insert into tbl_smartPanel_propInfo
            (fld_fileNum, fld_mlsNum, fld_propStreet, fld_propNum, fld_propDir,
fld_propCity, fld_propState, fld_propZip,
            fld_buyerName, fld_sellerName, fld_propCoe, fld_propPrice,
fld_propAPN, fld_agentId, fld_agentId2, fld_agentId3)
            values(
            '#arguments.fileNum#', '#arguments.mlsNum#',
'#arguments.propStreet#', '#arguments.propNum#', '#arguments.propDir#',
            '#arguments.propCity#', '#arguments.propState#',
'#arguments.propZip#', '#arguments.buyerName#',
            '#arguments.sellerName#', '#arguments.propCoe#',
'#arguments.propPrice#', '#arguments.propAPN#', '#arguments.agentId#',
            '#arguments.agentId2#', '#arguments.agentId3#')
            </cfquery>
            <cfset msg = "File Number: '#arguments.fileNum#' has been added">
            <cfreturn msg />
      </cffunction>






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




Reply via email to