Package io.jmix.ui.component
Class TagField.NewTagProvider<V>
java.lang.Object
io.jmix.ui.component.TagField.NewTagProvider<V>
- Type Parameters:
V
- type of item
- All Implemented Interfaces:
Consumer<HasEnterPressHandler.EnterPressEvent>
public abstract static class TagField.NewTagProvider<V>
extends Object
implements Consumer<HasEnterPressHandler.EnterPressEvent>
Enables to handle a user's entered text and add it to a TagField value.
For instance:
tagField.setEnterActionHandler(new TagField.NewTagProvider<ServiceType>() { @Nullable @Override public ServiceType create(String text) { ServiceType serviceType = dataManager.create(ServiceType.class); serviceType.setName(text); return serviceType; } });