Prevent window close

How can I prevent a window to be closable? I think a method on the Window class to set a closable property would be nice, but I couldn’t find such a functionality…

Erdinc

I think, there si no such feature in the current release of Vaadin. But you may try to tweak the CSS for the Window class (or made a new style for the non-closable windows) and remove/hide the close button from there.

Not a feature yet, but a ticket is scheduled for 7.0.0 (next summer):
#3120
.

A workaroud is, as Dmitri said, to hide the close button with CSS

.v-window-closebox {
   display: none;
}
/* Or if you have a stylename for the window */
.v-window-stylename .v-window-closebox {
    display: none;
}

You might also want to prevent the closing on server-side as well. You need to override Window.close() for that.