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.

Example:
[code]
var validateUser = objLogin.validateUser(username, password);
//save in
session
getPlugin('sessionstorage').setVar('userAuthorized', validateUser);
[/code]

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

Does this help??

http://www.luismajano.com/forums/index.cfm?event=ehMessages.dspMessages&threadid=7D3F1A90-123F-6116-4274E38B4A84AF8B