From f4857530eed53c86bafb7b4855a23bd2524efd2c Mon Sep 17 00:00:00 2001 From: Andrey Tsarevskiy Date: Mon, 26 Aug 2013 18:48:14 +0400 Subject: [PATCH] clear repair --- pom.xml | 10 ++++++---- src/org/vaadin/notifique/Notifique.java | 14 +++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 12f7443..3a39e3a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.haulmont.thirdparty notifique jar - 1.1.0 + 1.1.2 Vaadin Notifique Addon @@ -48,16 +48,19 @@ com.vaadin vaadin-server ${vaadin.version} + provided com.vaadin vaadin-client-compiled ${vaadin.version} + provided com.vaadin vaadin-themes ${vaadin.version} + provided com.vaadin @@ -66,15 +69,14 @@ provided - org.vaadin.addons + com.haulmont.thirdparty animator - 1.7.3 + 1.7.4 javax.servlet servlet-api 2.4 - provided diff --git a/src/org/vaadin/notifique/Notifique.java b/src/org/vaadin/notifique/Notifique.java index dc1115a..400a190 100644 --- a/src/org/vaadin/notifique/Notifique.java +++ b/src/org/vaadin/notifique/Notifique.java @@ -1,6 +1,7 @@ package org.vaadin.notifique; import java.io.Serializable; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -318,8 +319,19 @@ public void layoutClick(LayoutClickEvent event) { */ public void clear() { synchronized (items) { + final LinkedList l = new LinkedList(); + + for (final Iterator i = css.getComponentIterator(); i.hasNext();) { + l.add(i.next()); + } + + for (final Iterator i = l.iterator(); i.hasNext();) { + Component component = i.next(); + if (component instanceof CssLayout) { + css.removeComponent(component); + } + } items.clear(); - root.setContent(null); } }