You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by tej minhas <mi...@gmail.com> on 2007/03/18 22:44:25 UTC

javascript call to (OFBIZ) service

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

Session replication embeded tomcat

Posted by Robert <ro...@gmx.de>.
 
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  


Re: javascript call to (OFBIZ) service

Posted by Anil Patel <to...@gmail.com>.
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 <mi...@gmail.com> 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
>