You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Hasan Turksoy <ht...@gmail.com> on 2008/03/07 23:55:03 UTC

[VALIDATOR] some extensions(bypassvalidation,groupvalidation,requiredvalidation) available for shale/commons validators

Hi,

We're using shale-validator and commons-validator frameworks at our JSF
project. Though they meet lots of our needs, i need to make some extensions
to them for some of our requirements. Our requirements were simply as below;

- bypass all validations : a submitter(button,combo,etc...) should bypass
all the validators while all the jsf phases work (there are some suggestions
about this like setting immediate attribute but it's not the right way of
doing this as applied jsf'ers know :) ).

- group validations : you (if you want) can group commonsvalidators in a
form. Then, say various submitters(button, combo, etc...) in the same form
to validate only given group of validators.

- required validation fix: use required commonsvalidator instead of JSF's
default required validator. By this way we can both have a client/server
side required validation and use it together with above infrastructures
(bypassvalidation and groupvalidation).

IMHO, these are among most common problems almost every JSF developer faces.
Now, i have open sourced my solutions for the use of community at googlecode
[1]. There are four projects opened. One [2] is including my changes on
shale/commons-validator codes for the above extensions. The other there are
sample projects demonstrating above abilities separately. I've provided
above extensions both separated and bundled. By this way, one can get all of
extensions and use above three abilities together or can get only one of
them for his purpose.

In addition to these, i've solutions for shale/commons-validator;
 - to work locale aware (like generated scripts or float validators may work
as locale aware - currently they work only at EN locale)
 - to support validation error message customization according to user's
preferences like showing in an alert or showing in a div

When open sourcing of these works finished, i'll provide these too with
pleasure.

Now, what is your ideas about mentioned extensions? Are they useful? Are
shale/commons-validator frameworks need any of them?

[1] http://code.google.com/u/hturksoy/
[2] http://code.google.com/p/commons-validator-ext/

regards,

Hasan Turksoy
http://www.jroller.com/hasant