Can I add a ClickListener to a Notification?


i would like to add a clicklistener to a notification…especially to the type Notification.TYPE_TRAY_NOTIFICATION.
if i click on the notyfication i want to open an other view or something like this…maybe like an email notification

is it possible? didnt find an addListener method

thank you

Hello Mathias!

Maybe it’s a usable “hack” solution if you make a non modal window, with the notification text and with the same style as the notification is and handle the click (maybe with the layout click listener or something similar). I havn’t got any better ide, since the notifaction hasn’t any interaction and listeners from the application as i see…

I hope i could help to you!
Károly Kótay-Szabó


thank you for the reply. i think i will try your “hack”.
Maybe one of the vaadin guys is reading this :slight_smile: it’s not a big thing, but it would be “a nice to have” feature

i’ll let this thread marked as a question for a while
maybe there is an other solution, like extending the notyfications or something like that

thanks so far

There is already an enhancement request (
) about this. In general, messages on the forum about possible enhancements will disappear among thousands of others, so any improvements or fixes that should be done should be in the issue tracking system to have any chance of being implemented.

Extending the client side part of notifications is only really possible in Vaadin 6.7 (to be published soon) and later - see
. I haven’t checked how easy or hard it would be to do what you are interested in.

hello henri,

it’s nice to hear that there is allready a request for that.
i will make an enhancement request. sry for that. i’m nearly new to vaadin in future.

thank you for the reply.