CF 8 Ajax with CFSELECT BIND

I love the new AJAX functionality in ColdFusion 8, but I am running into problems using it.

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 removing 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:

/website_root
/components
/images

Then I map /cacfc to /components and reference my cfc’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’s an example:

1
2
3
4
5
6
<cfselect name="school_id"
bind="cfc:cfc.school.getSchoolsInCity(state_code={school_state_code},county_number={county},location_city={schoolcity})"
value="school_id"
display="school_name"
required="true"
class="formField"/>

The AJAX debugger looks for the cfc /school.cfc which obviously doesn’t exist.   If I move the cfc to a directory under the web root (ie /cfc) it works.

Either I am doing something terribly wrong or these are 2 bugs in CF8.

Update from Ben on his Blog:

Matt,

The mapped directory problem is a known one, and I believe is to be addressed in the updater due out shortly.

The onRequest() issues sounds sounds like the same limitation with Web Services and more, and is documented as a restriction.

— Ben
# Posted By Ben Forta | 1/30/08 10:49 AM

Windows Mobile Device Center and Windows Vista 64 Bit

I’ve been running Windows Vista Ultimate 64 bit for 3 months now and recently started having problems syncing my Motorola Q.
When I would try and launch Windows Mobile Device Center 6.1 nothing would happen and this error message would show in the event logs:

Failed to start the Windows Mobile-based device connectivity service due to EnableRAPIMgr(0×80070005) failure (see data for failure code).

When searching the internet for a solution I found the following solution:
The solution:
Run in a cmd prompt:

[sourcecode language="text"]
net localgroup Administrators /add Local Service
[/sourcecode]

Here is a link to the Microsoft Forums Discussion on this topic http://forums.microsoft.com/windowsmobile/ShowPost.aspx?postid=2989559&isthread=false&siteid=65&authhash=b791a1d36fb36c638c9885b250097b4589f542e3&ticks=633408613414984248