Class AiMessageInput.SubmitEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<AiMessageInput>
io.jmix.aichat.component.messageinput.AiMessageInput.SubmitEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
AiMessageInput
@DomEvent("submit")
public static class AiMessageInput.SubmitEvent
extends com.vaadin.flow.component.ComponentEvent<AiMessageInput>
The
submit event which is fired by AiMessageInput
component.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<com.vaadin.flow.component.ai.common.AIAttachment> protected StringFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSubmitEvent(AiMessageInput source, boolean fromClient, String value) Creates the event. -
Method Summary
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Field Details
-
value
-
attachments
-
-
Constructor Details
-
SubmitEvent
public SubmitEvent(AiMessageInput source, boolean fromClient, @EventData("event.detail.value") String value) Creates the event.- Parameters:
source- the source componentfromClient- true if the event comes from the clientvalue- the value of the input
-
-
Method Details
-
getValue
Gets the submitted value.- Returns:
- the submitted value
-
getAttachments
- Returns:
- the attachments present when the message was submitted — an
immutable snapshot. This is the only way the submitted
attachments reach the server (like
getValue()for the text);AiMessageInput.getAttachments()is emptied after an effective submit (a non-blank value or at least one attachment, while not generating).
-