Interface ActionItem
- All Superinterfaces:
ActionHolder,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.RegistrationAdds a listener to handle click events for the dropdown button item.Returns theActionassociated 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 theActionassociated with this item.- Specified by:
getActionin interfaceActionHolder- 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 forActionItemand will throw anUnsupportedOperationException.- Specified by:
addClickListenerin interfaceDropdownButtonItem- Parameters:
listener- theConsumerto processDropdownButtonItem.ClickEventwhen the item is clicked- Returns:
- a
Registrationobject to remove the listener later - Throws:
UnsupportedOperationException- if invoked on anActionItem
-