How to acesss globalContext in java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to acesss globalContext in java

Mith Atul
Hi,
How do u use "globalcontext".
It can be used in GROOVY , jscript.
How do we do so in ofbiz  java  (EVENTS) .
I want to access globalcontext in a java source.

thnks
Reply | Threaded
Open this post in threaded view
|

RE: How to acesss globalContext in java

hardik handa
Check deleteParty() method in PartyServices.java

With path : applications/party/src/org/ofbiz/party/party/PartyServices.java

Enjoy Ofbiz.

Cheers,
Hardik Handa

-----Original Message-----
From: Mith Atul [mailto:[hidden email]]
Sent: Wednesday, May 11, 2011 7:21 PM
To: [hidden email]
Subject: How to acesss globalContext in java

Hi,
How do u use "globalcontext".
It can be used in GROOVY , jscript.
How do we do so in ofbiz  java  (EVENTS) .
I want to access globalcontext in a java source.

thnks

::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: How to acesss globalContext in java

Mith Atul
Hi
I know about that.
I need to know to access globalcontext in java ofbiz event (source)
 .


On Thu, May 12, 2011 at 10:39 AM, Hardik Handa <[hidden email]> wrote:

> Check deleteParty() method in PartyServices.java
>
> With path : applications/party/src/org/ofbiz/party/party/PartyServices.java
>
> Enjoy Ofbiz.
>
> Cheers,
> Hardik Handa
>
> -----Original Message-----
> From: Mith Atul [mailto:[hidden email]]
> Sent: Wednesday, May 11, 2011 7:21 PM
> To: [hidden email]
> Subject: How to acesss globalContext in java
>
> Hi,
> How do u use "globalcontext".
> It can be used in GROOVY , jscript.
> How do we do so in ofbiz  java  (EVENTS) .
> I want to access globalcontext in a java source.
>
> thnks
>
> ::DISCLAIMER::
>
> -----------------------------------------------------------------------------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its
> affiliates. Any views or opinions presented in
> this email are solely those of the author and may not necessarily reflect
> the opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of
> this message without the prior written consent of the author of this e-mail
> is strictly prohibited. If you have
> received this email in error please delete it and notify the sender
> immediately. Before opening any mail and
> attachments please check them for viruses and defect.
>
>
> -----------------------------------------------------------------------------------------------------------------------
>
Reply | Threaded
Open this post in threaded view
|

Re: How to acesss globalContext in java

Adrian Crum-3
There is no globalContext in Java services.

-Adrian

On 5/12/2011 6:22 AM, Mith Atul wrote:

> Hi
> I know about that.
> I need to know to access globalcontext in java ofbiz event (source)
>   .
>
>
> On Thu, May 12, 2011 at 10:39 AM, Hardik Handa<[hidden email]>  wrote:
>
>> Check deleteParty() method in PartyServices.java
>>
>> With path : applications/party/src/org/ofbiz/party/party/PartyServices.java
>>
>> Enjoy Ofbiz.
>>
>> Cheers,
>> Hardik Handa
>>
>> -----Original Message-----
>> From: Mith Atul [mailto:[hidden email]]
>> Sent: Wednesday, May 11, 2011 7:21 PM
>> To: [hidden email]
>> Subject: How to acesss globalContext in java
>>
>> Hi,
>> How do u use "globalcontext".
>> It can be used in GROOVY , jscript.
>> How do we do so in ofbiz  java  (EVENTS) .
>> I want to access globalcontext in a java source.
>>
>> thnks
>>
>> ::DISCLAIMER::
>>
>> -----------------------------------------------------------------------------------------------------------------------
>>
>> The contents of this e-mail and any attachment(s) are confidential and
>> intended for the named recipient(s) only.
>> It shall not attach any liability on the originator or HCL or its
>> affiliates. Any views or opinions presented in
>> this email are solely those of the author and may not necessarily reflect
>> the opinions of HCL or its affiliates.
>> Any form of reproduction, dissemination, copying, disclosure, modification,
>> distribution and / or publication of
>> this message without the prior written consent of the author of this e-mail
>> is strictly prohibited. If you have
>> received this email in error please delete it and notify the sender
>> immediately. Before opening any mail and
>> attachments please check them for viruses and defect.
>>
>>
>> -----------------------------------------------------------------------------------------------------------------------
>>
Reply | Threaded
Open this post in threaded view
|

Re: How to acesss globalContext in java

Bilgin Ibryam-2
In reply to this post by Mith Atul
On Thu, May 12, 2011 at 2:22 PM, Mith Atul <[hidden email]> wrote:

> Hi
> I know about that.
> I need to know to access globalcontext in java ofbiz event (source)
>

If your event is of type service, then in your java code you have access
only to service parameters through context object.
If it is of type java event, then you have access to httpservletrequest and
httpservletresponse objects, and have to get the request data using servlet
API.

Then globalcontext, parameters, requestparameters, requestattributes,
sessionattributes... are created and populated using request data by the
framework and made available in screens for your convenience.

HTH

Bilgin Ibryam


>  .
>
>
> On Thu, May 12, 2011 at 10:39 AM, Hardik Handa <[hidden email]>
> wrote:
>
> > Check deleteParty() method in PartyServices.java
> >
> > With path :
> applications/party/src/org/ofbiz/party/party/PartyServices.java
> >
> > Enjoy Ofbiz.
> >
> > Cheers,
> > Hardik Handa
> >
> > -----Original Message-----
> > From: Mith Atul [mailto:[hidden email]]
> > Sent: Wednesday, May 11, 2011 7:21 PM
> > To: [hidden email]
> > Subject: How to acesss globalContext in java
> >
> > Hi,
> > How do u use "globalcontext".
> > It can be used in GROOVY , jscript.
> > How do we do so in ofbiz  java  (EVENTS) .
> > I want to access globalcontext in a java source.
> >
> > thnks
> >
> > ::DISCLAIMER::
> >
> >
> -----------------------------------------------------------------------------------------------------------------------
> >
> > The contents of this e-mail and any attachment(s) are confidential and
> > intended for the named recipient(s) only.
> > It shall not attach any liability on the originator or HCL or its
> > affiliates. Any views or opinions presented in
> > this email are solely those of the author and may not necessarily reflect
> > the opinions of HCL or its affiliates.
> > Any form of reproduction, dissemination, copying, disclosure,
> modification,
> > distribution and / or publication of
> > this message without the prior written consent of the author of this
> e-mail
> > is strictly prohibited. If you have
> > received this email in error please delete it and notify the sender
> > immediately. Before opening any mail and
> > attachments please check them for viruses and defect.
> >
> >
> >
> -----------------------------------------------------------------------------------------------------------------------
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: How to acesss globalContext in java

Jacques Le Roux
Administrator
From: "Bilgin Ibryam" <[hidden email]>

> On Thu, May 12, 2011 at 2:22 PM, Mith Atul <[hidden email]> wrote:
>
>> Hi
>> I know about that.
>> I need to know to access globalcontext in java ofbiz event (source)
>>
>
> If your event is of type service, then in your java code you have access
> only to service parameters through context object.
> If it is of type java event, then you have access to httpservletrequest and
> httpservletresponse objects, and have to get the request data using servlet
> API.
>
> Then globalcontext, parameters, requestparameters, requestattributes,
> sessionattributes... are created and populated using request data by the
> framework and made available in screens for your convenience.

Yes and it was the waited answer:
>> > How do we do so in ofbiz  java  (EVENTS) .

I have added globalcontext (which is always part of context) to the list at
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=6553757

Jacques

> HTH
>
> Bilgin Ibryam
>
>
>>  .
>>
>>
>> On Thu, May 12, 2011 at 10:39 AM, Hardik Handa <[hidden email]>
>> wrote:
>>
>> > Check deleteParty() method in PartyServices.java
>> >
>> > With path :
>> applications/party/src/org/ofbiz/party/party/PartyServices.java
>> >
>> > Enjoy Ofbiz.
>> >
>> > Cheers,
>> > Hardik Handa
>> >
>> > -----Original Message-----
>> > From: Mith Atul [mailto:[hidden email]]
>> > Sent: Wednesday, May 11, 2011 7:21 PM
>> > To: [hidden email]
>> > Subject: How to acesss globalContext in java
>> >
>> > Hi,
>> > How do u use "globalcontext".
>> > It can be used in GROOVY , jscript.
>> > How do we do so in ofbiz  java  (EVENTS) .
>> > I want to access globalcontext in a java source.
>> >
>> > thnks
>> >
>> > ::DISCLAIMER::
>> >
>> >
>> -----------------------------------------------------------------------------------------------------------------------
>> >
>> > The contents of this e-mail and any attachment(s) are confidential and
>> > intended for the named recipient(s) only.
>> > It shall not attach any liability on the originator or HCL or its
>> > affiliates. Any views or opinions presented in
>> > this email are solely those of the author and may not necessarily reflect
>> > the opinions of HCL or its affiliates.
>> > Any form of reproduction, dissemination, copying, disclosure,
>> modification,
>> > distribution and / or publication of
>> > this message without the prior written consent of the author of this
>> e-mail
>> > is strictly prohibited. If you have
>> > received this email in error please delete it and notify the sender
>> > immediately. Before opening any mail and
>> > attachments please check them for viruses and defect.
>> >
>> >
>> >
>> -----------------------------------------------------------------------------------------------------------------------
>> >
>>
>