| Subject: | Re: Passing Parameters To CFC |
|---|---|
| From: | "BKBK" <webforumsuser@xxxxxxxxxxxxxx> |
| Date: | Mon, 31 Dec 2007 11:10:45 +0000 (UTC) |
| Newsgroups: | macromedia.coldfusion.flash_integration |
Here is some pseudocode. It assumes the component is stored as
[i]records.cfc[/i] in the current folder.
records.cfc
============
<cfcomponent>
<!--- the method accepts an argument, returns a query --->
<cffunction name="getRecords" returntype="query">
<cfargument name="myVar">
<cfquery name="myQuery">
</cfquery>
<cfreturn myQuery>
</cffunction>
</cfcomponent>
Then, on the page containing the cfselect, you will do something like
<!--- create component object --->
<cfset recordsObj = createobject("component", "records")>
<!--- get the query from the component --->
<cfset myRecords = recordsObj.getRecords(someVar)>
<!--- use the query in the cfselect --->
<cfselect query="myRecords">
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Flash 8 combo box dataprovider using coldfusion 8 cfc, Jim Schell |
|---|---|
| Previous by Thread: | Passing Parameters To CFC, Natty2112 |
| Next by Thread: | Flash 8 combo box dataprovider using coldfusion 8 cfc, Jim Schell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |