Multiple Notifications

  1. I noticed that if two notifications are set inside a button click event, they are not displayed sequentially

i.e.

Button btn = new Button(“Test Button”);

    btn.addListener(new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            getMainWindow().getWindow().showNotification("Button Clicked 1");
            getMainWindow().getWindow().showNotification("Button Clicked 2");
        }
    });

In this case when the button is clicked both notifications will be displayed at once. Is it possible to display them sequentially? One after the other??

  1. In addition I noticed that in the following code when the button is clicked the notification is never displayed,

Button btn2 = new Button(“Test Button2”);
btn2.addListener(new Button.ClickListener() {

        public void buttonClick(ClickEvent event) {

            getMainWindow().showNotification("Theme changed to 'LIFERAY'", Window.Notification.TYPE_WARNING_MESSAGE);

                getMainWindow().setTheme("liferay");

            }
        }
    });

Is there another approach or workaround to achieve this?

I would appreciate any help, thank you

IMO both of these sound like bugs. Please create tickets to dev.vaadin.com (the above test-cases are good).

The 1st problem has been reported (#2685 - http://dev.vaadin.com/ticket/2685) about 6months ago and has been set to minor

The 2nd I reported (Ticket #3276)

Thank you