javascript call to (OFBIZ) service

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

javascript call to (OFBIZ) service

tej minhas
Can anyone point me to an example or the syntax for calling an (OFBIZ)
service using javascript.

In particular I am trying to validate a manually entered Product ID when a
quote item is being added to a quote.

I would like to look the Product ID up in the Product entity and return
price & description if found ....

Hence I would have to pass the (dynamic) Product ID as a parameter.

Thanks, tej
Reply | Threaded
Open this post in threaded view
|

Re: javascript call to (OFBIZ) service

Anil Patel
Tej,
I'll use Dojo Ajax in such situations. I have incomplete implementation for
similar use, may be it will help.

In the controller of your webapp, add following handler
    <handler name="jsonservice" type="request" class="
org.ofbiz.webapp.event.JSONServiceEventHandler"/>

Then add a request entry that calls service e.g
    <request-map uri="lightCreateGlJournalEntry">
        <security https="true" auth="true"/>
        <event type="jsonservice" invoke="createGlJournalEntry"/>
        <response name="success" type="view" value="none"/>
        <response name="error" type="view" value="glJournalEntryData"/>
    </request-map>

This request will return a JSON response that you can convert into
Javascript object and read values of interest. you  may find example for
this in  content component .

I hope this helps.

Regards
Anil




On 3/18/07, tej minhas <[hidden email]> wrote:

>
> Can anyone point me to an example or the syntax for calling an (OFBIZ)
> service using javascript.
>
> In particular I am trying to validate a manually entered Product ID when a
> quote item is being added to a quote.
>
> I would like to look the Product ID up in the Product entity and return
> price & description if found ....
>
> Hence I would have to pass the (dynamic) Product ID as a parameter.
>
> Thanks, tej
>
Reply | Threaded
Open this post in threaded view
|

Session replication embeded tomcat

Robert-165
 
Dear,

We strugle in replicating tomcat/catalina sessions on two linux server (two
debian etch OR  two suse sles10). The surprising thing is that this works
fine for two win xp machines  (same config files and same JDK 1.4!).

 * On linux we enabled the multicasting checked our network.  
 * With a network sniffer we see the multicast packets beiing delivered to
all the nodes but ofbiz/tomcat does not pick them.

Thanks
Robert