Getting the window a component is in

In Vaadin 6, we just called getWindow() to get the Window a component resides in.

In Vaadin 7, do I want to do this instead? UI.getCurrent().findAncestor(WIndow.class)

I have these in many places during my port, and don’t want to change them (since I can’t yet test) if that’s not the new correct way. Thanks!

For any AbstractComponent c,
c.findAncestor(Window.class)