Rittel
Rittel

Reputation: 589

Retrieve a Validator from FacesContext

I was wondering if it is possible to retrieve a Validator from the FacesContext as i can retrieve the ids from there. by doing this:

Iterator<String> ids = FacesContext.getCurrentInstance()
                .getApplication().getValidatorIds();

I would now like to get a Validator by using those ids. Is this possible?

Upvotes: 1

Views: 174

Answers (1)

rdcrng
rdcrng

Reputation: 3443

Yes:

FacesContext.getCurrentInstance().getApplication().createValidator(java.lang.String validatorId);

See javadoc.

Upvotes: 2

Related Questions