[coldbox:18298] [coldbox-3.6.0] AOP aspect and custom messagebox plugin

Can you share some of your custom plugin code- your init method at least.

ok…so Brad got me thinking about a couple of things. First thing to remember, and I write this for myself more than anything else…if things seem like they are misbehaving badly with no explanation or for reasons that seem entirely silly…restart ColdFusion.

So now, my original problem is gone (and to respond to your last question Brad, I’m embarrassed to say, while fiddling with some solutions, my novice thinking adding a manual argument for a controller to the plugin…don’t do that either) leaving me with what I think was actually the original issue Ben was having.

If I do this in the aspect I can either do (note injector is the injected property of “wirebox”)::

property name=“myAlert” inject=“provider:CustomMessageBoxDSL”;


var myAlert = injector.getInstance(“CustomMessageBoxDSL”);

and both work correctly to give me the correct instance of the plugin…but the error reports that “flash” is undefined on the following line of code in the plugin (which is extended MessageBox)…and I’m testing with the former above, the property)


from the following overloaded method:

var msg = structnew();

// check message type
if( refindnocase("(error|warning|info|success)", trim(arguments.type)) ){
// Populate message
msg.type = arguments.type;
msg.message = arguments.message;
msg.dismiss = arguments.dismiss;
msg.blocktitle = arguments.blocktitle;

// Do we have a message array to flatten?
if (structKeyExists(arguments,“messageArray”) AND arrayLen(arguments.messageArray) ){
msg.message = flattenMessageArray(arguments.messageArray);
// Flash it
$throw(“The message type is invalid: #arguments.type#”,“Valid types are info,error or warning”,“MessageBox.InvalidMessageType”);