Creating an Ajax widget for Admin section throws exception

Luis, hopefully you might be able to answer this question.

I am calling an Ajax call from a widget that is in the admin section, this is a custom module that I am working on. The Ajax works, but throws an error of missing include can’t find /views/modules/execute.cfm

Now the method being called is

public string function CronusAPI(event,rc,prc) {

}

And as you can see it is doing nothing, I have tried making it remote, as well as returning an empty string. I even tried event.noRender() and it will continue to try to execute that view. Is there something I am not doing or is this a bug in ContentBox?

Luis, I have also noticed another issue. Maybe not for you but can be a pain for us trying to develop some modules.

When doing an Ajax call, back to our custom module in ContentBox results in that path being captured by ContentBox. What happens here is that if you walk away for some time and refresh the page, ContentBox will redirect back to the Ajax call after you enter you credentials.

So apart from the problem below, this is something that would need to be fixed.

Hmm well if the event does nothing it tried to render back something. Have you tried sending back a string.

Yes…

But why is it trying to do a render?

Implícito views

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

Luis, I think you’re missing the problem.

It is trying to find the view execute.cfm, this is not something I am calling as you can tell by the function. If anything it should be failing because /views/modules/CronusAPI.cfm doesn’t exist, and not execute.cfm and on top of that event.noRender() doesn’t work.

So unless I am missing something else, why is this the case. I should also point out that this is running under contentBox if that makes a difference.

But as stated where is execute.cfm being set as the view, and why does noRender() not work?

Can you post an example and I will try it out.

Also, admin modules execute via a proxy event in the admin. I think that’s the one it is trying to find.

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

I found out what is causing it, damn cbadmin routes…