Yep that seems to do the trick. Thanks

Jeremy

-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 03, 2006 11:28 AM
To: CF-Talk
Subject: RE: Save sessions to repopulate at a later date

I haven't been reading this thread, but to repopulate the session scope you
will have to loop over session2 putting each variable in the session one at
a time:

<cfwddx...

<cfloop collection="#session2#" item="i">
        <cfset SESSION[i] = session2[i]>
</cfloop>

Not tested, but something like that.

Adrian

-----Original Message-----
From: Jeremy Bunton [mailto:[EMAIL PROTECTED]
Sent: 03 April 2006 16:23
To: CF-Talk
Subject: RE: Save sessions to repopulate at a later date


Hello,

I'm trying to take a more all inclusive approach and save all my sessions
(as the from variables are all sessions) to wddx then just reset the session
structure equal to the output of my wddx.  Below is my test code. It works
except for the <cfset session = session2> doesn't reset all my sessions, any
help there?

<cfwddx action="cfml2wddx" input="#session#" output="mysavedsessions">
<!--- clear currnet session to test to see if it works --->
<cfset StructClear(Session)>

<!--- user logs in, get the data, recreate the structs --->
<!--- dewddx back to session --->

<cfwddx action="wddx2cfml" input="#mysavedsessions#" output="session2">
<cfset session = session2>
<cfdump var="#session#">


Jeremy



-----Original Message-----
From: Jim [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 12:05 PM
To: CF-Talk
Subject: RE: Save sessions to repopulate at a later date

WDDX would make this easy, no need to modify any DB fields or anything if
you change your forms.
(Also no need for a complex DB)

Example:


<!--- set your forms --->
<cfset session.forms = structnew()>

<cfloop from="1" to="10" index="i">
        <cfset session.forms[i] = structnew()>
        <cfloop from="1" to="10" index="n">
                <cfset session.forms[i][n] = createuuid()>
        </cfloop>
</cfloop>

<cfdump var="#session#">

<!--- wddx them --->
<cfwddx action="cfml2wddx" input="#session.forms#" output="mysavedforms">
<!--- store the wddx whereever you want (file, db) --->

<!--- mimic session ending, losing all data --->
<cfset session.forms = structnew()>
<cfdump var="#session#">


<!--- user logs in, get the data, recreate the structs --->
<!--- dewddx back to session --->
<cfwddx action="wddx2cfml" input="#mysavedforms#" output="session.forms">

<cfdump var="#session#">



Job done.

-----Original Message-----
From: Jeremy Bunton [mailto:[EMAIL PROTECTED]
Sent: 30 March 2006 17:40
To: CF-Talk
Subject: Save sessions to repopulate at a later date


I have an application that has many forms that are saved in sessions as the
user jumps from page to page, allowing them to see what they had entered on
any page at any given time. Now the users want to be able to hit a button,
save the entry and come back weeks later and see what they had entered. Now
I need a way to save all sessions to a file, perhaps text or something. So
that the user can login say 3 weeks later select the saved criteria (which
there may be 50 different ones of by now) and then have all the forms
repopulated with the same data as before. Any ideas how I might get that
done.

Jeremy












~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236816
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to