COLDBOX 2.6
Hello!
I have been working on a project usign coldbox (for a year) and havent
been able to release it.. I am giving up!.
At first I was usign session variables. My application was in a
cluster enviroment so I had to start using client variables. I created
a function to re-populate my beans on the session scope when changing
servers and it works fine.
If i called my view directly from the event "dologin" and dump the
sessions and client variables it works fine. BUT when I use the
function setNextEvent calling an event that calles a template that
dumps the sessions and client variables the values I set up at the
begining disappear why? I have not idea. I have been working on this
issue for long time and cant figure it out. I tested the session and
client variables with a normal application (not usign coldbox) and
works fine. I dont know what to do! Please help!!
I searched on the coldbox group and there was an user having the same
problem and didnt find the solution.
Example:
<cffunction name="doLogin" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any">
var userService = getUserService();
var userBean = userService.createUserBean();
var rc = Event.getCollection();
var oClient = getPlugin("ClientStorage");
var oSession= getPlugin("SessionStorage");
getPlugin("beanFactory").populateBean(userBean);
userService.checkLogin(userBean);
if (userBean.getVerified()){
/* persist it */
getPlugin("SessionStorage").setVar("oUserBean",userBean);/* My bean is
populated and now I put it on my session scope*/
oClient.setVar("loggedin","true");
rc.oUserBean = userBean;
/* This works */
event.setView('test'); /* Dumps the session and client variables.. It
works... Shows my client and session variables ok*/
/* This doesnt work */
setNextEvent(event='test.nextevent"); /*'test.nextevent simply calls a
template that dumps the session and client variables ... my client and
session variables dont exist anymore*/
}
</cfscript>
I will reall appreciate ANY help...