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

eu.future.earth.gwt.client.date.AddCallBackHandler Maven / Gradle / Ivy

There is a newer version: 3.3
Show newest version
package eu.future.earth.gwt.client.date;

import com.google.gwt.user.client.rpc.AsyncCallback;

import eu.future.earth.gwt.client.date.DateEvent.DateEventActions;

public class AddCallBackHandler implements AsyncCallback {

	private DatePanel view = null;

	private T data = null;

	public AddCallBackHandler(DatePanel view, T theData) {
		super();
		this.view = view;
		data = theData;
	}

	public T getData() {
		return data;
	}

	public DatePanel getView() {
		return view;
	}

	public void sendFailureEvent() {
		view.notifyReady(DateEventActions.ADD_FAILED, data, false);
	}

	public void onFailure(Throwable caught) {
		sendFailureEvent();
	}

	public void onSuccess(T result) {
		view.notifyReady(DateEventActions.ADD_DONE, result, false);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy