com.vaadin.flow.component.messages.
Class MessageList
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.messages.MessageList
-
All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasSize, HasStyle, LocaleChangeObserver, Serializable
@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="21.0.5") public class MessageList extends Component implements HasStyle, HasSize, LocaleChangeObserver
Server-side component for the
vaadin-message-list
element. The component displays a list of messages that can be configured withsetItems(Collection)
.Author:
Vaadin Ltd.
See Also:
-
-
Constructor Summary
Constructors 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.
-
Method Summary
All Methods 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.
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, 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.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Methods inherited from interface com.vaadin.flow.component.HasSize
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
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Constructor Detail
-
MessageList
public MessageList()
Creates a new message list component. To populate the content of the list, use
setItems(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 messagesSee Also:
-
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 messagesSee Also:
-
-
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, notnull
and not containing anynull
items
-
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(LocaleChangeEvent event)
Description copied from interface:
LocaleChangeObserver
Notifies when the UI locale is changed.
Specified by:
localeChange
in interfaceLocaleChangeObserver
Parameters:
event
- locale change event with event details
-
-