Hello, I’m wondering if there’s any way to disable the “X” from the corner of certain windows.
not that I know anything… but could this be done with css?
Yes, CSS is currently the only way to hide it.
.i-window-closebox {
display: none;
}
Well, that hides the box from all child windows, so you’ll have to add a style name for your window and use that in the rule.
And of course, if being able to close the window is a security issue (such as bypassing a login box), just hiding the box with CSS is not enough.
Thanks for the reply.
No it’s not a security issue. Just making things little easier and that CSS code did the trick
You can circumvent the security hole by overriding Window.close() with an empty method.
[code]
import com.itmill.toolkit.ui.Window;
public class PermanentWindow extends Window {
protected void close() {
}
}
[/code]This way the window cannot be closed even with a forged HTTP-request.
-Jouni
I am using vaadin 6.8 and the css method does not work.
My entire css file is like this:
@import url(…/reindeer/styles.css);
.ess-label-big {
font-size: 14px;
line-height: normal;
}
.i-window-closebox {
display: none;
}
The label text font size change works. But the “x” on upper right corner of windows did not disappear.