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.

http://wiki.coldbox.org/wiki/Recipes:My_First_Request_Context_Decorator.cfm

~Brad

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([arguments.name](http://arguments.name),'.') gt 0 ) { originalValue = 'got here'; //finish processing here } else { if(valueExists([arguments.name](http://arguments.name))) originalValue = getRequestContext().getValue(argumentCollection=arguments); } return originalValue;

`