ColdFusion, CFC Binding, Ajax Proxy and Updater 1

This week I got a much belated chance to play with some of the CF8 Ajax features I've never gotten around to. I've had CF8 developer's edition on my home PC for a while, but never worked for a place that actually had CF8 in production so I didn't get to play much with the new stuff. I had a big show stopper though. Both my cfgrid bind attribute and my cfajaxproxy tag weren't working. The CFC's I wanted to bind to were web accessible, but there were in a series of subdirectories. ColdFusion, however, kept constructing Ajax code to look in the web root.

For instance, my CFC was here:

 http://www.myserver.com/admin/webservices/userFacade.cfc

I would put this code in my page:

 <cfgrid bind="cfc:admin.webservices.UserFacade.getUsers()">

And

 <cfajaxproxy cfc="admin.webservices.UserFacade" jsclassname="UserFacade">

But in both cases, I would see JavaScript get generated like this:

 var _cf_UserFacade=ColdFusion.AjaxProxy.init('/UserFacade.cfc','UserFacade');

This obviously caused a 404 (Not Found) since the file didn't exist in the root directory.

Thanks to Andrew Scott from the CF-Talk list for mentioning this behavior was a known issue with the original release of CF8 and was fixed in Updater 1. Sure enough, I had neglected to update my home computer with Updater 1. I stopped CF, downloaded the updater, installed it, started CF and I was back in business.

I hope this helps someone. I mainly blogged it because I googled for a long time and never found anything to help me. Thanks again Andrew!

~Brad

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)


BlogCFC was created by Raymond Camden. This blog is running version 5.9.5. Contact Blog Owner