A recent thread talks about using a global class to
tuck variables in rather than have them polute a
namespace. I think this is a good idea(and is one of
the reasons java simply does not allow it).

I keeping all my 'globals' in an xml file using
rexml.. like db connects, prod flag, etc. Right now
this file is loading everytime (until I can figure out
how to cache it). I least i thot it was not caching...

I have are toolbar items in my global
xml.<toolbar><items/><toolbar> and when i'm outputting
them, i check to see of the client is logged on or off
and create, on the fly, an element accordingly, and
append it to items. However, if i refresh, i find that
these elements are aculating. When i output the
rexml, indeed, they are aculating but i do not know
why. It's either looping over my logic(don't know
how!) or it's caching the xml file for some reason.

#Are we logged on?
#Dynamically add an element to the globals for the
#To show logon or off

eItem = REXML::Element.new 'item'

if $sess.data['on']to_i == 1 then

eItem.attributes['name'] = 'Logoff'

eItem.text = "/?cnt=adm/logon/index&logoff=1"


eItem.attributes['name'] = 'Logon'

eItem.text = "/?cnt=adm/logon/index"


eRight =

eRight << eItem

#s = ''
#print CGI.escapeHTML(s)

print $html.formatToolbar eRight


As anyone experienced this. I would sure like to cache
it at some point but wish i were doing it on my own!


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software