I try to use the OmniFaces @Param annotation to inject a request parameter.
I also make use of its validatorClasses
attribute to validate the parameter. Eventually this used validator needs a special attribute to function and I want to pass the value by setting the validatorAttributes
attribute. Unfortunately I don't know how. The documentation provides a description but I just don't get it right.
Can someone help please?
Here's some code:
@Inject
@Param(
name = "the_param_name",
validatorClasses = MyFreshValidator.class,
validatorAttributes = ?
)
private MyFreshClass instance;
It would be ideal to give another object of the same class to the validator.
value
(e.g. a field of the same class), right? – Aviator