RE: [coldbox:8205] Re: Persisting values in preHandler?

You should not have to persist a value in the request collection for it to the available in the view that is rendered for THAT event. Are you calling the new any other way than using setView() or renderView()?
Persisting vars is only necessary if you are redirecting to another event, but since you are dealing with a login, that may be what you are doing. Can you explain to us more about what handler methods are at play here and if you are using setNextEvent() to redirect at any point in time.

Again, all value in the request collection should be available in event.getCollection() for the duration of that request. You should only have to persist something if you are redirecting to another event and want to keep that value.

May I suggest, that you keep the isLoggedIn flag in session storage?


Bingo! That was the missing piece of my puzzle.

I was doing setNextEvent, so I just added persist="rc" in the method
processing the login, and now it's remembering it.