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 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



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

Reply via email to