root/coldbox/trunk/testharness/model/myRequestContextDecorator.cfc @ 1640

Revision 1640, 1.2 kB (checked in by lmajano, 5 years ago)

fix for controller getting blown up by the state recovery of the memento

  • Property svn:mime-type set to text/plain
Line 
1<cfcomponent name="myRequestContextDecorator" output="false" extends="coldbox.system.beans.requestContextDecorator">
2
3<!------------------------------------------- CONSTRUCTOR ------------------------------------------->
4       
5       
6<!------------------------------------------- PUBLIC ------------------------------------------->
7
8        <cffunction name="Configure" access="public" returntype="void" hint="My Configuration" output="false" >
9                <cfset var key = "">
10                <cfset var rc = getRequestContext().getCollection()>
11               
12                <!--- I will trim all of the request collection --->
13                <cfloop collection="#rc#" item="key">
14                       
15                        <!--- Trim only simple values --->
16                        <cfif isSimpleValue(rc[key])>
17                                <cfset rc[key] = trim(rc[key])>
18                        </cfif>
19                       
20                </cfloop>
21               
22                <!---
23                <cfdump var="#getController()#"><cfabort>
24                States maintain tests.
25                <cfdump var="#getRequestContext().getCollection()#">
26                <cfdump var="#getCollection()#">
27                <cfset setValue("luis",now())>
28                <cfdump var="#getRequestContext().getCollection()#">
29                <cfdump var="#getCollection()#">
30                <cfabort>
31                --->
32               
33        </cffunction>   
34       
35<!------------------------------------------- PRIVATE ------------------------------------------->
36
37
38</cfcomponent>
Note: See TracBrowser for help on using the browser.