jmix-docs
jmix-docs copied to clipboard
Describe ways to remove Validator and Event registrations
- There can be page in some "Architecture Principles" section describing the way to work with subscrible items with Registration functional interface
- Events section must have a subsection describing how to add and remove listeners with concrete example and link to Subscrible items page
- Validators section must have a subsection describing how to add and remove validator beans with concrete example and link to Subscrible items page
e.g.:
SizeValidator validator = applicationContext.getBean(SizeValidator.class);
Registration validatorRegistration = field.addValidator(validator);
if (noValidatorNeeded) {
validatorRegistration.remove();
}