Thanks for your reaction,
i  know what you mean, but that doesn't solve my problem(sry i just
came from a old year party so i'm not tottaly sober, but will try to
explain )

on 1 page i have two adresses, one normal street adres and 1 as we
call it in the netherlands a postbus adres ,they can't have the same
id, cause of duplicate ids, and they aren't within a datatable, but
they still have the same validation rules.
so that's my main problem,

So the problem is  that i want to write a genric validator that
doesn't know of the id's you might want to use within your page, but
only  the meaning of those id, so u can have multiple zipcode checks
within the same page  without altering your validator.

Cheers
Job de Noo
PS, if you don't understand anything i said, the cause probely would
by because  i'm far from sober so please tell me to inform you agian
;-)





On 12/29/06, David Chandler <[EMAIL PROTECTED]> wrote:
You can use one validator to target multiple components as long as the
component IDs you assign are distinct. There should be no problem
using a form-level validator to reach of these fields with
findComponent(id).

<h:inputText id="address1street".../>
<h:inputText id="address1zip".../>
<h:inputText id="address2street".../>
<h:inputText id="address2zip".../>

Is the issue that the address fields are in a dataTable so they don't
have unique IDs? In that case, <h:dataTable> already does for you what
you're trying to do. If you have a component in a column with a
validator attribute, it will call the vaildator for each row. Inside
the validator, findComponent("street1") will return the instance of
the component with ID=street1 for the current row.

It might help for you to post a simplified form and the validation
method you were originally trying to use.

HTH,
/dmc

Reply via email to