jmix-docs icon indicating copy to clipboard operation
jmix-docs copied to clipboard

Describe ways to remove Validator and Event registrations

Open syncro opened this issue 6 months ago • 0 comments

  1. There can be page in some "Architecture Principles" section describing the way to work with subscrible items with Registration functional interface
  2. Events section must have a subsection describing how to add and remove listeners with concrete example and link to Subscrible items page
  3. 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();
        }

syncro avatar Aug 14 '24 08:08 syncro