I've run into the same problem every time I get to polishing
a JSF application. My thought is that there should be a new positional
replacement value in message templates that allows you to plug in the
value of the correlated output label. (If there are multiple, the first
would be selected).
In general, the position replacements are:
0 = invalid value
1 = example value (sometimes this applicable, in which case the
positional parameters shift)
2 = client id
We could add
3 = label value
It's debatable whether the HTML should be stripped from the value.
javax.faces.converter.DateTimeConverter.DATE={3}: ''{0}'' could not be
understood as a date. Example: {1}
-Dan
On Sat, Sep 12, 2009 at 9:24 AM, Damien
Gouyette
<damien.gouyette@gmail.com>
wrote:
Hello,
I have a lot of forms to do and i don't understand a point
<h:outputLabel value="client's birthdate"
for="birthDateField"/>
<h:inputText id="birthDateField" label="client's
birthdate"/>
<h:message for="birthDateField"/>
if i don't set label on inputText, i have an error message
like :
formNew:birthDate: 'a' could not be understood as
a date. Example: 12/09/2009 instead of
client's birthdate : 'a' could not be
understood as a date. Example: 12/09/2009
Can you reuse outputLabel value if exists ?
Just for information, this message is the french error
message when i set a dateConverter on my inputText. (little bug)
Damien GOUYETTE
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen