What if you assign a transactionID to the page as you serve 
it? Stick the transactionID in the query string and/or hidden 
variables, so you know which window you're dealing with. Of 
course, each tranactionID would have it's own WDDX packet.

Okay, okay, I know. This is a stupid idea and will never work, 
because when the user spawns a new window, that new window 
inherits the transactionID from its parent. 

The trick to get around this is to add a timestamp in addition
to your transactionID. Record it in your WDDX packet and
stick it in the page.

When you get a request, check that the timestamp returned 
matches the timestamp in your packet. If not, you know you're 
dealing with another instance of the window. You can't trust
what's in the packet now, but it may be okay to just create
a new packet and assign it a new transactionID. 

If that's not acceptable, you'll have to save a new copy of the 
packet each time you serialize it. That way you'll be able
to look up old copies, and always find a matching
transactionID/timestamp. 

Of course, that may not be acceptable either, but at least 
you've caught the problem and can do something with it. You 
could possibly warn the user that the page he was viewing 
has expired and offer him a new version of it, or warn him 
that he may not get the expected results. Or, you could just
display a "Bad Monkey!" message and include a button to
close the window. :)


Patrick














~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to