GWT의 Remote Service를 직접 테스트하는 동안 자주 발생하지 않는 오류

916 단어 idegwt
Error Info:
The method onFailure(Throwable) of type new AsyncCallback(){} must override a superclass method
잘못된 코드:

image.addClickListener(new ClickListener() {
						public void onClick(Widget sender) {
							MyFirstService.Util.getInstance().sayHelloTo("shansun123", 
									new AsyncCallback<String>()
									{
										@Override
										public void onFailure(Throwable caught) {
											Window.alert(caught.getMessage());
										}
										@Override
										public void onSuccess(String result) {
											Window.alert("Return from MyRemoteService: " + result);
										}
									});
						}
					});

이 오류가 발생한 것은 Googlipse를 사용할 때 IDE가 자동으로 위의 코드를 생성하고 두 가지 방법 전에 @override 메타데이터를 추가했기 때문입니다.이 두 개의 메타데이터를 없애면 된다.

좋은 웹페이지 즐겨찾기