This content has been marked as final. Show 5 replies
If you return a query from the component, then you can just set a variable to be the returnvariable and then use it as you would a query variable.
For example: <cfinvoke component="testComponent" method="getMethod" returnvariable="qryReturnQuery" componentargument="#testArgument#">
I'm a little confused on what you're asking, but I hope this helps.
I know I'm being confusing :) Okay - let me try to simplify this. If I create an update form on editRecord.cfm, using Dreamweaver, and place the query that populates the form values at the top of editRecord.cfm, I can then bind the values to the form fields using Bindings panel by dragging the field name in my recordset to the form field. Now, if I create a CFC called employees.cfc and place my query within a <cffunction> tag, when I go back to my document to populate the form values from the query, that query is no longer available to me in the Bindings panel on editRecord.cfm. I hope I'm making sense this time...
ssailer, I'm not sure if I'll be able to describe this the way you're doing this. I've only use the code side of things when developing pages that use CFC's and Queries. It sounds like you're doing this from the design view. From the code perspective, you'd do something like this:
<cfinvoke component="<component name>" method="<method name - that would be the function with the query>" returnvariable="<whatever you want to name the return variable - i.e. myQuery>">
<form name="testForm" method="post">
<input name="firstname" value="#myQuery.firstname#">
Okay - it sounds as if you can't do what I'm describing when you use the queries inside of a CFC. I use both the code and design view - which ever one is faster for what I need to get done.
from adobe dw9 (cs3) livedocs:
(same applies to dw8)
Use a CFC recordset as a source of dynamic content
You can use a ColdFusion component (CFC) as a source of dynamic content
for your pages if the component contains a function defining a recordset.
Note: This feature is available only if you have access to a computer
running ColdFusion MX 7 or later. For more information, see Enable the
1. Open a ColdFusion page in Dreamweaver.
2. In the Bindings panel (Window > Bindings), click the Plus (+) button
and select Recordset (Query) from the popâup menu.
The Recordset dialog box appears. You can work in either the simple
or the advanced Recordset dialog box.
3. Click the CFC Query button.
4. Complete the CFC query dialog box, click OK, and then click OK again
to add the CFC recordset to the list of available content sources in the
5. Use the Bindings panel to bind the recordset to various page elements.