* @return <code>true</code> if the connector is visible to the client,
* <code>false</code> otherwise
*/
- static boolean isVisible(ClientConnector connector) {
+ public static boolean isVisible(ClientConnector connector) {
if (connector instanceof Component) {
return isVisible((Component) connector);
} else {
import java.util.logging.Logger;
import com.vaadin.terminal.AbstractClientConnector;
+import com.vaadin.terminal.gwt.server.AbstractCommunicationManager;
import com.vaadin.terminal.gwt.server.ClientConnector;
/**
/**
* Creates a new ConnectorTracker for the given uI. A tracker is always
- * attached to a uI and the uI cannot be changed during the lifetime of
- * a {@link ConnectorTracker}.
+ * attached to a uI and the uI cannot be changed during the lifetime of a
+ * {@link ConnectorTracker}.
*
* @param uI
* The uI to attach to. Cannot be null.
uninitializedConnectors.remove(connector);
diffStates.remove(connector);
iterator.remove();
+ } else if (!AbstractCommunicationManager.isVisible(connector)
+ && !uninitializedConnectors.contains(connector)) {
+ uninitializedConnectors.add(connector);
+ diffStates.remove(connector);
+ getLogger().fine(
+ "cleanConnectorMap removed state for "
+ + getConnectorAndParentInfo(connector)
+ + " as it is not visible");
}
}
*
* @param connector
* The connector to lookup
- * @return The uI the connector is attached to or null if it is not
- * attached to any uI.
+ * @return The uI the connector is attached to or null if it is not attached
+ * to any uI.
*/
private UI getUIForConnector(ClientConnector connector) {
if (connector == null) {