Luis Majano Forums Notification: Post to Understanding Events

Title: Understanding Events
Thread: Understanding Events
Forum: Discussions
Conference: ColdBox
User: ronanlucio


I am developing my first application in Coldbox, so my apologizes for
the newbie questions, but everybody starts as a newbie.

I create an Event
Handler ehLogin.
This EH has a method doLogin.
This method call another
validateUser method in the model layer.

It isn´t working and I´m having some
difficulties solving the problem.

For all I have understood, I would pass
variables between the app flow via Event.setValue(), and for all I have seen
these variables are cleared if I execute an Event.setNextEvent()

My problem is
in a code block:

<cfif objLogin.validateUser(username, password)>
<cfset setNextEvent("ehLogin.doLogin")>
<cfset setNextEvent("ehLogin.dspLogin")>

Once it
isn´t working, I´d like to see what validateUser() is returning.

So I put it in
a variable:

<cfset validateUser = objLogin.validateUser(username,
<cfset setValue("validateUser", validateUser)>
And put it in the vwLogin.cfm:

and it is always blank.

1) What´s wrong?

How can I transport a variable in the EH to the view after a setNextEvent?