Reconnect dialog behavior on 7.6

First of all, thanks for the new release!

I upgraded to 7.6 a few days ago. The reconnect dialogs seems to work, but differently to how it behaved before. On a 503 e.g. I redirected to my status page, which is now trying to recover and might end up with a session expired which I want to avoid.

On you mention that you can completely replace the DefaultReconnectDialog.

Looking at the code, I’d actually like to change the behavior of DefaultConnectionStateHandler.heartbeatInvalidStatusCode() so I can redirect again to my status page.

Is there a way to do this in 7.6?


The logic is handled by com.vaadin.client.communication.ConnectionStateHandler and by default by the DefaultConnectionStateHandler implementation. You can replace the ConnectionStateHandler using GWT binding, in your widgetset.gwt.xml:

<replace-with class="com.example.MyConnectionStateHandler"> <when-type-is class="com.vaadin.client.communication.ConnectionStateHandler" /> </replace-with> MyConnectionStateHandler can either implement ConnectionStateHandler, if you want to completely customize how errors are handled, or extend DefaultConnectionStateHandler and just override e.g. heartbeatInvalidStatusCode and/or xhrInvalidStatusCode to customize how certain error codes are handled.

Awesome, exactly what I was looking for! Thanks a lot!