* @throws JSONException
* If the JSON serialization fails.
*/
public void write(UI ui, Writer writer, boolean repaintAll, boolean async)
throws IOException, JSONException {
VaadinSession session = ui.getSession();
// Purge pending access calls as they might produce additional changes
// to write out
session.getService().runPendingAccessTasks(session);
ArrayList<ClientConnector> dirtyVisibleConnectors = ui
.getConnectorTracker().getDirtyVisibleConnectors();
LegacyCommunicationManager manager = session.getCommunicationManager();
// Paints components
ConnectorTracker uiConnectorTracker = ui.getConnectorTracker();
getLogger().log(Level.FINE, "* Creating response to client");
getLogger().log(