Archive for the ‘Spring’ Category

Converting String to Date and Date-formatting in Spring-MVC

Friday, February 9th, 2007

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…)

One application, per client database

Friday, January 5th, 2007

In one of my recent projects we came a cross an application model which had 1 codebase but for every client they had (around 40) they deployed one application. Sometimes they had to redeploy several times because they had memory and performance issues. We soon realized that we needed to do something about this way of deploying. The only two things which where different per client where the database connection and the front-end.
(more…)

Spring Web Flow Tag Library

Thursday, December 21st, 2006

A while ago we started to use Spring Web Flow. We needed to convert our old WizardForms and Multi SimpleFormController screens to the Spring Web Flow ones. After converting about three jsp’s I got fed up with the hidden fields, the submit buttons with the specified name. Generating urls with a flowExecutionKey and eventId was even worse. Also after making al those typos in flowExecutionKey I decided to create a taglibrary which can write different HTML tags needed in Spring Web Flow.
(more…)

Using multiple validators in Controllers and FormAction

Wednesday, December 13th, 2006

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 en 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…)