cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo <agalla...@agssa.net>
Subject Re: Flow - How to set variables after sendPage
Date Thu, 14 Jul 2005 20:36:15 GMT

Sorry sent by error:

Antonio Gallardo wrote:

> Johannes Becker wrote:
>
>> Sory for the late reply but my internet was temporarely down.
>>
>> > please explain, what are you trying to do
>> Right after cocoon.sendPage I want to set a global variable. Thats all.
>>
>>
>> I solved the problem like this. But looking at this piece of code 
>> again, I wonder why it works. Whatever! It woks. I'm happy.
>>
>> function myFunc(){
>>   while(myVariable){
>>       cocoon.sendPage("xxx", {
>>          myVariable: myVariable,
>>        });
>>       myVariable = null:
>>    }
>> }
>
Of course it works. ;-D
The second parameter in sendPage()  is just reading the value of your 
global variable. ;-)
In other way, the value sent in the sendPage() has the same value as 
your global variable, but they are not the same value, they don't share 
the same memory space.

Best Regards,

Antonio Gallardo

> Best Regards,
>
> Antonio Gallardo
>
>>
>> Cheers
>> Jonny
>>
>>
>> Antonio Gallardo wrote:
>>
>>> IIRC, sendPage forks the execution, so if you set the variable right 
>>> after the sendPage() call, is posible the global variable is setted 
>>> before the sendPage() call finish.
>>>
>>> Hmm.... please explain, what are you trying to do. Perhaps there is 
>>> another way to accomplish that.
>>>
>>> Best Regards,
>>>
>>> Antonio Gallardo.
>>>
>>> Johannes Becker wrote:
>>>
>>>> Hi,
>>>>
>>>> I've got a function.
>>>>
>>>> function myFunc(){
>>>>   ...
>>>>   cocoon.sendPage("xxx", {
>>>>      myVariable: myVariable,
>>>>   });
>>>> }
>>>>
>>>> Right after this cocoon.sendPage I want to set a global variable 
>>>> (in my case
>>>> myVariable) "automatically":
>>>> myVariable = null;
>>>>
>>>> But how can I do that?
>>>>
>>>> Thanks
>>>> Jonny
>>>>
>>>>  
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



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


Mime
View raw message