ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "deepti.mittal" <dee...@paytm.com>
Subject Re: OFbiz with Ajax (DWR)
Date Tue, 30 Aug 2011 04:38:29 GMT
Hi Guys,

Thanks for helping me out in this.
I tried to implement a basic example of DWR but it is giving some error. Can
someone help me out with the steps I need to do for implementing the same or
if I am missing something.
The steps I followed were:
1. Added dwr.jar & commons-logging.jar in WEB-INF/lib folder
2. Added dwr.xml in WEB-INF.xml folder with the following contents:
<dwr>
  <allow>
    <create creator="new" javascript="HelloWorldModelImpl">
      
    </create>
  </allow>
</dwr>
3. Now in the ftl file, added thw following code:



function doLoad()
{
	alert("firing AJAX call");
	HelloWorldModelImpl.getTime(callbackAfterLoad);
}

function callbackAfterLoad(dataFromServer)
{
	alert("return from Ajax call");
	alert(dataFromServer);
}

and finally <body onload="javascript:doLoad();">

The above code displays "firing AJAX call" and the next alert is "Error".

--
View this message in context: http://ofbiz.135035.n4.nabble.com/OFbiz-with-Ajax-DWR-tp2964923p3777945.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Mime
View raw message