I want to use notifications in search Executor to show messages. How do I do that?
Hi,
- Obtain the current ui:
AppUI current = AppUI.getCurrent();
- Use the
access
method:
current.access(() -> {
notifications.create()
.withCaption("Search String: " + searchString)
.show();
});
Note: the current UI must be obtained outside of SearchExecutor scope, e.g.:
AppUI current = AppUI.getCurrent();
suggestionPickerField.setSearchExecutor((searchString, searchParams) -> {
current.access(() -> {
notifications.create()
.withCaption("Search String: " + searchString)
.show();
});
return ...;
});
Gleb
1 Like