ColdBox AjaxCFC example

Is there an example of AjaxCFC & ColdBox together?

I'm not really sure how bridge the gap between the ColdBox Reader and
how I'm used to using AjaxCFC.

This is how I'm used to doing it...

function myFunction() {
  var _o = {
  "myVar1" : "myVal1",
  "myVar2" : "myVal2"
    url: "model/cfc.cfc",
    method: "myMethod",
    data: _o,
    success: function(data){
return false;

Also would I no longer need Taconite?


have look into this

url: “model/cfc.cfc” ====== url: “coldboxproxy.cfc”,
method: “myMethod”, ======= method: “ehMain.getUserXmlFormat”

setview(“UserXmlFormat”,true); this will retrun xml format without having further layout.

Does this make sense.


Are you saying that I'll be calling 'coldboxproxy.cfc' as the
component for all my ajax requests? (Really?)
And that I can just call a normal event handler in the framework?
(That sounds right)
And that the '_o' variable will end up in the request collection?

No, I really don't think I understand.


Its really surprising that coldbox support FLEX/AIR/AJAX in a same way of normal event life cycle.

do a alert(_o);

what you will see the values from coldbox.

second step to fire existing events

<cfset results = super.process(argumentCollection=arguments)>

as I said setView(“your view which generate string/xml/json”, true);

Now Coldbox really rocks


Sana has it right,
You can bind calls to the proxy and treat them as normal events in the back end.

You would hit the proxy and call the process method on it, and passing the event variable and any other variables your event can use for processing. Then the handler can return values or if the “ProxyReturnCollection” setting is set to true, it will return the request collection structure. If not, just return what you need from the handlers.

You might also want to consider building a UI plugin for your JS and CSS. Then you can do something like the following in a layout or view:




Then your custom plugin encapsulates the JS. Try that.


Where does ajaxCFC fit in?

I usually extend the AjaxCFC framework by...
<cfcomponent name="AjaxUtils" output="false"

Now we have...
<cfcomponent name="coldboxproxy" output="false" extends="

By the way, 'coldbox/system/extras/coldboxproxy.cfc' does not exist in
the download package? Is this intentional?

Are you downloading 2.0.3 or 2.5.0 beta?



it should be there, but anyway would you like to download latest code-base.

Nighly Build Download:


username: nightlybuild
pass: nightlybuild


Thanks a lot sana ... I still don't understand where AjaxCFC fits in,
or if you really even need it.


I am checking AjaxCFC now… please be patience with me… i am modify this will have all coldbox event-model.

At the moment I am using Jquery+AjaxCFC …

My new ajaxproxy will be modified form of above ajax.cfc.

Please let me know if you happy then I will post new ajaxproxy based on AjaxCFC

Even you can catch me gmail talk.


I am also using AjaxCFC + jQuery ...



I have build a new ajaxproxy.cfc from ajaxCFC, at the moment I am testing it. I will post it soon.



I have attached the new ajaxproxy sample.

Just drop ajaxcfc folder under your webroot and thats it.

Its a port of ajaxCFC, please have a try, I will try to add more examples from ajaxCFC.

Sana (87.1 KB)

Sana, I will review the app, but I can see already some problems with it. I will add it to the SVN probably tomorrow so we can start versioning the sample application. But GREAT WORK on this. I will also get Rob to take a look at it.



It was quick from my end…

I will send over more cleaned up version and more samples.


Thanks you guys, all this is really useful for me :wink: