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 <[EMAIL PROTECTED]> 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 via email to