V - type of itempublic abstract static class TagField.NewTagProvider<V> extends java.lang.Object implements java.util.function.Consumer<HasEnterPressHandler.EnterPressEvent>
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;
}
});
| Constructor and Description |
|---|
NewTagProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(HasEnterPressHandler.EnterPressEvent event) |
abstract V |
create(java.lang.String text)
Provides ability to create new item from entered text.
|
public void accept(HasEnterPressHandler.EnterPressEvent event)
accept in interface java.util.function.Consumer<HasEnterPressHandler.EnterPressEvent>@Nullable public abstract V create(java.lang.String text)
text - user's entered text