Package io.jmix.dynmodelflowui.exception
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 Summary
FieldsModifier and TypeFieldDescriptionprotected MessageToolsprotected Metadataprotected ViewValidationFields inherited from class io.jmix.flowui.exception.AbstractUiExceptionHandler
classNames -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPerform exception handling.protected StringformatViolation(jakarta.validation.ConstraintViolation<?> violation) protected @Nullable StringresolveCaption(jakarta.validation.ConstraintViolation<?> violation) Methods inherited from class io.jmix.flowui.exception.AbstractUiExceptionHandler
canHandle, handle
-
Field Details
-
metadata
-
messageTools
-
viewValidation
-
-
Constructor Details
-
DynamicModelValidationExceptionHandler
public DynamicModelValidationExceptionHandler()
-
-
Method Details
-
doHandle
Description copied from class:AbstractUiExceptionHandlerPerform exception handling.- Specified by:
doHandlein classAbstractUiExceptionHandler- Parameters:
className- actual exception class namemessage- exception messagethrowable- exception instance. Can be null if the exception occurred on the server side and this exception class isn't accessible by the client.
-
formatViolation
-
resolveCaption
-