Hi All,
I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send by using new Ajax.Request("productService",........etc but it is not calling my jsonservice "productService". Is there any need to include any other JS files in my ftl? regards Jayakumar T |
Hello Jaykumar,
The pattern for calling Ajax request can traced out well by looking at "OnePageCheckout" from applications/ecommerce/widget/OrderScreens.xml. You can understand it well by tracing out the code and running it in ecommerce application or for more help please provide the steps you are performing for calling Ajax request. Thanks & Regards -- Pranay Pandey On Feb 27, 2009, at 5:22 PM, jayakumar t wrote: > Hi All, > > I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send > by > using > > new Ajax.Request("productService",........etc > > but it is not calling my jsonservice "productService". > > Is there any need to include any other JS files in my ftl? > > > regards > > Jayakumar T smime.p7s (3K) Download Attachment |
Hi Pranay Pandey,
I wand to know, Where is this "AJAX" object in ofbiz?. Then only my script identify that. regards Jayakumar T On Fri, Feb 27, 2009 at 5:34 PM, Pranay Pandey < [hidden email]> wrote: > Hello Jaykumar, > > The pattern for calling Ajax request can traced out well by looking at > "OnePageCheckout" from applications/ecommerce/widget/OrderScreens.xml. > You can understand it well by tracing out the code and running it in > ecommerce application or for more help please provide the steps you are > performing for calling Ajax request. > > Thanks & Regards > -- > Pranay Pandey > > > > On Feb 27, 2009, at 5:22 PM, jayakumar t wrote: > > Hi All, >> >> I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send by >> using >> >> new Ajax.Request("productService",........etc >> >> but it is not calling my jsonservice "productService". >> >> Is there any need to include any other JS files in my ftl? >> >> >> regards >> >> Jayakumar T >> > > |
In reply to this post by jayakumar t
Hi,
try DWR ( http://directwebremoting.org/ ). You will need create service broker in java, like this (code sample): @RemoteMethod public Map callOfbizService(String serviceName, Map serviceContext) { WebContext ctx = WebContextFactory.get(); try { HttpServletRequest request = ctx.getHttpServletRequest(); GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); LocalDispatcher dispatcher = (GenericValue) request.getSession().getAttribute("dispatcher"); // some code serviceContext.put("userLogin", userLogin); Map resultFromRequestedService = dispatcher.runSync(serviceName, serviceContext); // some other code 1 { catch(Exception e) { // catch action } // some other code 2 return resultFromRequestedService; { Hope this helps ya Dňa Pi, 2009-02-27 o 17:22 +0530, jayakumar t napísal: > Hi All, > > I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send by > using > > new Ajax.Request("productService",........etc > > but it is not calling my jsonservice "productService". > > Is there any need to include any other JS files in my ftl? > > > regards > > Jayakumar T |
I use a SOAP client based on jQuery. I can't really say how good/bad it is, but I tried to use another client first which was a PITA and I never got it working. I then tried this and found it easy to use. You can get it from http://plugins.jquery.com/project/jqSOAPClient
-----Original Message----- From: Ján Valkovič [mailto:[hidden email]] Sent: Friday, February 27, 2009 8:25 AM To: [hidden email] Subject: Re: Using Ajax in Ofbiz Hi, try DWR ( http://directwebremoting.org/ ). You will need create service broker in java, like this (code sample): @RemoteMethod public Map callOfbizService(String serviceName, Map serviceContext) { WebContext ctx = WebContextFactory.get(); try { HttpServletRequest request = ctx.getHttpServletRequest(); GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin"); LocalDispatcher dispatcher = (GenericValue) request.getSession().getAttribute("dispatcher"); // some code serviceContext.put("userLogin", userLogin); Map resultFromRequestedService = dispatcher.runSync(serviceName, serviceContext); // some other code 1 { catch(Exception e) { // catch action } // some other code 2 return resultFromRequestedService; { Hope this helps ya Dňa Pi, 2009-02-27 o 17:22 +0530, jayakumar t napísal: > Hi All, > > I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send by > using > > new Ajax.Request("productService",........etc > > but it is not calling my jsonservice "productService". > > Is there any need to include any other JS files in my ftl? > > > regards > > Jayakumar T |
In reply to this post by jayakumar t
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 also ofbiz, does not use object or classes, perse that said with java 1.5 objects are defined in the java portion of the code. and Java Class is used. jayakumar t sent the following on 2/27/2009 5:08 AM: > Hi Pranay Pandey, > > I wand to know, Where is this "AJAX" object in ofbiz?. Then only my script > identify that. > > > regards > > Jayakumar T > > On Fri, Feb 27, 2009 at 5:34 PM, Pranay Pandey < > [hidden email]> wrote: > >> Hello Jaykumar, >> >> The pattern for calling Ajax request can traced out well by looking at >> "OnePageCheckout" from applications/ecommerce/widget/OrderScreens.xml. >> You can understand it well by tracing out the code and running it in >> ecommerce application or for more help please provide the steps you are >> performing for calling Ajax request. >> >> Thanks & Regards >> -- >> Pranay Pandey >> >> >> >> On Feb 27, 2009, at 5:22 PM, jayakumar t wrote: >> >> Hi All, >>> I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send by >>> using >>> >>> new Ajax.Request("productService",........etc >>> >>> but it is not calling my jsonservice "productService". >>> >>> Is there any need to include any other JS files in my ftl? >>> >>> >>> regards >>> >>> Jayakumar T >>> >> > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJqDkUrP3NbaWWqE4RAuRqAJ96xBCF7BL3ktAX1OdffBXpcCbtYgCbBf1a IPuoUYuyncAwCDCp9Q9koSU= =ogXS -----END PGP SIGNATURE----- |
Free forum by Nabble | Edit this page |