Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Individual tray notification with delay not working
Hi,
I am trying to display a trayinfo like message but just in the center instead. It looks like setDelayMsec is not working.
Notification notifyMsg = new Notification("", Notification.Type.TRAY_NOTIFICATION);
notifyMsg.setHtmlContentAllowed(true);
if (title != null && !title.isEmpty()) notifyMsg.setCaption(title);
if (text != null && !text.isEmpty()) notifyMsg.setDescription(text);
if (showCentered)
notifyMsg.setPosition(Position.MIDDLE_CENTER);
else
notifyMsg.setPosition(Position.BOTTOM_RIGHT);
notifyMsg.setDelayMsec(3000);
if (text.length() > 40) notifyMsg.setDelayMsec(5000);
if (text.length() > 120) notifyMsg.setDelayMsec(7000);
notifyMsg.show(Page.getCurrent());
What can be the problem here? I get the message displayed until I click on it. I am using vaadin 7.6.8.
Last updated on
It looks like this is working if I do not use debugging mode in NetBeans stopping around there. So just seems to be an issue while in debug mode. So it's ok.
Last updated on
You cannot reply to this thread.