You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Johannes Murth <jo...@gmail.com> on 2013/04/03 18:47:13 UTC
jsr 303 configuration in myfaces
hi!
in our project, we have a specific configuration of the jsr 303 validator
which is configured with the constructor. it's actually a spring bean. how
can we tell myfaces to use specific validator object? or is there an other
way to customize the validator?
specifically, we want to configure the message resolving for error messages.
thanks in advance and best regards, johannes murth
Re: jsr 303 configuration in myfaces
Posted by Matt Benson <gu...@gmail.com>.
>From the JSF spec:
■ If the servlet context contains a ValidatorFactory instance under the
attribute named
javax.faces.validator.beanValidator.ValidatorFactory, this instance is used
by JSF to acquire Validator instances
(specifically in the BeanValidator). This key should be defined in the
constant named VALIDATOR_FACTORY_KEY
on BeanValidator.
You should be able to export the Spring-created ValidatorFactory into the
ServletContext using
org.springframework.web.context.support.ServletContextAttributeExporter.
HTH,
Matt
On Wed, Apr 3, 2013 at 11:47 AM, Johannes Murth <jo...@gmail.com>wrote:
> hi!
>
> in our project, we have a specific configuration of the jsr 303 validator
> which is configured with the constructor. it's actually a spring bean. how
> can we tell myfaces to use specific validator object? or is there an other
> way to customize the validator?
>
> specifically, we want to configure the message resolving for error
> messages.
>
> thanks in advance and best regards, johannes murth
>