BeanView Screenshots

JavaBean exampleIn the examples below, the form shown was generated via reflection via a simple Person object (an ordinary JavaBean). The reflection data is cached, which means that there is very little overhead for the actual display of the form, the validation, etc. The Person object shown is a completely unannotated JavaBean. BeanView supports the use of annotations for additional control over the displayed user interface.

This Person JavaBean can be easily rendered into both a web user interface (via Echo 2) and a fat client via Swing. In both cases, the form is simply a panel added to the relevant user interface. For the demonstrations below, the only application specific code needed is for laying out the form and adding the buttons for interactivity - all of the display and validation logic is generated automatically by BeanView.

Example of the Echo 2 implementation of BeanView
In this Echo (web) user interface, clicking the Update button tests the updateObjectFromPanel() method, and the Toggle button tests the updatePanelFromObject() method.

Swing example form
In this Swing (desktop) interface, clicking the Set Mary and Set Bob buttons tests the updatePanelFromObject() method, and the Update Mary button tests the updateObjectFromPanel() method.

Echo 2 Errors in BeanView
This example shows how errors in the user input are automatically generated by a call to updateObjectFromPanel() in a web user interface..

Swing error example
This example shows how errors are displayed in a Swing user interface from a call to updateObjectFromPanel().  Note that in the Swing user interface, the error message is displayed as a red exclamation point and a tooltip. It would be very easy to subclass the Swing panel to override this behavior.

This example shows a more complex UI, in which the designer has taken advantage of the BeanView subview capability to exercise more control over the layout. All of these subpanels are generated from a single bean.

BeanView and Selenium

The latest release of Echo 2 supports setting Render IDs, which means that BeanView now works quite elegantly with Selenium. The image above shows the Selenium IDE view of a simple script validating the example Echo 2 view. The script shows a test which views the page, sets an incorrect value, gets a validation error, and then clicks the Toggle button twice to reset the page.


Return to http://www.beanview.com/

@author $Author: wiverson $
@version $Revision: 1.5 $, $Date: 2006/08/12 01:31:14 $