Ext JS 4 Spring MVC CRUD example

In my last post on ExtJS 4 MVC, I have demonstrated the use of ExtJS 4 MVC to create a simple Create-Read-Update-Delete application using ExtJS only. Today we will go to see how to use that ExtJS part for UI and use Spring MVC to manage the books records on server side using spring.

Let first start by creating Spring’s WebMVC configurer class. I am using spring’s new xml-free approach and if you are new to it, I recommend you to please go through my previous post.

Create a Book bean now, this bean is work as a Value Object and represent a single record in grid.

Now create a BookDao interface and implement it.

To make it more simple, I am using book list but you can extend it to save it relational table. See my SpringMVC-Hibernate GRUD tutorial for more details.

Now it’s time to create a Book Controller.

ExtJS code looks similar to previous example with a little change. I have changes the local store to server ajax proxy and after each delete/add/update operation, we will load the all record from server to make grid update.

Output:

Open the HTML file in any browser, the Output will look similar to below. You can click to add new Book record in GRID.

Download Source (without jars, size 27 kb)

Download WAR file (size 5.20 Mb)

About the Author

has written 68 posts.

I Love Coding, Analyzing, Designing and doing it the right way. I am obsessed about learn anything new daily and sharing what I have learn each Day. This Blog is journey of my Zeal, going through step by step to the mountain of desire to become prefect. Google Wanna Hire me ?

Copyright © 2017 http://www.techzoo.org. All rights reserved.
Proudly powered by WordPress. Developed by 7Tech Solutions