You wouldn't bind a cfdiv to a cfc, as the cfc would only return a JSON 
dataset. You would bind to a cfm page that called the cfc and formatted 
the results. That formatted display would then be loaded into the cfdiv.

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
http://blog.cutterscrossing.com

[EMAIL PROTECTED] wrote:
> I'm binding <cfdiv> to a cfc that runs a simple query that may give more than 
> one result. 
> 
> Works great, except <cfdiv> only displays the first result. 
> 
> For my cfc I have:
> 
>  <cffunction   name= "gettires"   access= "remote"   returnType= "any" >
>  <cfargument   name= "model"   type= "string"   required= "true" >
>  <cfargument   name= "make"   type= "string"   required= "true" >
>  <cfargument   name= "year"   type= "string"   required= "true" >
>  <!--- Define variables --->
>  <cfset   var  data= "" >
>  <cfset   var  result= "" >
>  <!--- Get data --->
>  <cfquery   name= "data"   datasource= "#THIS.dsn#" >
>  SELECT tirerear
> FROM tires
> WHERE model =  '#ARGUMENTS.model#'  and make =  '#ARGUMENTS.make#'  and  year 
>  =  '#ARGUMENTS.year#'
>  </cfquery>
>  <cfset  result=data.tirerear >
>  <cfreturn  result >
>  </cffunction>
> 
>  For my cfm I have:
> <cfdiv bind="cfc:mycfc.gettires({model},{make},{year})" bindonload="false" 
> ID="theDiv" />
> Am I missing something??  If I try to change the CFC returntype to "Query" 
> the display page errors. 
>  The value returned from the gettires function is not of type query."
> 
> -Jeff
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292990
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to