Tutorial :integrating springMVC and extjs



Question:

I am using springMVC and hibernate in my current j2ee project. The view as of now consists of plain jsp, with JSTL to make things a bit simple.

Looking at the extjs project, I believe it can be used as a substitute for the view. I have been looking at the extjs docs but frankly, I am not sure how to integrate it in spring.

Does anyone have any tutorial, blog, books recomendation, to get me started on this?

Or on the other hand, if extjs would be better managed from a different java MVC framework, then please suggest the same.


Solution:1

Here is an example of a ProgressBar Pager integrated with Spring 3.0

It Demonstrates that Ext JS provides a helper class, XMLStore, which is automatically configured with an XMLReader which is used to read data from server.

It uses Xstream from codehaux for serialization to XML.

XStream is easily configurable with annotations,


Solution:2

I like to use Spring views to return JSON data. Requests arrive and handled by a ThrowAwayController or MultiActionController or annotations (depending on the version of Java) which eventually passes a model to a JsonView. There are libraries/packages that create JSON from Java objects - I recommend using one. The client is a single page web-app - generated from JavaScript when the site initially loads - and it makes requests to the server (as described above) in response to user requests. JSP and JSTL are not discarded entirely, but their role is less important.


Solution:3

You can have a look on http://www.jprovocateur.org (Spring + Hibernate + Ext J.S) that allows the configuration of the ext j.s views(forms and grids) using xml.

Regards, M.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »