[Zope] Storing REQUEST for frame request?

Dieter Maurer dieter@handshake.de
Sat, 17 Aug 2002 11:57:03 +0200


Joel Burton writes:
 > ...
 > What seems the nicest would be something like
 > 
 >   if-we-need-to-be-framed
 >     SESSION.set('request_data',REQUEST)
 >     do frameset document, passing URL
 > 
 >   if we're already framed
 >     REQUEST=SESSION.geT('request_data')
 >     do the regular page
 > 
 > This way, all of the REQUEST vars that the original page would have
 > received (including POST stuff), the new page will receive.
 > 
 > Unfortunately, this doesn't work, of course -- I can't replace the
 > REQUEST object. Nor can I replace just REQUEST.form.
You can use the "update" method of dictionaries, in the following form:

    SESSION.set('request_data', REQUEST.form)
    ....

    REQUEST.form.update(SESSION.get('request_data'))


Dieter