Binding Data to a CFTEXTAREA
Hello,
Continuing on with my binding questions.
I am finally populating 2 realted select boxes using the bind attribute. I'd like to be able to make my two selection from the drop downs and then populate a CFTEXTAREA based on those selection. I though I could just issue a similar bind attribute command by the textarea outbputs:
[object Object]
CF8 documentation says that this ss possible? What am I missing?
Here is my form:
<cfselect name="descriptionDD" value="description" bind="cfc:cfcs.menudata.getData()" bindonload="true" />
<cfselect name="id" value="id" bind="cfc:cfcs.menudata.getID({descriptionDD})" bindonload="true" />
<cftextarea name="detail" bind="cfc:cfcs.menudata.getDetail(id)" bindonload="true" ></cftextarea><br/>
Here is my CFC:
<cfcomponent>
<!---First Slect Box --->
<cffunction name="getData" access="remote" returntype="query">
<!--- Function to get data from datasource --->
<cfquery name="data" datasource="ezpay">
select description
from service_descriptions
order by description
</cfquery>
<!--- Return results --->
<cfreturn data>
</cffunction>
<!---Second Sect Box --->
<cffunction name="getID" access="remote" returnType="query">
<cfargument name="description" type="any" required="true">
<cfquery name="dataID" datasource="ezpay">
SELECT ID
from service_descriptions
WHERE description = '#ARGUMENTS.description#'
ORDER BY ID ASC
</cfquery>
<cfreturn dataID>
</cffunction>
<!---Third textarea --->
<cffunction name="getDetail" access="remote" returnType="query">
<cfargument name="detail" type="any" required="true">
<cfquery name="serviceDetail" datasource="ezpay">
SELECT service_detail
from service_descriptions
WHERE ID = '#ARGUMENTS.detail#'
</cfquery>
<cfreturn serviceDetail>
</cffunction>
</cfcomponent>
Thanks
-Brian
