Firing off Coldbox event from procedural code.

13 views
Skip to first unread message

Justin Case Trushell

unread,
Dec 2, 2016, 12:55:43 PM12/2/16
to ColdBox Platform
Hi folks,

I'm a relative n00b to Coldbox so maybe this question is amateur at best.

Anyway, I am trying to fire off a coldbox event during the processing of some procedural ColdFusion code.

I am trying to use the coldbox proxy object method to accomplish this by calling a handler event inside a module through the proxy method.

something like this 

1. alertHandler = getController().getHandlerService().getHandler('alerts:alert', rc); 
2. alertHandler.refreshAlertCounts();

Line 1 results is the error:

Either there are no methods with the specified method name and argument types or the getRunnable method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.       

Is this the way I should be going about trying to accomplish something like this? and what am I missing?

Thanks for your patience. :)
Justin


  

br...@bradwood.com

unread,
Dec 2, 2016, 1:08:21 PM12/2/16
to col...@googlegroups.com
If you want to use a proxy CFC (one that extends the base coldbox.system.remote.ColdBoxProxy class) then you just need to call the process() method like so:
 
process( 'handlerName.eventName' );
 
That said, the error you pasted below seems to be unrelated and part of a java call somewhere in your own code.
 
Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/6558b571-1221-4511-939f-263b2ef37abb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages