Record Class ClipboardPasteFailedEvent
java.lang.Object
java.lang.Record
com.vaadin.flow.component.clipboard.ClipboardPasteFailedEvent
- Record Components:
file- metadata for the file that failed to uploadreason- a short description of the failure as reported by the browser (typically theThrowable.toString()of the failedfetchpromise); nevernull, may be empty
- All Implemented Interfaces:
Serializable
public record ClipboardPasteFailedEvent(ClipboardFileInfo file, String reason)
extends Record
implements Serializable
Fired when uploading a single pasted file fails on the client — for example
because the network drops, the server returns a non-2xx status, or the upload
handler rejects the file. The remaining files in the same paste are still
uploaded; an event is fired per failed file.
Use this hook to dismiss progress indicators that
ClipboardPasteStartEvent armed and to surface the failure to the
user.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClipboardPasteFailedEvent(ClipboardFileInfo file, String reason) Creates an instance of aClipboardPasteFailedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-