Hi,
I'm running CF9, ColdBox 3
I'm trying to build a simple 4 step wizard and wanted to use FlashRam
for this.
I have the following cfm files
dspStepOne
dspStepTwo
dspStepThree
dspStepFour
In my event handler, between each step I call an event handler method
like below to process the form data from Step One. Below is a
snippet:
<cffunction name="dspStepOne" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any">
<cfset var rc = Event.getCollection()>
<cfset Event.setView(name="app/dspStepOne",layout='Layout.MyApp) />
</cffunction>
<cffunction name="processStepOne" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any" />
<cfset var rc = event.getCollection() />
<!--- Maybe do some stuff here --->
....
<cfset flash.persistRC(include="someVar") />
<cfset setNextEvent("xehStepTwo") />
</cffunction>
<cffunction name="dspStepTwo" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any">
<cfset var rc = Event.getCollection()>
<cfdump var="#rc#">
<cfdump var="#session#">
<cfabort>
<cfset Event.setView(name="app/dspStepTwo",layout='Layout.MyApp) />
</cffunction>
So when dspStepTwo runs, I can see the value "someVar" in the "request
collection" which is great, but I don't see it in the session scope
variable called "cbox_flash_scope". Note, I dumped both scopes above.
This variable is always empty. I'm wondering how I can store my data
in "cbox_flash_scope" which seems to be in the session scope. Since
I'm building a non-ajax type wizard, I want to make sure if the user
goes back to dspStepOne, that their form values are preserved.
FlashRAM seems to work for going forward in my wizard, but if the user
hits back, what to do, or if the user was on Step 3 and wanted to jump
back to Step 1, how would I leverage FlashRam to do this or should I
just use the SessionStorage plugin?
Thanks,
-West