Loading
Spring DWR example

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Spring DWR example


Ans)

 Step 1 : Create a Service "YourPageManager" with different methods

  Step 2: Add the following Spring Config.

<dwr:remote javascript="YourPageManagerJS">
   <dwr:include method="getAccountSalesList"/> 
   <dwr:include method="getEmailAddressByWebUserObjid"/> 
   <dwr:include method="getStates"/> 
   <dwr:include method="getTransportType"/>
   <dwr:include method="getContacts"/> 
   <dwr:include method="findContacts"/>
   <dwr:filter class="com.your.ajax.DwrSecurityFilter"/>
  </dwr:remote>

 
    <dwr:configuration>
     <dwr:convert type="bean" class="com.yourApp.ContactDetails"
     javascript="Contact" />
 </dwr:configuration>
 <bean id="Contact" class="com.yourApp.ContactDetails">
 </bean>

Step 3 :

Add the following to JSP

Jsp changes :
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/util.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/interface/YourPageManagerJS.js"></script>

 

YourPageManagerJS.addContactsToDTO(contactInfo, function(data){    
    window.saveClicked = false; 
    window.contactSaved = true;
     
       });



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Spring DWR example


Spring DWR example

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free