RE: [coldbox:10806] event.getvalue issue in 3.1?

+1 on the request context decorator. It allows you to modify any of the default behavior of the event object.


Thanks for the doc link. Trying to learn here. Please assist.

I implement a simple example and I get a weird result…

Error Type: Renderer.ViewNotSetException : [N/A]
Error Messages: The “currentview” variable has not been set, therefore there is no view to render.
Please remember to use the ‘event.setView()’ method in your handler or pass in a view to render.

The handler is setting the view so I’m not sure why it’s telling me this. It works before I added the context decorator.

added to coldbox.cfc in the coldbox directives:
requestContextDecorator = “model.myRequestContext”

my first context decorator ever:

var originalValue =arguments.defaultValue; if( find([](,'.') gt 0 ) { originalValue = 'got here'; //finish processing here } else { if(valueExists([]( originalValue = getRequestContext().getValue(argumentCollection=arguments); } return originalValue;