Standard dialogs


After looking at the sampler demo and reading the book, I still did not find an easy way to create some standard dialogs as we know them from Windows or other JS libraries for question, info, warning, and error (e.g. a modal dialog with question icon, some text, and a yes and no button).

Are there some predefined dialogs or do I have to program them myself?


Hi Thomas,

There are no predefined window styles for errors and warnings, but you should take a look at the
that are meant as a replacement for old-school error/warning dialogs.




Yes, I saw the notifications.

However they do not offer a choice like Yes/No or Ok/Cancel and there are no predefined icons for question/info/warning/error. As your components and themes are otherwise quite complete, I think that would be a good enhancement. As it is right now, every developer must create their own set of standard dialogs.

What do you mean?

By the way, the links you included in your post are not working. They look like:""

This is true, currently you will have to implement them yourself, but creating your own generic dialog box with for example a modal window is quite easy. I have no idea about the R&D team’s plan on making such generic dialog boxes directly to Vaadin, but I can immediately see two problems with them. One being the icons as Vaadin doesn’t come with an iconset (although I think there has been some discussion about possibly including an iconset) and the other problem is the localization of the buttons. Both problems could of course be solved with allowing the developer to define the icons and the button labels.

This is a known problem and our web master is looking into it. Thanks though for pointing it out.

  • Kim

Interesting bug with the links, apparently you shouldn’t quote the address when using the URL-tags because then it adds the address in front. But this only happens in Firefox aswell.

I tested the problem in a fresh install of the latest version of Liferay and it was still there so i’ll be adding it as a bug to Liferay.

Thanks for pointing it out!


Hi Thomas,

some of such dialogs are present in contrib/tpt package, OptionDialog class for instance.