You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Saroj C <sa...@tcs.com> on 2011/08/24 11:52:57 UTC

Scope of context

Hi,
 What will be scope of the variable which are put in context  ?

Ex : I have groovy and there I say context.paramName = paramValue and the 
groovy is called as an Event for a request.

What will be the scope of the paramName variable here ?

Thanks and Regards,
Saroj 
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Scope of context

Posted by Saroj C <sa...@tcs.com>.
Thanks a lot Scott.

So, I conclude, anything on the context will be Thread Safe and can be 
eligible for Garbage Collection, after the screen is rendered.

Thanks and Regards,
Saroj




From:
Scott Gray <sc...@hotwaxmedia.com>
To:
user@ofbiz.apache.org
Date:
08/24/2011 08:03 PM
Subject:
Re: Scope of context



"context" in groovy typically refers to a screen context (that's where the 
bulk of the groovy scripts in OFBiz are run from). There is no context for 
request events so you need to put your data in the request attributes, 
anything placed in there will end up in the screen context.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/08/2011, at 9:52 PM, Saroj C wrote:

> Hi,
> What will be scope of the variable which are put in context  ?
> 
> Ex : I have groovy and there I say context.paramName = paramValue and 
the 
> groovy is called as an Event for a request.
> 
> What will be the scope of the paramName variable here ?
> 
> Thanks and Regards,
> Saroj 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
> 




Re: Scope of context

Posted by Scott Gray <sc...@hotwaxmedia.com>.
"context" in groovy typically refers to a screen context (that's where the bulk of the groovy scripts in OFBiz are run from). There is no context for request events so you need to put your data in the request attributes, anything placed in there will end up in the screen context.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/08/2011, at 9:52 PM, Saroj C wrote:

> Hi,
> What will be scope of the variable which are put in context  ?
> 
> Ex : I have groovy and there I say context.paramName = paramValue and the 
> groovy is called as an Event for a request.
> 
> What will be the scope of the paramName variable here ?
> 
> Thanks and Regards,
> Saroj 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
>