java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.view.View<io.jmix.flowui.component.layout.ViewLayout>
io.jmix.flowui.view.StandardView
de.bytestore.hostinger.view.support.chat.ChatView
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.router.AfterNavigationObserver, com.vaadin.flow.router.BeforeEnterObserver, com.vaadin.flow.router.BeforeLeaveObserver, com.vaadin.flow.router.HasDynamicTitle, com.vaadin.flow.router.internal.AfterNavigationHandler, com.vaadin.flow.router.internal.BeforeEnterHandler, com.vaadin.flow.router.internal.BeforeLeaveHandler, io.jmix.flowui.fragment.FragmentOwner, Serializable

@Route(value="chat", layout=MainView.class) @ViewController("host_Chat") @ViewDescriptor("chat-view.xml") public class ChatView extends io.jmix.flowui.view.StandardView
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.jmix.flowui.view.View

    io.jmix.flowui.view.View.AfterCloseEvent, io.jmix.flowui.view.View.BeforeCloseEvent, io.jmix.flowui.view.View.BeforeShowEvent, io.jmix.flowui.view.View.InitEvent, io.jmix.flowui.view.View.PostReadyEvent, io.jmix.flowui.view.View.QueryParametersChangeEvent, io.jmix.flowui.view.View.ReadyEvent, io.jmix.flowui.view.View.RestoreComponentsStateEvent
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onAttachEvent(com.vaadin.flow.component.AttachEvent event)
    Handles the attach event of a UI component.
    void
    onCloseClick(com.vaadin.flow.component.ClickEvent<io.jmix.flowui.kit.component.button.JmixButton> event)
    Handles the click event for the close button.
    void
    onDetachEvent(com.vaadin.flow.component.DetachEvent event)
    Handles the detachment event of a UI component.
    void
    onQueryParametersChange(io.jmix.flowui.view.View.QueryParametersChangeEvent event)
    Handles changes to query parameters in the current view.
    void
    onSubmitClick(com.vaadin.flow.component.ClickEvent<io.jmix.flowui.kit.component.button.JmixButton> event)
    Handles the click event for the submit button.

    Methods inherited from class io.jmix.flowui.view.View

    afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, getId, getPageTitle, isPreventBrowserTabClosing, setId, setPageTitle, setPreventBrowserTabClosing

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement

    Methods inherited from class com.vaadin.flow.component.Component

    findAncestor, from, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, isAttached, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, setVisible

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Constructor Details

    • ChatView

      public ChatView()
  • Method Details

    • onQueryParametersChange

      @Subscribe public void onQueryParametersChange(io.jmix.flowui.view.View.QueryParametersChangeEvent event)
      Handles changes to query parameters in the current view. This method processes events that indicate a change in query parameters, primarily focusing on retrieving and displaying information related to a specific ticket if the "id" parameter is present. It fetches the associated ticket from the database, retrieves related messages, and updates the UI components accordingly.
      Parameters:
      event - the QueryParametersChangeEvent object containing the updated query parameters.
    • onSubmitClick

      @Subscribe("submit") public void onSubmitClick(com.vaadin.flow.component.ClickEvent<io.jmix.flowui.kit.component.button.JmixButton> event)
      Handles the click event for the submit button. This method retrieves the input message from the message field and sends it using the sendMessage method with a ticket type of MESSAGE. The input is then processed to update the UI and backend data accordingly.
      Parameters:
      event - the ClickEvent object that contains details about the submit button click
    • onCloseClick

      @Subscribe(id="close", subject="clickListener") public void onCloseClick(com.vaadin.flow.component.ClickEvent<io.jmix.flowui.kit.component.button.JmixButton> event)
      Handles the click event for the close button. This method retrieves the value from the message field and sends it using the sendMessage method with a ticket type of CLOSE.
      Parameters:
      event - the ClickEvent object that contains details about the close button click
    • onAttachEvent

      @Subscribe public void onAttachEvent(com.vaadin.flow.component.AttachEvent event)
      Handles the attach event of a UI component. This method is triggered when the component to which the listener is attached becomes part of the UI. It sets up a periodic task using Project Reactor that runs at one-second intervals. The task ensures the UI is accessed properly to update ticket information within the current user session.
      Parameters:
      event - the AttachEvent object
    • onDetachEvent

      @Subscribe public void onDetachEvent(com.vaadin.flow.component.DetachEvent event)
      Handles the detachment event of a UI component. This method is triggered when the component to which the listener is attached is detached from the UI. It ensures that any existing subscriptions or resources are properly disposed to avoid memory leaks or unintended behavior.
      Parameters:
      event - the DetachEvent object that contains details about the detachment of the component