I am experimenting with the ajax parts of CF8, and I'm following the
video on the Adobe site where it shows how to build a master detail
application using the CF8 inbuilt ajax stuff.

It has a CFGRID tag, which binds to a cfc method.   There's where my
problem arises i think.    I have a simply utilities cfc that has some
commonly used methods, one of which is getCountries() which returns a
query containing country names and abbreviations.

When i call the method using the tags i've always used, i get a query
object which i can dump and it shows exactly what i'd expect.
However when i use CFGrid, bound to the same method, I get an empty
query, and therefore an empty grid.     I'be checked that the method
is access=remote,  but what else have i missed?

Here's the CFGrid tag:

<cfform scriptsrc="/cms/forms/scripts"  >
    <cfgrid name="TrialGrid" format="html"  pagesize="15"
bind="cfc:cfcs.utilities.utilitieslibrary.GetCountriesGrid(
{cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection}
)" bindonload="yes" >
    <cfgridcolumn name="country" header="Country" display="yes" />
    <cfgridcolumn name="countrycode" header="Country Code" display="yes" />
    <cfgridcolumn name="countryid" header="countryid" display="no" />
    </cfgrid>
</cfform>


and here's the method in the Utilitieslibrary cfc :

<cffunction name="GetCountriesGrid" output="false" returntype="query"
access="remote" hint="Returns a list of countries for drop down list">
<cfargument name="cfgridpage" required="no" type="string" />
<cfargument name="cfgridpagesize" required="no" type="string" />
<cfargument name="cfgridsortcolumn" required="no" type="string" />
<cfargument name="cfgridsortdirection" required="no" type="string" />

<cfquery name="QGetCountries" datasource="thetestdsn">
SELECT Country, countrycode, countryid FROM Countries ORDER BY Country
</cfquery>
<cfreturn QGetCountries />
</cffunction>

 Can anyone see why calling this method using CFINVOKE returns a
result and using CFGrid doesnt?

-- 
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314999
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