With the Vaadin 7 extension mechanism, I would like to subclass the Refresher component to allow it to handle client-side communication issues with a custom behavior. I had to fork the Vaadin 6 version of refresher to achieve this, but it occurs to me that it would be easy for me to do what I want with the new architecture if the RefresherExtension "extension" instance variable was declared protected or had an accessor for subclasses of RefresherConnector.
The reason I wish to do this is actually pretty common. If you have a refresher going and the browser loses connectivity to the server, Vaadin throws the red error box up on the screen. Since the poller keeps going and fires another communication attempt at the server, another red error box is thrown into the DOM. Over time, this becomes a bit of a denial-of-service to the browser, since DOM elements pile up over time based on the refresher interval. My fix was to require an "ack" back from the server on each poller interval, and if the ack is not received, a quick removal of the red error box through the DOM is performed, which has the effect of removing the memory leak, but also removing the problem from the user's view.
It's debatable whether this is a good idea, but basically the end effect is similar to how gmail works when it can't reach it's server, where it says "trying again in 30s..." and then sort of heals itself once it can start talking to the server again.
Hope this makes sense; should be an easy change to RefresherExtension to achieve what I would like to do.
With the Vaadin 7 extension mechanism, I would like to subclass the Refresher component to allow it to handle client-side communication issues with a custom behavior. I had to fork the Vaadin 6 version of refresher to achieve this, but it occurs to me that it would be easy for me to do what I want with the new architecture if the RefresherExtension "extension" instance variable was declared protected or had an accessor for subclasses of RefresherConnector.
The reason I wish to do this is actually pretty common. If you have a refresher going and the browser loses connectivity to the server, Vaadin throws the red error box up on the screen. Since the poller keeps going and fires another communication attempt at the server, another red error box is thrown into the DOM. Over time, this becomes a bit of a denial-of-service to the browser, since DOM elements pile up over time based on the refresher interval. My fix was to require an "ack" back from the server on each poller interval, and if the ack is not received, a quick removal of the red error box through the DOM is performed, which has the effect of removing the memory leak, but also removing the problem from the user's view.
It's debatable whether this is a good idea, but basically the end effect is similar to how gmail works when it can't reach it's server, where it says "trying again in 30s..." and then sort of heals itself once it can start talking to the server again.
Hope this makes sense; should be an easy change to RefresherExtension to achieve what I would like to do.