REQUEST parameters needed throughout website
The website we are building relies heavily on 'parameters' that are set throughout the site. A value entered in the first form on page 1 must be persisted and retrievable from page 10, or any page for that matter. I have approximately 50 parameters I will have to keep for the life of a user's search. I DO NOT want to use the session to store the parameters in because this will cause problems if a certain course of action is taken. Is it possible for me to carry the REQUEST object from one page to another, while adding, changing, or even deleting some of the values it contains, for the life of a search? This REQUEST object will have to travel in and out of Python scripts, DTML Documents and Methods, and other objects. At certain times, I will want to retrieve one or more of the parameters to use the value or change it. When changed, I will need to place the new value in the REQUEST object. If I don't need a certain parameter in a certain place, I do not want to have to mess with it at all, and still have it remain in the REQUEST object and continue to be avaiable to the next page if necessary. Please understand I am very new to Zope. My company is trying to transition from Java and JSP to Zope and Python. I need to make sure I can handle this situation elegantly before proceeding. Any suggestions will be greatly appreciated. Stacy
IMHO handling this "elegantly" is pretty much impossible without using sessions. jens On Monday, Sep 9, 2002, at 08:38 US/Eastern, Stacy Roberts Ladnier wrote:
The website we are building relies heavily on 'parameters' that are set throughout the site. A value entered in the first form on page 1 must be persisted and retrievable from page 10, or any page for that matter. I have approximately 50 parameters I will have to keep for the life of a user's search. I DO NOT want to use the session to store the parameters in because this will cause problems if a certain course of action is taken. Is it possible for me to carry the REQUEST object from one page to another, while adding, changing, or even deleting some of the values it contains, for the life of a search? This REQUEST object will have to travel in and out of Python scripts, DTML Documents and Methods, and other objects. At certain times, I will want to retrieve one or more of the parameters to use the value or change it. When changed, I will need to place the new value in the REQUEST object. If I don't need a certain parameter in a certain place, I do not want to have to mess with it at all, and still have it remain in the REQUEST object and continue to be avaiable to the next page if necessary.
Please understand I am very new to Zope. My company is trying to transition from Java and JSP to Zope and Python. I need to make sure I can handle this situation elegantly before proceeding. Any suggestions will be greatly appreciated.
Stacy <Stacy.Ladnier.vcf>
No, unfortunately. The REQUEST object is meant to last for the duration of a single web request and cannot be carried along between web requests. You'll either need to use sessions to do what you want or you'll need to carry along hidden form fields between each page. You may want to check out the following sessioning documentation to get more familiar with it: http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions .stx HTH, - C ----- Original Message ----- From: "Stacy Roberts Ladnier" <Stacy.Roberts@noaa.gov> To: <zope@zope.org> Sent: Monday, September 09, 2002 8:38 AM Subject: [Zope] REQUEST parameters needed throughout website
The website we are building relies heavily on 'parameters' that are set throughout the site. A value entered in the first form on page 1 must be persisted and retrievable from page 10, or any page for that matter. I have approximately 50 parameters I will have to keep for the life of a user's search. I DO NOT want to use the session to store the parameters in because this will cause problems if a certain course of action is taken. Is it possible for me to carry the REQUEST object from one page to another, while adding, changing, or even deleting some of the values it contains, for the life of a search? This REQUEST object will have to travel in and out of Python scripts, DTML Documents and Methods, and other objects. At certain times, I will want to retrieve one or more of the parameters to use the value or change it. When changed, I will need to place the new value in the REQUEST object. If I don't need a certain parameter in a certain place, I do not want to have to mess with it at all, and still have it remain in the REQUEST object and continue to be avaiable to the next page if necessary.
Please understand I am very new to Zope. My company is trying to transition from Java and JSP to Zope and Python. I need to make sure I can handle this situation elegantly before proceeding. Any suggestions will be greatly appreciated.
Stacy
participants (3)
-
Chris McDonough -
Jens Vagelpohl -
Stacy Roberts Ladnier