Re: (DoubleRange)Validator issue

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 26 Sep 2007 09:27:40 -0700

Matthias Wessendorf wrote:
> Hi guys,
> this mail on the Trinidad list ([1]) lead me to the following issue.
> In Trinidad, we extend the standard validators, like the
> doubleRangeValidator, but the "logic" of the validate is inherited.
> Inside of save/restore State methods, we delegate to the FacesBean
> instance, which takes care of saving / restoring all properties, like
> maximum or some Trinidad extra properties like "messageDetailMaximum".
> See [2] for the full source code.
> When using Trinidad on top of the RI (and client side validation is
> DISABLED), there are some issues (see [1]). It looks like there is a
> private property used the the RI (DoubleRange)Validator to indicate if
> maximum or minimum has been set (and these properties are also saved /
> restored). Since this is private, it's "odd" to add this property to
> Trinidad's (DoubleRange)Validator as well, to get it working with the
> RI, isnt' it ?
> I checked the MyFaces IMPL code of (DoubleRange)Validator (see [3])
> and it doesn't use such a property. So here, this combination (MyFaces
> + Trinidad (client validation DISABLED)) works.
> What do you think about this ?
Well, initially, I think what the RI is doing is perfectly fine. From
what I recall, there is nothing
in the spec stating that only public properties of a StateHolder must be
saved, so it seems Trinidad
is making assumptions that perhaps it shouldn't.

> Do you want me to file an issue ?
Since we're using JDK 5 now, there really is no need for these extra
properties, we could
just use boxing/unboxing to handle this.

If you want to open an enhancment request for this, feel free.
> Thx,
> Matthias
> [1]
> [2]
> [3]