Package com.vaadin.featurepack.ui
Class FGrid.CommitErrorEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>
com.vaadin.featurepack.ui.Event
com.vaadin.featurepack.ui.FGrid.CommitErrorEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
FGrid
An event which is fired when saving the editor fails
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrorColumn(FGrid.Column column) Marks that an error indicator should be shown for the editor of a column.getCause()Retrieves the cause of the failureGets the component where the event occurred.Gets all the columns that have been marked as erroneous.Gets the error message to show to the user.booleanChecks if validation exceptions caused this errorvoidsetUserErrorMessage(String userErrorMessage) Sets the error message to show to the user.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
CommitErrorEvent
-
-
Method Details
-
getCause
Retrieves the cause of the failure- Returns:
- the cause of the failure
-
getComponent
Description copied from class:EventGets the component where the event occurred.- Overrides:
getComponentin classEvent- Returns:
- the source component of the event
-
isValidationFailure
public boolean isValidationFailure()Checks if validation exceptions caused this error- Returns:
- true if the problem was caused by a validation error
-
addErrorColumn
Marks that an error indicator should be shown for the editor of a column.- Parameters:
column- the column to show an error for
-
getErrorColumns
Gets all the columns that have been marked as erroneous.- Returns:
- an umodifiable collection of erroneous columns
-
getUserErrorMessage
Gets the error message to show to the user.- Returns:
- error message to show
-
setUserErrorMessage
Sets the error message to show to the user.- Parameters:
userErrorMessage- the user error message to set
-