All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jresearch.commons.gwt.app.client.module.AppLoadExceptionHandler Maven / Gradle / Ivy

package org.jresearch.commons.gwt.app.client.module;

import org.jresearch.commons.gwt.client.mvc.event.Bus;
import org.jresearch.commons.gwt.client.mvc.event.ErrorEvent;

import com.google.gwt.user.client.Command;
import com.sencha.gxt.data.shared.loader.LoadExceptionEvent;
import com.sencha.gxt.data.shared.loader.LoadExceptionEvent.LoadExceptionHandler;

public class AppLoadExceptionHandler implements LoadExceptionHandler {

	private Bus bus;

	public AppLoadExceptionHandler(Bus bus) {
		this.bus = bus;
	}

	@Override
	public void onLoadException(final LoadExceptionEvent le) {
		bus.fire(new ErrorEvent(le.getException(), new Command() {
			@Override
			public void execute() {
				le.getSource().load();
			}
		}));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy