jump to navigation

Converting String to Date and Date-formatting in Spring-MVC 9 February 2007

Posted by Marten Deinum in Java, Spring.
Tags: ,
add a comment

This week alone I answered the question about date formatting and how to bind Strings to Objects multiple times. If I would get an euro/dollar for everytime I gave the same answer. So I figured maybe it is time to create simple example to show how it is done in Spring. (The sources used are included in the propertyeditors.zip attached to this post, rename to .war to deploy it in tomcat or jetty (tested in Jetty 6.0.2))
(more…)

Using multiple validators in Controllers and FormAction 13 December 2006

Posted by Marten Deinum in Java, Spring.
Tags: , , ,
add a comment

On a job I did recently we did a lot of refactoring the old (web) application, they used an abundance of (Web) Frameworks, we reduced it to 1 (well actually 2 if you count Spring Web Flow :) ).

They already had a lot of Controllers and Validators build and also somewhere some custom validation logic in the desired classes. One thing I noticed is that they had a few command objects which had an emailaddress or telephone number. For each of those objects they also wrote a suitable Validator. Copying and pasting all the logic concering emailaddress validation each time, or even worse reinvented the logic.
(more…)