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 Details

    • value

      protected String value
    • attachments

      protected List<com.vaadin.flow.component.ai.common.AIAttachment> attachments
  • Constructor Details

    • SubmitEvent

      public SubmitEvent(AiMessageInput source, boolean fromClient, @EventData("event.detail.value") String value)
      Creates the event.
      Parameters:
      source - the source component
      fromClient - true if the event comes from the client
      value - the value of the input
  • Method Details

    • getValue

      public String getValue()
      Gets the submitted value.
      Returns:
      the submitted value
    • getAttachments

      public List<com.vaadin.flow.component.ai.common.AIAttachment> 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).