New Extension Feature

I have been trying to implement the Refresher example of an extension in the Vaadin 7 wiki. When I initialize the refresher in my UI use the following code:

public void createRefresher() {
	refresher = new Refresher();
	refresher.extend(this);
	refresher.addListener(new RefreshListener() {
		public void refresh(Refresher source) {
			refreshData();
		}
	});
	refresher.setEnabled(true);
}

The line

refresher.extend(this)

throws a javascript exception in Chrome but not in Firefox or IE. The error is JavaScriptException:(TypeError): Cannot read property ‘style’ of null

The code seems to work for me in at least Chrome and Firefox as long as I also set a refresh interval using setInterval() when setting up the Refresher. Failing to do so will however cause exceptions in all browsers, so that doesn’t seem to be the same problem that you are having.

Could there be some undesired interaction with something else in the same UI? Another potential explanation is that there might be some problem with how you widgetset is compiled, e.g. if you have disabled compilation for some browsers to make the compilation faster and then forgotten to enable the other browsers before testing with them.

To get insights into the actual problem, the best approach would be to use GWT development mode so that you get a real Java stacktrace for the Exception instead of a JavaScript stracktrace just containing obfuscated names. The second best option would be to compile the widgetset with the -style PRETTY option (enabled by selecting Pretty in the Javascript style selection if using the Vaadin plugin for Eclipse) as the method names in the JavaScript stacktrace would then at least give some pointers to what might cause the exception.