Package com.storedobject.ui
Class BrowserMessage
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.littemplate.LitTemplate
com.storedobject.helper.LitComponent
com.storedobject.ui.BrowserMessage
- 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.internal.Template
,Serializable
@Tag("so-browser-message")
@JsModule("./so/browser-message/browser-message.js")
public class BrowserMessage
extends LitComponent
An invisible component to grab messages sent to the browser window. The messages could be from an embedded iframe
content. You should add an instance of this to your component layout to grab the messages.
- Author:
- Syam
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.storedobject.helper.LitComponent
executeJS, onDetach
Methods inherited from class com.vaadin.flow.component.littemplate.LitTemplate
getChildren
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, 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.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
BrowserMessage
Constructor. A message grabber is passed as the parameter. The grabber is an instance of aBiConsumer
that accepts a String value and a JSON value. The String value will contain the origin of the message and the JSON value will contain the actual message.- Parameters:
messageGrabber
- Message consumer. Message is passed as a JSON.
-