<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scratty.com &#187; ColdFusion</title>
	<atom:link href="http://www.scratty.com/tag/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scratty.com</link>
	<description>Development answers from real life experiences.</description>
	<lastBuildDate>Wed, 31 Aug 2011 19:18:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>CF 8 Ajax with CFSELECT BIND</title>
		<link>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=coldfusion-8-cfselect-bind-ajax</link>
		<comments>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 18:06:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://10.0.0.11/?p=3</guid>
		<description><![CDATA[As mentioned in Ben Forta's blog you can use the BIND attribute on a CFSELECT tag to populate the data from a CFC using AJAX.  The problem I had was that even using Ben's samples I could not get the data to populate.  After alot of tinkering I finally got it to work by remove the onRequest() method from Application.cfc.  Why this affects this functionality is a mystery to me.  Really for the application I'm working on it's not a big problem but on other projects it could be.

My second part of the problem is that I have a cfc directory that is OUTSIDE of the application's root directory.  For example:]]></description>
			<content:encoded><![CDATA[<p>I love the new AJAX functionality in ColdFusion 8, but I am running into problems using it.</p>
<p>As mentioned in <a title="Ben Forta's Blog" href="http://www.forta.com/blog/index.cfm/2007/7/17/Last-Minute-ColdFusion-Ajax-Enhancements" target="_blank">Ben Forta&#8217;s blog</a> you can use the BIND= attribute on a CFSELECT tag to populate the data from a CFC using AJAX.</p>
<p>The problem I had was that even using Ben&#8217;s samples I could not get the data to populate.  After alot of tinkering I finally got it to work by removing the onRequest() method from Application.cfc.  Why this affects this functionality is a mystery to me.  Really for the application I&#8217;m working on it&#8217;s not a big problem but on other projects it could be.</p>
<p>My second part of the problem is that I have a cfc directory that is OUTSIDE of the application&#8217;s root directory.  For example:</p>
<p>/website_root<br />
/components<br />
/images</p>
<p>Then I map /cacfc to /components and reference my cfc&#8217;s by prepending cacfc to the component IE. cacfc.database.data.   This works great as I can share components among applications easily enough.  But when I call the cfc with the bind attribute of the CFSELECT, ColdFusion looks for the cfc in the root directory.   Here&#8217;s an example:</p><pre class="crayon-plain-tag"><code>&amp;lt;cfselect name=&amp;quot;school_id&amp;quot; 
     bind=&amp;quot;cfc:cfc.school.getSchoolsInCity(state_code={school_state_code},county_number={county},location_city={schoolcity})&amp;quot; 
     value=&amp;quot;school_id&amp;quot; 
     display=&amp;quot;school_name&amp;quot; 
     required=&amp;quot;true&amp;quot; 
     class=&amp;quot;formField&amp;quot;/&amp;gt;</code></pre>
<p>The AJAX debugger looks for the cfc /school.cfc which obviously doesn&#8217;t exist.   If I move the cfc to a directory under the web root (ie /cfc) it works.</p>
<p>Either I am doing something terribly wrong or these are 2 bugs in CF8.</p>
<p>Update from Ben on his Blog:</p>
<p>Matt,</p>
<p>The mapped directory problem is a known one, and I believe is to be addressed in the updater due out shortly.</p>
<p>The onRequest() issues sounds sounds like the same limitation with Web Services and more, and is documented as a restriction.</p>
<p>&#8212; Ben<br />
# Posted By Ben Forta | 1/30/08 10:49 AM</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scratty.com/coldfusion-8-cfselect-bind-ajax/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

