Interface ActionItem
- All Superinterfaces:
DropdownButtonItem
- All Known Implementing Classes:
AbstractDropdownButton.ActionItemImpl
Represents an item in a dropdown button that is associated with an
Action
.
This interface provides functionalities for retrieving the related action
and delegates click event handling to the encapsulated action logic.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.kit.component.dropdownbutton.DropdownButtonItem
DropdownButtonItem.ClickEvent
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.vaadin.flow.shared.Registration
Adds a listener to handle click events for the dropdown button item.Returns theAction
associated with this item.Methods inherited from interface io.jmix.flowui.kit.component.dropdownbutton.DropdownButtonItem
getId, getParent, isEnabled, isVisible, setEnabled, setVisible
-
Method Details
-
getAction
Action getAction()Returns theAction
associated with this item.- Returns:
- the associated action, or null if no action is set
-
addClickListener
default com.vaadin.flow.shared.Registration addClickListener(Consumer<DropdownButtonItem.ClickEvent> listener) Adds a listener to handle click events for the dropdown button item. This method is not supported forActionItem
and will throw anUnsupportedOperationException
.- Specified by:
addClickListener
in interfaceDropdownButtonItem
- Parameters:
listener
- theConsumer
to processDropdownButtonItem.ClickEvent
when the item is clicked- Returns:
- a
Registration
object to remove the listener later - Throws:
UnsupportedOperationException
- if invoked on anActionItem
-