"Communication problem" client side override

I have overridden the “comErrMsg” using the standard method.

[b]

  1. setCommunicationErrorNotificationEnabled(false)
    [/b]
  • From the JavaDoc: “Enables or disables the notification. If disabled, the set URL (or current) is loaded directly.”

  • Does this mean that if setCommunicationErrorURL() is not set, that there is an attempt to reload the current URL?


2. client side behavior

  • Is there a way of overriding the client side behavior?

  • I could hack the BooStrap code, but I would hate to do so since I update Vaadin with each new release.

  • I would prefer a method that sets client side JavaScript code that gets executed, message.setCommunicationJavascriptCallbackMethod(“…”);

Thank you,
Malcolm

Hi Malcolm,

  1. Yes, if the notification is disabled and the URL is not set, the current page is reloaded.

  2. On the client side you can set a custom handler using ApplicationConnection.setCommunicationErrorDelegate(). The easiest way to do this is probably to write a small UI Extension and set the handler in your extension connector’s extend() method - the ApplicationConnection instance is available via getConnection(). Note that this will not catch other system messages like session expired.