You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jing Zhou <ji...@netspread.com> on 2003/06/18 17:35:37 UTC

[Carrier-Tips-On-Struts] Phased Validation Model: Required Property

All,

In the last tip, we have shown that the reset method is
cleanly solved in the Wheels algorithms. This tip will introduce
a concept of phased validation model in modern GUI tool.

Why phased? The answer is all about user experience on GUI.
Someone recently posted 12 configuration steps for an extremely
simple validation requirement - setting up a required property.
The concern is too much for new users in general. When we
consider the configuration effort for a mid-size project with
thousands of required fields, it is going to be painful even for
experienced developers or administrators.

If you work as a designer in Carrier, setting up a required
property you only need to click one checkbox in the property
descriptor, then you specify where to show error message
in the form view model.

The following link has three screen shots taken from one
of the Carrier demos. It is designed for the IRS Tax Form 1040.
http://www.netspread.com/tips.html#required
If a user does not fill in any required fields, the second
screen shot shows errors. If the user fills in an invalid
filing date, the filing date field will have a conversion error
nearby as shown in the third screen shot.

The required and conversion validations are performed
in phase one validations in Carrier. In the following tips, we
will introduce the phase two validations and examples
that validate social security number, amount of money, 
telephone number in the Form 1040.

Jing

creator of Carrier

Carrier - The first Internet IDE (not a traditional desktop IDE!)
Internet applications should be designed on Internet,
assembled on Internet, and used on Internet.
Download Carrier. It includes the Struts RC2 libraries now.
http://www.netspread.com/downloads/instructions.html