public WindowState getState() {
return (WindowState) super.getState();
}
+
+ @Override
+ protected WindowState createState() {
+ return GWT.create(WindowState.class);
+ }
}
}
- private Iterable<Component> getChildComponents(HasComponents cc) {
- if (cc instanceof Panel) {
+ public static Iterable<Component> getChildComponents(HasComponents cc) {
+ if (cc instanceof Root) {
+ Root root = (Root) cc;
+ List<Component> children = new ArrayList<Component>();
+ if (root.getContent() != null) {
+ children.add(root.getContent());
+ }
+ for (Window w : root.getWindows()) {
+ children.add(w);
+ }
+ return children;
+ } else if (cc instanceof Panel) {
// This is so wrong.. (#2924)
if (((Panel) cc).getContent() == null) {
return Collections.emptyList();
import com.vaadin.terminal.Paintable.RepaintRequestEvent;
import com.vaadin.terminal.Paintable.RepaintRequestListener;
+import com.vaadin.terminal.gwt.server.AbstractCommunicationManager;
import com.vaadin.terminal.gwt.server.ClientConnector;
/**
markDirty(c);
if (c instanceof HasComponents) {
HasComponents container = (HasComponents) c;
- for (Component child : container) {
+ for (Component child : AbstractCommunicationManager
+ .getChildComponents(container)) {
markComponentsDirtyRecursively(child);
}
}
*/
@Override
public void attach() {
+ getRoot().componentAttached(this);
// can't call parent here as this is Panels hierarchy is a hack
requestRepaint();
if (content != null) {
if (content != null) {
content.detach();
}
+ getRoot().componentDetached(this);
}
/**