我正在尝试在coldfusion 8中使用cf autosuggest。我的输入为-
<cfinput name="tad"
autosuggest="(cfc.mywriters(getWriters.authors({cfautosuggestvalue})">
我的cfc是
<cffunction name="getWriters" access="public" returntype="any">
<cfargument name="writers" required="yes"/>
<cfset myArray = ArrayNew(1)>
<cftry>
<cfquery name="getWriters" datasource="mydb">
SELECT authors
FROM rp_authors
ORDER BY authors asc
</cfquery>
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
<cfloop name="getWriters">
<cfset arrayAppend(myArray,authors)>
</cfloop>
<cfreturn myArray>
</cffunction>