Hi all, I'm confused about something which I thought recent discussions on data sharing among components might be relevant...but I guess not.
I am storing a cookie in the browser. An $id variable that I calculate and send to the user. It was going to be "password-like" in one of my e-mails months ago, but not anymore. So, I don't mind if the user tries changing it, etc. What I needed was a variable that persists *across requests*. That's where the cookie idea came from. Cookies seem to be the only, or at least, easiest way for a newbie like me. (If I can't get this working, I'll pass $id from component to component in the URL or as a POST argument...) I'm not quite sure, though, where to declare $id and how. Every component of mine inherits from an autohandler which in turn inherits from a syshandler. Syshandler inherits from no one. The syshandler has the code to get the cookie and set the value to $id if it exists. Placing it in a <%once> block is wrong (I think) because it is accessible only when the component is loaded and it will change depending on the user that is accessing the component. I think I should place it in a <%shared> block as simply: <%shared> my $id; </%shared> but I'm not sure where. Say I have index.html and next.html and both inherit from autohandler and then syshandler as the top-level component. syshandler makes the most sense to me since it is the top-level component. But it doesn't work when I go to next.html and I don't know if this is the wrong way. Before I did this, I had $id as a global variable which I think was wrong. Or perhaps that is what I should do??? Any suggestions would be appreciated...a bit confused with the organization of the components right now... :-) Ray ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users