Found my problem.  The SitePage2 strategy was similar to your 
suggestion and I discovered I had neglected to change the script name in 
the form action= field  to point to SitePage2.  For the heck of it I 
overrode handleAction and found that getattr works no differently than a 
normal call - not a good idea to make your SitePage the target of a cgi 
form if you want it to maintain a global variable...

I'll need to put in the locks as well.

Thanks,

Roger


Aaron Held wrote:

>Try defining the variable in a module and them import that into sitePage.py
>
>You'll need some locking code to manage updates though.
>
>-Aaron
>----- Original Message ----- 
>From: "Roger" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, January 16, 2002 6:02 PM
>Subject: [Webware-discuss] getattr in Page.handleAction reloads my SitePage?
>
>
>>I have an application where almost every page needs a Menu and Logoff 
>>button.  Per the example in the docs, I added an "actions" method and 
>>the corresponding "Menu" and "Logoff" methods to my SitePage.  
>>
>>This works well, but now I need a global variable which I can update and 
>>access across various sessions.  My problem is whenever I click the 
>>Logoff or Menu buttons my SitePage is reloaded, destroying my global 
>>variable.  I have tried adding a SitePage2, subclassing SitePage, and 
>>defining the action, Menu, and Logoff methods in SitePage2, but the 
>>results are the same, SitePage is still reloaded whenever the Menu or 
>>Logoff  buttons are clicked.
>>
>>I suspect this is caused by the getattr in Page.handleAction.  Am I on 
>>the wrong track or is there a better way to maintain a global variable 
>>across sessions?
>>
>>TIA,
>>
>>Roger
>>
>>
>>_________________________________________________________
>>Do You Yaho
>>o!?
>>Get your free @yahoo.com address at http://mail.yahoo.com
>>
>>
>>_______________________________________________
>>Webware-discuss mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/webware-discuss
>>
>
>
>
>_______________________________________________
>Webware-discuss mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to