Archive for the ‘Spring Webflow’ category

Web Form Validation with JBoss RichFaces and Hibernate Validator

February 9th, 2010

Last month I posted about Building a Dynamic Tree with JBoss RichFaces and Spring Web Flow. Since then, I have received a few requests to demonstrate how to implement validation within the modal dialog. There are several internet resources that already deal with this but none that provide a complete working example so I decided I would do just that.

You can download the source code in the form of a Maven project and follow along.

Hibernate Validator Dependencies

First step is to add the Hibernate Validator dependency to the project pom. I have used Hibernate Validator 4.0.0.GA because it is a JSR 303 compliant implementation.

<dependency>
  <groupid>org.hibernate</groupid>
  <artifactid>hibernate-validator</artifactid>
  <version>4.0.0.GA</version>
  <scope>compile</scope>
</dependency>

Listing 1 : Hibernate Validator Dependency

» Read more: Web Form Validation with JBoss RichFaces and Hibernate Validator

Building a Dynamic Tree with JBoss RichFaces and Spring Web Flow

January 19th, 2010

Recently I was involved in a project that required a user interface that would facilitate the manipulation of a hierarchical data structure.  I was already using JBoss RichFaces so it made perfect sense to utilise the tree and associated components (i.e. recursiveTreeNodesAdaptor and treeNode).  The project was also utilising the Spring Framework and Spring Web Flow and these were also incorporated into the eventual solution.

To start with, as any good developer does, I searched for existing solutions to the problem and while I found some useful information I did not find exactly what I was looking for.  With this in mind, when I eventually finished the development of the user interface I decided I would share my implementation and hopefully you will find what follows useful.

To allow you to follow along, I have made the source (maven project) available as a download.  This way, I do not have to worry about explaining everything in minute detail.

For a preview, you can always build the source, deploy to a server and navigate to http://[server]:[port]/dynamic-tree/spring/flow-main replacing the [server] and [port] with appropriate values.
» Read more: Building a Dynamic Tree with JBoss RichFaces and Spring Web Flow