Wednesday, September 20th, 2006

BeanView – Forms and Validation for Echo2

Category: Component

Echo2 has been described as Swing for Ajax, and its component model does have a passing similarity with the Java desktop GUI. So it’s not surprising to see a component come out for both Echo2 and Swing at the same time: BeanView 1.1, which was released yesterday. What is BeanView?

BeanView is a Java library – a system for seamlessly rendering a JavaBean to a form and back.

In technical terms, it relies on the information obtained from reflection of the JavaBean to generate forms and update the beans from these forms – so, if you create a JavaBean with a method get/setFirstName(String in), BeanView will automatically generate the form with a textfield to enter a “First Name”. Supported features include:

  • Per visual widget error reporting
  • Support for validation (both a variety of built-in validation types and an easy customization system)
  • Support for a wide range of built-in data types
  • Support for complex data models, such a mapping a collection to multiple selection list box
  • Automatic configuration based on JavaBean meta-data (for example, if a JavaBean declares a get/setFoo(int input) method, will by default generate a text field with integer validation.

Invalid form data is indicated by a big red exclamation mark and a popup tooltip. Below you can see the Swing and Echo2 versions side-by-side.


The latest release of Echo2 also allows you to explicitly set the render id’s used to identify components, i.e. the DOM id attribute. This means you can test your BeanView forms with an automated test tool like Selenium.

Posted by Dietrich Kappe at 11:46 am
Comment here

3.5 rating from 20 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.