cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: dynamcically altering a global variable
Date Fri, 20 Aug 2004 07:32:35 GMT
Alternatively you could be using flow for this and
reading the variable from an xml file - along with 
any other useful info such as user name etc - and 
also checking the time using javascript in flow and 
testing if the last login was before/after midnight 
and then resetting as needed.

AFAIK (and a little knowledge is a dangerous thing!)
the so-called "global variable" in the Cocoon sitemap
is more like a "global constant"...  but I'd like to hear
differently.

[There was a previous thread on dynamically creating
subsitemaps... I thibnk one of the developers said it 
could be done but was somewhat dubious about its
lack of merits and possible dangers... but, hey, you're
a programmer and current "Master of the Universe"!!]

>>> jh@domek.be 2004/08/20 09:19:20 AM >>>
Alternatively, you could log every logon to the system with a database

timestamp and do checking there.

It's just a matter of what is more familiar to you, there are various 
ways of achieving this.

Paul Joseph wrote:
> Hi,
> 
> I am wondering how best to do this in Cocoon:
> 
> When a user logs in, the user has to check if they are
> the first person to login for the day and if so, do
> some tasks.
> 
> To do this, I though of setting a global variable say
> FIRST_LOGIN=true at midnight every night - using the
> Quartz scheduler.  
> 
> Then when a user logged in, as part of the
> authentication logic, I would have them check this
> variable and do the action if it was true.  Of course,
> after doing the action, they would set this variable
> to false.
> 
> Any pointers as to how this can best be done would be
> appreciated.  I am unable to implement this approach
> at present as I do not know how to set a global
> variable whose value can be altered dynamcially.
> 
> thx
> Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message