how to get post variables from a service?

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

how to get post variables from a service?

Patrick-4
I have an ofbizUrl in an FTL file
<@ofbizUrl>AddProducerToFacilityButtonClicked?facilityId=${facility.facilityId}&partyId=${partyId}"

the controller calls a service.

how do I get facilityId, and partyId from the service?  I looked in
context, but it wasn't there.
Reply | Threaded
Open this post in threaded view
|

Re: how to get post variables from a service?

Vikas Raikwar
 Hello Patrick,

>
> "AddProducerToFacilityButtonClicked" is this a service ?
>
    if yes, so define out parameters inside the service definition
    through which you will get facilityId and partyId out from this service.



On Wed, May 19, 2010 at 5:10 AM, Patrick <[hidden email]>wrote:

> I have an ofbizUrl in an FTL file
>
> <@ofbizUrl>AddProducerToFacilityButtonClicked?facilityId=${facility.facilityId}&partyId=${partyId}"
>
> the controller calls a service.
>
> how do I get facilityId, and partyId from the service?  I looked in
> context, but it wasn't there.
>
Reply | Threaded
Open this post in threaded view
|

Re: how to get post variables from a service?

Bilgin Ibryam-2
In reply to this post by Patrick-4
Patrick wrote:
> I have an ofbizUrl in an FTL file
> <@ofbizUrl>AddProducerToFacilityButtonClicked?facilityId=${facility.facilityId}&partyId=${partyId}"
>
> the controller calls a service.
>
> how do I get facilityId, and partyId from the service?  I looked in
> context, but it wasn't there.
>  
After recent security refactoring, ofbiz services don't accept
parameters sent using GET method. If you want to pass these parameters
to a service, you have to use POST method, instead.
So you have to create a form and put these parameters as hidden field,
then submit the form.

Bilgin