November, 2009Archive for

Spring Forms, Dynamic Lists and Ajax

Spring Forms and Dynamic Binding Lists Introduction After my recent posts on Spring forms and annotations - dynamic lists is logically another step to be discussed. In the previous examples we use a form backing object - the form backing objects have tended to be very basic and primitive Using dynamic lists within these objects makes them slightly more complicated. Suppose the following scenario: Class enrolment example User chooses to create a new class User types in class name ...

Ajax Spring Forms with Annotations and jQuery

In one of my previous posts we documented how to implement Spring Annotations with a form. If you haven't got a copy of the project from that post you can grab it here. Building on that example this guide shows how, using Spring and jQuery, you can Ajaxify your forms so that when submitted the user doesn't have to be redirected to a new page jQuery and required plugins Create a new folder in the root of your project and call it 'js' Then grab a copy of jQuery. The minified version wi...

Spring annotations User Principal

In case anyone was wondering after reading the previous Spring Annotations guide you can also user various parameters to get hold of the current logged in user. To get hold of the user principal simply add a new parameter to your Request annotated methods called: org.springframework.web.context.request.WebRequest myWebRequest Using the previous tutorial as an example your method should look like something similar to this: @SuppressWarnings("unchecked") @RequestMapping(method =...
Test link....