@Tag(value="vaadin-message-list") @JsModule(value="./messageListConnector.js") @JsModule(value="@vaadin/vaadin-messages/src/vaadin-message-list.js") @NpmPackage(value="@vaadin/vaadin-messages", version="20.0.0") public class MessageList extends Component implements HasStyle, HasSize, LocaleChangeObserver
vaadin-message-list
element. The
component displays a list of messages that can be configured with
setItems(Collection)
.Constructor and Description |
---|
MessageList()
Creates a new message list component.
|
MessageList(Collection<MessageListItem> items)
Creates a new message list component, with the provided items rendered as
messages.
|
MessageList(MessageListItem... items)
Creates a new message list component, with the provided items rendered as
messages.
|
Modifier and Type | Method and Description |
---|---|
List<MessageListItem> |
getItems()
Gets the items that are rendered as message components in this message
list.
|
void |
localeChange(LocaleChangeEvent event)
Notifies when the UI locale is changed.
|
void |
setItems(Collection<MessageListItem> items)
Sets the items that will be rendered as messages in this message list.
|
void |
setItems(MessageListItem... items)
Sets the items that will be rendered as messages in this message list.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
getCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
getElement
addAttachListener
addDetachListener
public MessageList()
setItems(Collection)
.public MessageList(Collection<MessageListItem> items)
items
- the items to render as messagessetItems(Collection)
public MessageList(MessageListItem... items)
items
- the items to render as messagessetItems(MessageListItem...)
public void setItems(Collection<MessageListItem> items)
items
- the items to set, not null
and not containing any
null
itemspublic void setItems(MessageListItem... items)
items
- the items to set, none of which can be null
public List<MessageListItem> getItems()
public void localeChange(LocaleChangeEvent event)
LocaleChangeObserver
localeChange
in interface LocaleChangeObserver
event
- locale change event with event detailsCopyright © 2021. All rights reserved.