Posts Tagged ‘Ajax’

Configuring DWR 3.0 with spring using annotations

Saturday, February 21st, 2009

I’m a fan of the spring framework and I have recently become a fan of DWR as well. Both of them together are just unstoppable, they take ajax and bean exposure through javascript to a new level. I have written about my experiences integrating the two and about validating forms using ajax. I’d advise you to read at least the integration article before continuing.

Using annotations to configure the spring container is a very useful feature, a majority of developers prefer to use annotations rather than XML files. However, annotation driven configuration of DWR through spring was not possible in older versions of DWR. The new version however, allows such configuration and with ease I might add. You can now use DWR with spring with almost no configuration in your XML files(a little bit of configuration is required but it doesn’t go beyond 10 lines or so). The best part however is that you don’t need to configure a seperate servlet for DWR at all, all calls to dwr can be routed through the spring dispatcher servlet which helps cut down configuration even more. (more…)

Ajax based form validation with spring and dwr

Tuesday, February 10th, 2009

Form validation is an integral part of any web application. While most developers rely on client side validations, the good ones always perform server side validations as well before accepting any data. You never know what kind of a malicious attack/vulnerability might be exposed if you don’t validate all data. Submitting, validating and then returning to the form again (if errors exist) is the normal flow but we can assist the user further by validating his data immediately. This form of validating user data is in no way supposed to substitute server side validation but only supposed to help the user and make your interface a little more snazzy. :) (more…)

Dynamic dropdown (Country/state) with dwr & spring

Monday, February 9th, 2009

In my earlier article I had detailed how to get DWR working with spring. Once you get that done, how exactly do you use it? Even though DWR provides a very powerful debugging page, a real-world example never hurts. :)

I’ll construct a simple page which will present the user with a list of countries (populated via DWR on body load). Once the user selects a country (more…)