Wish List
Tags
adobe air ajax coldfusion examples ext flex javascript max2007 misc technology ui
Recent Entries
Adobe Releases Flash 10 (beta)
Adobe Needs Your Feedback - Enter to win a prize!
A Question of Speed
It's a BOY!
Unit Testing Functions that Access Web-Services
Search
RSS
Subscribe
Caution: Binding to CFC
Mike posted on CF-Talk today asking what was wrong with his bind expression on his cfgrid.
At first I thought that he wasn't building the bind expression correctly as you need to work from the webroot down to where the CFC is located.
As it turns out Mike bumped up against one of the current known issues with CF8 and the cfajaxproxy tag and subsequently the bind expression. If you try to work in a virtual directory and not directly under the wwwroot using the Ajax tags with binding you will experience the same problem.
One would expect from the bind expression in the following code snippet would produce a correct url to the cfc.
<cfgrid name="fileGrid" format="html" pagesize="10" sort="true"
bind="cfc:cf8.com.gg.fileExplorer.getfiles({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{mytree:directories.node})">
<cfgridcolumn name="DIRECTORY" display="false"/>
<cfgridcolumn name="NAME" header="File Name" display="true"/>
<cfgridcolumn name="size" header="Size" display="true"/>
<cfgridcolumn name="datelastModified" header="Last Modified" width="150" mask="yyyy-mm-dd"/>
</cfgrid>
</cfform>
Namely one that would look like: /cf8/com/gg/fileExplorer.cfc but what actually gets produced is simply /fileExplorer.cfc which obviously is not right.
So if you are using the Ajax tags and want to Bind to a CFC you need to do it from the wwwroot.
As a possible workaround you could build a CFC and have it in the webroot and it would simply pass the calls to the appropriate CFC functions located outside of the webroot using a Coldfusion mapping.


There are no comments for this entry.
[Add Comment]