Hi all
I’m just setting up a new app from scratch and trying to configure everything nicely. I decided to create a ControllerDecorator component according to these instructions http://wiki.coldbox.org/wiki/ControllerDecorator.cfm. However, as soon as I add the mapping to the component in the Coldbox.cfc I get this error:
Element INSTANCE is undefined in MEMENTO.
The error occurred in D:/CFDev/coldbox/system/web/ControllerDecorator.cfc: line 24
Called from D:/CFDev/coldbox/system/web/services/RequestService.cfc: line 256
Called from D:/CFDev/coldbox/system/web/services/RequestService.cfc: line 209
Called from D:/CFDev/coldbox/system/interceptors/SES.cfc: line 75
Called from D:/CFDev/coldbox/system/web/services/InterceptorService.cfc: line 204
Called from D:/CFDev/coldbox/system/web/services/InterceptorService.cfc: line 110
Called from D:/CFDev/coldbox/system/web/services/InterceptorService.cfc: line 76
Called from D:/CFDev/coldbox/system/web/services/LoaderService.cfc: line 81
Called from D:/CFDev/coldbox/system/Coldbox.cfc: line 71
Called from D:/CFDev/coldbox/system/Coldbox.cfc: line 102
Called from D:/CFDev/[myApp]/Application.cfc: line 85
22 : // Store Original Controller Memento of instance data and services
23 : var memento = arguments.controller.getMemento();
24 : instance = memento.instance;
25 : services = memento.services;
26 : return this;
The component looks like this:
component extends=“coldbox.system.web.ControllerDecorator” {
// See: http://wiki.coldbox.org/wiki/ControllerDecorator.cfm
this.decorator = “true”;
function configure() {
writeDump( “In decorator” ); abort;
}
function setNextEvent() {
writeDump(“hello”); abort;
}
}
And the mapping in Coldbox.cfc is simply this:
coldbox = {
… stuff …
requestContextDecorator = “model.ControllerDecorator”,
… other stuff …
};
Has anyone seen this before?
(NB. “D:/CFDev/[myApp]/Application.cfc: line 85”, is a call to reloadChecks(), in case that’s relevant).
Michael