Class MessageList.AttachmentClickEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<MessageList>
com.vaadin.flow.component.messages.MessageList.AttachmentClickEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
MessageList
@DomEvent("attachment-click-flow")
public static class MessageList.AttachmentClickEvent
extends ComponentEvent<MessageList>
Event fired when an attachment is clicked in the message list.
Note: This event listens to the attachment-click-flow event
dispatched by the connector, which enriches the web component's
attachment-click event with item and attachment indexes.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionAttachmentClickEvent(MessageList source, boolean fromClient, int itemIndex, int attachmentIndex) Creates a new attachment click event. -
Method Summary
Modifier and TypeMethodDescriptionGets the clicked attachment.getItem()Gets the message item containing the clicked attachment.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
AttachmentClickEvent
public AttachmentClickEvent(MessageList source, boolean fromClient, @EventData("event.detail.itemIndex") int itemIndex, @EventData("event.detail.attachmentIndex") int attachmentIndex) Creates a new attachment click event.- Parameters:
source- the source componentfromClient- whether the event originated from the clientitemIndex- the index of the message item containing the clicked attachmentattachmentIndex- the index of the clicked attachment within the item's attachments list
-
-
Method Details
-
getItem
Gets the message item containing the clicked attachment.- Returns:
- the message item
-
getAttachment
Gets the clicked attachment.- Returns:
- the clicked attachment
-