Class MessageList
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.messages.MessageList
-
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.i18n.LocaleChangeObserver,Serializable
@Tag("vaadin-message-list") @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.0.1") @NpmPackage(value="@vaadin/message-list",version="23.0.1") @NpmPackage(value="@vaadin/vaadin-messages",version="23.0.1") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("./messageListConnector.js") @JsModule("@vaadin/message-list/src/vaadin-message-list.js") public class MessageList extends com.vaadin.flow.component.Component implements com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasSize, com.vaadin.flow.i18n.LocaleChangeObserverServer-side component for thevaadin-message-listelement. The component displays a list of messages that can be configured withsetItems(Collection).- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MessageList()Creates a new message list component.MessageList(MessageListItem... items)Creates a new message list component, with the provided items rendered as messages.MessageList(Collection<MessageListItem> items)Creates a new message list component, with the provided items rendered as messages.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MessageListItem>getItems()Gets the items that are rendered as message components in this message list.voidlocaleChange(com.vaadin.flow.i18n.LocaleChangeEvent event)voidsetItems(MessageListItem... items)Sets the items that will be rendered as messages in this message list.voidsetItems(Collection<MessageListItem> items)Sets the items that will be rendered as messages in this message list.-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, 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.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
-
-
-
-
Constructor Detail
-
MessageList
public MessageList()
Creates a new message list component. To populate the content of the list, usesetItems(Collection).
-
MessageList
public MessageList(Collection<MessageListItem> items)
Creates a new message list component, with the provided items rendered as messages.- Parameters:
items- the items to render as messages- See Also:
setItems(Collection)
-
MessageList
public MessageList(MessageListItem... items)
Creates a new message list component, with the provided items rendered as messages.- Parameters:
items- the items to render as messages- See Also:
setItems(MessageListItem...)
-
-
Method Detail
-
setItems
public void setItems(Collection<MessageListItem> items)
Sets the items that will be rendered as messages in this message list.- Parameters:
items- the items to set, notnulland not containing anynullitems
-
setItems
public void setItems(MessageListItem... items)
Sets the items that will be rendered as messages in this message list.- Parameters:
items- the items to set, none of which can benull
-
getItems
public List<MessageListItem> getItems()
Gets the items that are rendered as message components in this message list.- Returns:
- an unmodifiable view of the list of items
-
localeChange
public void localeChange(com.vaadin.flow.i18n.LocaleChangeEvent event)
- Specified by:
localeChangein interfacecom.vaadin.flow.i18n.LocaleChangeObserver
-
-