Class DynamicModelValidationExceptionHandler

java.lang.Object
io.jmix.flowui.exception.AbstractUiExceptionHandler
io.jmix.dynmodelflowui.exception.DynamicModelValidationExceptionHandler
All Implemented Interfaces:
UiExceptionHandler

@Component("dynmod_DynamicModelValidationExceptionHandler") @Order(940) public class DynamicModelValidationExceptionHandler extends AbstractUiExceptionHandler
Presents DynamicModelValidationException thrown while saving an entity as a user-friendly validation notification instead of the generic unexpected-error dialog. Each violation is shown as "<attribute caption>: <message>".
  • Field Details

    • metadata

      @Autowired protected Metadata metadata
    • messageTools

      @Autowired protected MessageTools messageTools
    • viewValidation

      @Autowired protected ViewValidation viewValidation
  • Constructor Details

    • DynamicModelValidationExceptionHandler

      public DynamicModelValidationExceptionHandler()
  • Method Details

    • doHandle

      protected void doHandle(String className, String message, @Nullable Throwable throwable)
      Description copied from class: AbstractUiExceptionHandler
      Perform exception handling.
      Specified by:
      doHandle in class AbstractUiExceptionHandler
      Parameters:
      className - actual exception class name
      message - exception message
      throwable - exception instance. Can be null if the exception occurred on the server side and this exception class isn't accessible by the client.
    • formatViolation

      protected String formatViolation(jakarta.validation.ConstraintViolation<?> violation)
    • resolveCaption

      protected @Nullable String resolveCaption(jakarta.validation.ConstraintViolation<?> violation)