myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abrams, Howard A" <Howard.Abr...@ca.com>
Subject Problem with UIInput's 'validate'
Date Thu, 03 Mar 2005 22:21:44 GMT
Hi,

I've been playing around with some custom components and I ran into a
problem with myFaces 1.0.8 (vs. the Sun reference implementation). I
wanted to bring it up to the list before I created a new issue.

In the reference implementation, UIInput has a protected method
'validateValue'. By default it does some basic checks including checking
the 'required' property, calling the validators, etc. It can be
overridden without messing with the basics of validation (getting the
converted value, firing a valueChange event, etc). In myFaces, this has
all been lumped into 'validate'. This means to tweak the validation of a
custom component based on UIInput, you must re-implement all of
'validate', including all the basics. To make matters worse,
'getConvertedValue' is private in myFaces (it is protected in the RI),
so you must re-implement all of that method as well (and call it
something else).  

According to the 1.1 spec, 'validate' must "Perform the algorithm
described in the javadoc to validate the local value of this UIInput",
and the 1.1 javadoc. The javadoc in-turn mentions 'validateValue', etc,
etc.  

I'd like to modify UIInput to:
1. Add a protected method 'validateValue', and change the 'validate'
implementation to use it
2. Change 'getConvertedValue' from private to protected

Does anyone have an opinion on this?

Thanks in advance,
h.

Howard Abrams, Ph.D.
Computer Associates
Senior Architect
howard.abrams@ca.com 



Mime
View raw message