cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: [flow] session creation
Date Thu, 17 Jul 2003 19:52:36 GMT
Thank you for this solution!  Can you explain to my poor pea brain the 
difference between a global variable and a global constant in this 
context?  IOW, if I want to use global "contants" how do I create and 
access them in such a way as to avoid a session?

Geoff

Christopher Oliver wrote:
> Vadim,
> 
> Your observations are correct.
> 
> However, I just checked in a change to FOM_JavaScriptInterpreter that 
> causes it to only create a session if you actually modify global 
> variables. (Note: global constants do not cause a session to be 
> created). For example, if you modify the calculator sample to not use 
> global variables, i.e. like this:
> 
>  function calculator()
>  {
>    var a, b, op;
>    var comp;
>    a = getNumber("a");
>    ...
>   }
> 
> instead of this:
> 
>  var a, b, op;
>  var comp;
>  function calculator()
>  {
>    a = getNumber("a");
>    ...
>  }
> 
> then no session is created for it.
> 
> I think this is the best solution to this problem. Do you agree?
> 


Mime
View raw message