Can we pass the whole structure by url?
Expanding on James Buckingham's answer ...
(This assumes session control is set to true
.)
On the calling page, just copy the structure into your session variable:
<cfset session.myTempStruct=variables.myTempStruct />
Then, in the popup, copy the structure back to the local scope for this request:
<cfset variables.myTempStruct=session.myTempStruct />
If you don't want this structure to hang in the session, you can be prompted for a popup to remove it from the session as soon as it is copied to the local scope.
<cfset structDelete(session, "myTempStruct") />
a source to share
Although NOT HIGHLY recommended , you can do this:
<cfset tmp = {} />
<cfset tmp.name="Marcos" />
<cfset tmp.lname="Placona" />
<cfwddx action="cfml2wddx" input="#tmp" output="tmpWDDX">
<a href="index.cfm?string=#tmpWDDX#">link</a>
If you decide to take this approach, I would suggest submitting the information via a form, not a URL.
You always have the option of storing data in a persistent object like a bean, or a simpler approach like a session.
Hope this helps you
a source to share
Serializing Struct (with serializeJSON () or whatever) and puttin git in the url seems to make sense as long as the structure isn't too big (read: less than 3-4k characters in total).
Another solution would be to put this in some general area: session, application, etc.
Third, one would need to call cfm with a POST request that can handle large structures and then a GET.
a source to share