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:
  • Constructor Details

    • CreateItemEvent

      @Deprecated public CreateItemEvent(AbstractLookupField source, boolean fromClient)
      Deprecated.
      Creates a new create-item event without the search text, so getFilter() returns an empty string.
      Parameters:
      source - the source component
      fromClient - true if 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 component
      fromClient - true if the event originated from the client
      filter - the text in the search field of the dialog
  • Method Details

    • getFilter

      public String 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