webtier@glassfish.java.net

Re: [webtier] Custom validator, empty inputTextarea

From: Uwe Seimet <Uwe.Seimet_at_seimet.de>
Date: Sat, 23 Aug 2008 18:54:16 +0200

> Thank you for your explanations. Unfortunatley a bean validator also
> does not work: The validation method of the bean validator is not called
> unless the required attribute of the input field is set. But I cannot set
> this attribute because whether input in this field is required or not is
> exactly what I need to check with my own validator.

Eventually I was able to solve my problem with a bean validator. I bind
the validator to the checkbox, not to the input field. I can then check
both the checkbox state and the input field content within the validator
and can add the validation error message to the input field messages.
Thanks to all who responded!

-- 
-----------------------------------------------------------------------
  Dr. Uwe Seimet                                http://www.seimet.de/