Mark Serano has two good tutorials about integration spring with jqGrid . They are the best tutorial that I have ever seen.

The first one is simpler and it uses an array list for its persistence layer:

krams::: jqGrid and Spring 3 MVC Integration Tutorial

download code

The second one is a more sophisticated and it uses Spring Data to implement DAO classes faster and it implements pagination feature effectively.

krams::: Spring MVC 3.1, jqGrid, and Spring Data JPA Integration Guide  

download code

Following is the code analysis of the first tutorial; you can click on each links in table below to view code.

The main idea of both tutorials is to convert data to JSON and then in the client we uses jqGrid component to show them in a nice grid.

1

Output

What see user

 

 

What happens in background (we can use RESTClient utility to test what happen in the background)

2

Model

Simple POJO class

3

Service

Interface  

 

 

Implementation : part.1 , part.2 , part.3

4

Configuration

web.xm

 

 

spring-servlet.xml

 

 

applicationContext.xml

5

JSON

Users (java class)

 

 

Messages (java class)

6

Controller

Controller  :: Main

 

 

Controller  :: List

 

 

Controller  :: Edit

 

 

Controller  :: Add

 

 

Controller  :: Delete

7

View

Users.jsp

 

 

JQuery :: List : part.1 , part.2 , part.3

 

 

JQuery :: Edit

 

 

JQuery :: Add

 

 

JQuery :: Delete

 

RESTClient is a simple Desktop application for talking to RESTful web services. You can download this utility from this link: REST Client

Especial Thanks to Mark Serano