Luis Majano Forums Notification: Post to Understanding Events

Title: RE: Understanding Events
Thread: Understanding Events
Forum: Discussions
Conference: ColdBox
User: lmajano

Hi Ronan, This is a very typical question and you have to address it as you
would in a normal application using cflocation. Which the setnext event is doing
for you. So basically if you set a variable and relocate, you loose the
variable. Basic stateless web right?

If you are dealing with security, you will
need to basically handle state, you can do that in several ways. ColdBox
provides you with a sessionstorage plugin that you can use to save session
variables in. You can also use the clientstorage plugin as well.

var validateUser = objLogin.validateUser(username, password);
//save in
getPlugin('sessionstorage').setVar('userAuthorized', validateUser);

The alternative to not using a state object is via the URL, but that is
not safe.

Does this help??