Is there in Vaadin a class like JOptionPane in Swing??

All is in the subject!

Hi Julie,

not in the Vaadin core, but you can take a look at my
Toolkit Productivity Tools
addon library which implements the common message dialogs functionality.

See the
on-line demo
for showcase and usage examples as well as reference docs. If you’ll have any questions, just ask here :slight_smile:

Dmitri

Thanks for your answer!!
I look at your library but what I want is mostly the return of the functions “show…” because in fact I try to validate the value of some components in my window and I’d like to show a message to the user to inform him he forgot to complete a form’s part and then continue the validation if the user answers OK.
I don’t know if I’m clear!

Julie,

this is the web stuff, so you can’t just wait after showMessageDialog(…) function like in swing - your logic works at the server side and UI runs at the client side and the one way HTTP protocol is between the parts :slight_smile:

So you’ll need to use a callback method to receive the dialog close result. However, I do not see any problems with it - look at the sample source code (press the “view source” link in the online demo).