UPDATE: cfdiv binding to cfc not displaying multiple results
Sorry guys, it appears that my code was not posted correctly on my original post and therefore did not show up.
Please see below for my question/problem. - Thanks!
---------------------------
Hey guys,
Something strange is going on. I am using CF8 and I have multiple records in a table and they all display fine with a table within a cfoutput query="foo". However I want to use cfdiv instead to take advantage of partial page updates.
So I am binding my cfdiv to a cfc and when it runs it only displays the first record. I have had similar problems with using cfoutput query and divs in the past. Is there something about divs that don't allow multiple results to display?
Here is my code:
<cfinvoke component="services.PostService" method="getPosts" returnvariable="post">
<cfinvokeargument name="numberOfRows" value="4">
</cfinvoke>
<cfoutput>
<cfdiv bind="cfc:services.PostService.getPosts(4)">
#post.description# <br />
</cfdiv>
</cfoutput>
Here is my component in case you need to look at it:
<cfcomponent output="no">
<cffunction name="getPosts" access="remote">
<cfargument name="numberOfRows" type="numeric" required="yes">
<cfset var getPosts = "">
<cfinclude template="../dal/qry_getPosts.cfm">
<cfreturn getPosts>
</cffunction>
</cfcomponent>
Thanks for any help you can provide.
Thank you,
Chris
