Class AbstractLookupField.CreateItemEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<AbstractLookupField>
com.vaadin.componentfactory.lookupfield.AbstractLookupField.CreateItemEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
AbstractLookupField<T,SelectT, ComboboxT extends com.vaadin.flow.component.HasEnabled & com.vaadin.flow.component.HasValidation & com.vaadin.flow.component.HasSize & com.vaadin.flow.component.HasValue<?, SelectT>, ComponentT extends AbstractLookupField<T, SelectT, ComboboxT, ComponentT, FilterType>, FilterType>
@DomEvent("vcf-lookup-field-create-item-event")
public static class AbstractLookupField.CreateItemEvent
extends com.vaadin.flow.component.ComponentEvent<AbstractLookupField>
Event fired when the user clicks the create item button.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionCreateItemEvent(AbstractLookupField source, boolean fromClient) Deprecated.CreateItemEvent(AbstractLookupField source, boolean fromClient, String filter) Creates a new create-item event. -
Method Summary
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
CreateItemEvent
Deprecated.useCreateItemEvent(AbstractLookupField, boolean, String)to pass the search textCreates a new create-item event without the search text, sogetFilter()returns an empty string.- Parameters:
source- the source componentfromClient-trueif the event originated from the client
-
CreateItemEvent
public CreateItemEvent(AbstractLookupField source, boolean fromClient, @EventData("event.detail.filter") String filter) Creates a new create-item event.- Parameters:
source- the source componentfromClient-trueif the event originated from the clientfilter- the text in the search field of the dialog
-
-
Method Details
-
getFilter
Gets the text in the search field of the dialog when the create button was clicked, usually the start of the item to create.- Returns:
- the search text, empty when nothing was typed
-
CreateItemEvent(AbstractLookupField, boolean, String)to pass the search text