검색 이벤트의 위킷 응용 프로그램에서는 결과를 긴 데이터로 표시하는 데 몇 초 및 때로는 몇 분이 걸립니다. 데이터를 데이터베이스에서 가져 오는 동안 프리 로더를 표시하여 검색을 클릭 할 때 어떤 일이 일어나고 있음을 사용자에게 알려주고 싶습니다. 나는 개찰구 응용 프로그램에 매우 익숙하지 않다. 아주 깊이 이해할 수는 없지만 AjaxLazyPreloader를 찾겠다.하지만 검색 방법이 호출 될 때 프리 로더를 보여주고 싶다. ... SearchSubmit 메서드를 공유하고있다. ... SearchSubmit 메서드를 공유하고있다. ... SearchSubmit 메서드를 공유하고있다 ...Wicket 응용 프로그램의 프리 로더
private void processSearchSubmit(AjaxRequestTarget ajaxRequestTarget) {
ajaxRequestTarget.add(tableHolder);
ajaxRequestTarget.add(productTableHolder);
if (zipcode == null) {
ajaxRequestTarget
.appendJavaScript("$().toastmessage('showWarningToast','Please enter a zipcode')");
} else if (!ZipCodeValidator.isValid(zipcode)) {
useZones = true;
currentZone = zipcode;
ajaxRequestTarget.add(tableHolder);
if (searchProduct != null) {
ajaxRequestTarget.add(productTableHolder);
if (lstProduct.getList().size() == 0) {
ajaxRequestTarget
.appendJavaScript("$().toastmessage('showErrorToast','Sorry! This product is not avialable .')");
}
}
} else if (lstMerchants.getList().size() == 0) {
ajaxRequestTarget
.appendJavaScript("$().toastmessage('showWarningToast','Sorry! There are currently no services')");
}
if (ZipCodeValidator.isValid(zipcode)) {
ajaxRequestTarget.add(tableHolder);
if (searchProduct != null && !searchProduct.equals("")) {
ajaxRequestTarget.add(productTableHolder);
if (lstProduct.getList().size() == 0) {
ajaxRequestTarget
.appendJavaScript("$().toastmessage('showErrorToast','Sorry! This product is not avialable in this zip code or zone.')");
}
}
}
}
결과 데이터를 가져올 때까지이 메서드가 호출 될 때 프리 로더 또는 회 전자를 표시해야합니다. 아무도 그 방법을 제안 할 수 있습니까?
어쩌면 중복하지만 매우 밀접하게 관련이 없습니다 : http://stackoverflow.com/questions/15337198/wicket-calling-a-lengthy-operation-and-updating-through-ajax/15338934 – Nicktar
@Nicktar 당신은 절대적이다 그것이 그 문제와 관련이있다. 내가 질문을 게시 한 후 그 링크를 찾았 어. 어쨌든 내 대답을 찾았 어. 고마워. – Ruby