Reputation: 830
How can I create a modal dialog window in Vaadin 7.x? I've already found out that I have the main window and add to this my new dialog window, but how can I get the main window? I want to reach it from a View.
getApplication().getMainWindow()
getWindow()
none of them works..
Upvotes: 3
Views: 6647
Reputation: 4754
This depends which is your main class. From a normal UI-inherited class you can just use addWindow(...) to add a dialog(subwindow) to the UI.
public class MyApplication extends UI
{
@Override
protected void init(VaadinRequest request)
{
addWindow(new ModalWindow());
}
}
Upvotes: 7