Example usage for com.vaadin.ui ConnectorTracker markAllConnectorsDirty

List of usage examples for com.vaadin.ui ConnectorTracker markAllConnectorsDirty

Introduction

In this page you can find the example usage for com.vaadin.ui ConnectorTracker markAllConnectorsDirty.

Prototype

public void markAllConnectorsDirty() 

Source Link

Document

Mark all connectors in this uI as dirty.

Usage

From source file:org.semanticsoft.vaaclipse.app.servlet.VaaclipseServerRpcHandler.java

License:Open Source License

private MethodInvocation parseInvocation(JSONArray invocationJson, MethodInvocation previousInvocation,
        ConnectorTracker connectorTracker, long lastSyncIdSeenByClient) throws JSONException {
    String connectorId = invocationJson.getString(0);
    String interfaceName = invocationJson.getString(1);
    String methodName = invocationJson.getString(2);

    if (connectorTracker.getConnector(connectorId) == null
            && !connectorId.equals(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID)) {

        if (!connectorTracker.connectorWasPresentAsRequestWasSent(connectorId, lastSyncIdSeenByClient)) {
            getLogger().log(Level.WARNING,
                    "RPC call to " + interfaceName + "." + methodName + " received for connector " + connectorId
                            + " but no such connector could be found. Resynchronizing client.");
            // This is likely an out of sync issue (client tries to update a
            // connector which is not present). Force resync.
            connectorTracker.markAllConnectorsDirty();
        }//from  www  . jav a2  s .c om
        return null;
    }

    JSONArray parametersJson = invocationJson.getJSONArray(3);

    if (LegacyChangeVariablesInvocation.isLegacyVariableChange(interfaceName, methodName)) {
        if (!(previousInvocation instanceof LegacyChangeVariablesInvocation)) {
            previousInvocation = null;
        }

        return parseLegacyChangeVariablesInvocation(connectorId, interfaceName, methodName,
                (LegacyChangeVariablesInvocation) previousInvocation, parametersJson, connectorTracker);
    } else {
        return parseServerRpcInvocation(connectorId, interfaceName, methodName, parametersJson,
                connectorTracker);
    }

}