ColdBox Forums Notification: Post to Events, Interceptors, setNextRoute() and persist...

Title: Events, Interceptors, setNextRoute() and persist...
Thread: Events, Interceptors, setNextRoute() and persist...
Forum: Bugs (ColdBox)
Conference: ColdBox
User: CaptainPalapa Luis,

Here's one for you. I picked up the latest nightly build this morning
(1/24).

I have an interceptor, a security interceptor, if you will. In it, I
am going to store some data in the session, then relocate to the login page if
the user isn't logged in. Sounds simple.

Looking over the event handler
guide, I see persist. That will work well for the "key" of the storage slot
that the user's data will be in. Unfortunately, it's either not working, or
I've used it incorrectly.

In my interceptor's preProcess() event, I grab the
next ID, let's say it's "7". I then do:
[code]
<cfset
arguments.event.addValue("securitySlot", nextID) />
[/code]
Then I do the
nextRoute() like so:
[code]
<cfset setNextRoute(route="account/login",
persist="securitySlot") />
[/code]
On the login view, I'm just dumping the rc,
but I don't have a key for securitySlot, though I expected it to be there.
Yes, the security interceptor is running (I've had to debug it enough, I know
it's there!), so I'm not sure what's happening. I did test setting the key in
the rc, then pulling the event.getCollection() again to ensure it made it to the
event, and it did. It just doesn't "persist" as I'm expecting it to.

Is it
me?

- Will B.
http://www.luismajano.com/forums/index.cfm?event=ehMessages.dspMessages&threadid=AEAE8207-FF65-CEF6-6584013A0D153959