diff options
Diffstat (limited to 'server/src/com/vaadin/ui/ConnectorTracker.java')
-rw-r--r-- | server/src/com/vaadin/ui/ConnectorTracker.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index a229003224..7d741e1b28 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -17,6 +17,7 @@ package com.vaadin.ui; import java.io.IOException; import java.io.Serializable; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -463,6 +464,22 @@ public class ConnectorTracker implements Serializable { return dirtyConnectors; } + /** + * Returns a collection of those {@link #getDirtyConnectors() dirty + * connectors} that are actually visible to the client. + * + * @return A list of dirty and visible connectors. + */ + public ArrayList<ClientConnector> getDirtyVisibleConnectors() { + ArrayList<ClientConnector> dirtyConnectors = new ArrayList<ClientConnector>(); + for (ClientConnector c : getDirtyConnectors()) { + if (AbstractCommunicationManager.isConnectorVisibleToClient(c)) { + dirtyConnectors.add(c); + } + } + return dirtyConnectors; + } + public JSONObject getDiffState(ClientConnector connector) { assert getConnector(connector.getConnectorId()) == connector; return diffStates.get(connector); |