You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Pfau, Oliver" <ol...@siemens.com> on 2007/02/15 10:41:50 UTC

Validation

Hi,
 
is there a way to define a validator on a container tag ? In validator
description the nearests parent must have a value. But I want to
validate multiple checkboxes in one validator....so I thought I can
define a validator for instance on a panelgrid which includes all
checkboxes and iterate over the elements in the panelgrid (the
checkboxes). Is this possible ?
 
Regards,
Oliver

Re: Validation

Posted by Andrew Robinson <an...@gmail.com>.
Write a component extending UIComponentBase (not a validator) that in
the processValidations method loops through its children and does
whatever validation you want it to. Then just make sure
getRendersChildren is false so that the UIComponentBase's method
renders the children without any extra code on your part

On 2/15/07, Pfau, Oliver <ol...@siemens.com> wrote:
>
>
> Hi,
>
> is there a way to define a validator on a container tag ? In validator
> description the nearests parent must have a value. But I want to validate
> multiple checkboxes in one validator....so I thought I can define a
> validator for instance on a panelgrid which includes all checkboxes and
> iterate over the elements in the panelgrid (the checkboxes). Is this
> possible ?
>
> Regards,
> Oliver