flash.putAll() not working in CB3 beta 3

2 views
Skip to first unread message

Tony G

unread,
Nov 16, 2009, 10:03:14 PM11/16/09
to ColdBox Platform
In a handler, I have this code (stripped down) in a form handler
event:

getPlugin("beanfactory").populateBean(formBean);
errors = formBean.validate();

if( arraylen(errors) ){
persistKeys = {errors = errors, formbean = formbean};
flash.putAll( persistKeys );
setNextEvent( "page.vwForm" );
}
else
(code to process form...)



So if there are errors in the form submission, I'm persisting the
errors array and the formbean in the flash before relocating back to
the form. However, my errors array and formbean are not being
persisted. (This code worked fine on beta 2). If I put them in the rc
and use flash.perisistRC(), I can get it to work. But it seems like
flash.putAll() isn't working. I'm testing on Railo 3.1 on Mac OS X.

Tony G

unread,
Nov 16, 2009, 10:34:37 PM11/16/09
to ColdBox Platform
I found the bug in the putAll() function (AbstractFlashScope.cfc, line
161). The call to the put() function is missing the saveNow argument.
so change:

put(key,arguments.map
[key],arguments.keep,arguments.inflateToRC,inflateToPRC);

to:

put(key,arguments.map
[key],arguments.saveNow,arguments.keep,arguments.inflateToRC,inflateToPRC);

Everything works as it should now.

-Tony

Luis Majano

unread,
Nov 17, 2009, 1:51:02 AM11/17/09
to col...@googlegroups.com
You are absolutely right Tony.  This has been reworked and patched on SVN.  These patches will go into Friday's beta 3 updated release.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com



--
You received this message because you are subscribed to the Google Groups "ColdBox: A ColdFusion Framework" group.
To post to this group, send email to col...@googlegroups.com
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/coldbox
For more information, visit http://www.luismajano.com/projects/coldbox
For Documentation, visit http://ortus.svnrepository.com/coldbox/trac.cgi

Reply all
Reply to author
Forward
0 new messages