Skip to main content
Known Participant
May 27, 2009
Question

cfdiv - binding to a cfc

  • May 27, 2009
  • 2 replies
  • 1967 views

Hi,

I am looking at all the new advanced features of cf8 and trying to use them to get my app working without posting to the page

I have created a binding to my cfc

<cfdiv bind="cfc:cart.test()" class="mydiv">

<cffunction name="ross" access="test" returnFormat="json" output="true">
hello

</cffunction>

This outputs nothing but the question is how would I return something from the cfc and how does it update onChange? A little example would be most appreciated.

H.

    This topic has been closed for replies.

    2 replies

    Dileep_NR
    Inspiring
    June 18, 2009

    <cfdiv bind="cfc:cart.test()" class="mydiv">

    try any of the following

    <script type="text/javascript">

    ColdFusion.navigate('cart.cfc?method=test&returnFormat=plain','mydiv')

    ColdFusion.navigate('crat.cfc?method=test','mydiv')

    </script>

    BKBK
    Community Expert
    Community Expert
    May 28, 2009

    Just another inch, and you're there!

    cfdivTest.cfm

    ==========

    <cfdiv bind="cfc:cart.test()" class="mydiv">

    cart.cfc

    ==========

    <cfcomponent>

    <cffunction name="test" access="remote">
    <cfreturn "hello">

    </cffunction>

    </cfcomponent>