Custom Events not fired or registered in Vaadin 14


I created custom event and wanted to fire it on button click, and catch in custom component (which is in session for each user). However, something didn’t happen, either fire or catch (listen)

public class OfflineServiceNotification extends Notification {


	public OfflineServiceNotification() {
		addListener(MessageChangeEvent.class, event -> setNewDateRange(event.dateFrom, event.dateTo).open());

	private OfflineServiceNotification setNewDateRange(LocalDateTime dateFrom, LocalDateTime dateTo) {
		return this;

	public static class MessageChangeEvent extends ComponentEvent<com.vaadin.flow.component.Component> {

		private LocalDateTime dateFrom;
		private LocalDateTime dateTo;

		public MessageChangeEvent(
				LocalDateTime dateFrom,
				LocalDateTime dateTo,
				com.vaadin.flow.component.Component source,
				boolean fromClient)
			super(source, fromClient);
			this.dateFrom = dateFrom;
			this.dateTo = dateTo;

			Button btnOffline = ComponentHelper.getPrimaryButton("Set application offline message", false);
			btnOffline.addClickListener(event -> {
				UI current = UI.getCurrent();
				current.access(() -> {
					fireEvent(new OfflineServiceNotification.MessageChangeEvent(
							dt.getStartDate().atTime(0, 0), dt.getEndDate().atTime(0, 0), this, false));

I have anotation @Push set.

I tried it also without current.push()
and also withou current.access.

Any ideas?