Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
Natty2112 #1
Passing Parameters To CFC
I am testing how to return data from a CFC within Flash Forms. I have a simple
<cfselect> tag that will hold data returned from a CFC. This CFC returns all
records and works fine. I call the CFC with a simple tag (as follows):
<cfset getRegions = application.regionGateway.getRecords() />
This will work for my <cfselect> and show all the records returned. However,
the CFC does accept an argument that can help pair the data down.
How can I pass a parameter using the above code in order to get the results I
want to display?
Natty2112 Guest
-
Question on Passing URL Parameters
Thanks in advance for any responses to this question! I have a dynamic table (in a master page using javascript and asp) that links to a detail... -
cflocation - passing parameters
Hi, Is it possible to do the following with CF? If not how can it be done. <cflocation url='template.cfm?id=#id#'> Thanks in advance -
passing parameters
Hi Michael, I think you want to modify the links in web control programmatically. You can add several Hyperlink controls to the user control,... -
Passing Parameters into NEW()
Is there any way that the NEW() of a web service can accept parameters ? I would like to pass a boolean to indicate to the webservice that I am in... -
Help Passing Parameters
Before going to the third script I'd suggest storing the variables in session variables. Here's how I generally do login scripts. Perhaps have... -
BKBK #2
Re: Passing Parameters To CFC
Here is some pseudocode. It assumes the component is stored as
records.cfc 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">
BKBK Guest



Reply With Quote

