Flash RAM and Wizard?

Hi,

I'm trying to figure out how I can pass request collection variables
to create a wizard like process. I have a handler that has these
functions:

<!--- Show Form Step 1 --->
<cffunction name="dspStep1">
</cffunction>

<!--- Process Form Step 1 --->
<cffunction name="processStep1">
<cfset setNextEvent( event=rc.xehStepTwo,persist="rcKey1" ) />
</cffunction>

<!--- Show Form Step 2 --->
<cffunction name="dspStep2">
</cffunction>

<!--- HERE IS MY ISSUE, how can I get the value of rcKey1 here??
without using a hidden field on the form in Step 2 or the session
scope? --->
<cffunction name="processStep2">
</cffunction>

<cffunction name="dspStep3">
</cffunction>

I'm trying to avoid using the session scope and hidden form fields
and I think it's possible, but I'm wondering if having this processing
step in between each form is causing my problem?

Any help appreciated, hope this makes sense.

It should be in your rc, assuming rc.rcKey1 already exists before you call setNextEvent in processStep1.

Do you have a value for coldbox.FlashURLPersistScope in coldbox.cfc?

Billy Cravens
bdcravens@gmail.com

Thanks for the reply. The value is being passed when I call
setNextEvent, but on "dspStep2" I have a form and when I submit that
form, the variables from the initial setNextEvent() call aren't
there. I don't want to put a hidden form field on the form to pass
them along unless I absolutely have to. I was hoping I could persist
the values somehow when I'm not calling setNextEvent().

I know I can use the session scope but I thought using FlashRam might
work but it doesn't look like it can do this unless I'm mistaken.

-West

You would then also need to put the value into flash ram in step 2's event. They persist for one event lifecycle.
http://wiki.coldbox.org/wiki/FlashRAM.cfm

Curt

It keeps the values across setNextEvent calls but now when I submit my
form. On the page that displays the form the value is available but
the only way to keep it moving through the steps seems to be to use a
hidden field on my form.

In other words, when the page refrshes or the form is posted the
values are lost. When you submit a form there isn't any
setNextEvent() call,

You can disable the Flash “cleanup” so these values just keep living in the persistent scope and get re-inflated upon each request.

flash.put(name=“userData”,value=userWizard,autoPurge=false);