List of usage examples for com.google.gwt.user.client HTTPRequest asyncGet
public static boolean asyncGet(String url, ResponseTextHandler handler)
From source file:com.dimdim.conference.ui.json.client.JSONurlReader.java
License:Open Source License
public void doReadURL() { /*/*from w w w .ja va 2 s .c o m*/ */ // //Window.alert("Trying to read::"+url); // if (handler == null) // { // handler = new JSONurlReaderResponseTextHandler(); // } if (handler != null) { JSONurlReader.busy = true; try { if (!HTTPRequest.asyncGet(url + "&confKey=" + confKey + "&cflag=" + (getClientGUID()), handler)) { //Window.alert("HTTPRequest.asyncGet failed"); // The call failed to issue. Trigger the callback immediately. JSONurlReader.busy = false; // UIServerResponse ret = new UIServerResponse(); // ret.setSuccess(false); // if (callback != null) // { // callback.urlReadingComplete(ret); // } } } catch (Exception e) { // Window.alert(e.getMessage()); JSONurlReader.busy = false; JSONurlReader.errorCount++; } } }
From source file:com.dimdim.ui.common.client.json.JSONReturnUrlReader.java
License:Open Source License
public boolean doReadURL() { boolean b = true; if (handler != null) { JSONReturnUrlReader.busy = true; try {/*from w w w. jav a2 s .c o m*/ if (!HTTPRequest.asyncGet(url + "&cflag=" + (getClientGUID()), handler)) { b = false; } } catch (Exception e) { JSONReturnUrlReader.errorCount++; b = false; } JSONReturnUrlReader.busy = false; JSONReturnUrlReader.errorCount = 0; } return b; }
From source file:com.dimdim.ui.common.client.json.JSONurlReader.java
License:Open Source License
public boolean doReadURL() { boolean b = true; if (handler != null) { JSONurlReader.busy = true;//from www. jav a 2 s .co m try { if (!HTTPRequest.asyncGet(url + "&cflag=" + (getClientGUID()), handler)) { b = false; } } catch (Exception e) { JSONurlReader.errorCount++; b = false; } JSONurlReader.busy = false; } return b; }
From source file:net.skyesoft.nhs.dka.client.SinkList.java
License:Apache License
public void addPreviousDataLoader() { loadDataTable.setBorderWidth(2);/*from w w w. jav a 2 s . c o m*/ loadDataTable.setStyleName("previousDataLoader"); loadDataTable.setText(0, 0, "Load previous study:"); loadDataTable.setWidget(2, 0, lbStudyNos); loadDataTable.setWidget(4, 0, loadButton); list.add(loadDataTable); HTTPRequest.asyncGet(Defines.FORM_HANDLER + "?mode=getstudynos&TableName=generalinfo", new PreviousDataLoader()); lbStudyNos.setTitle("Load previous study"); loadButton.addClickListener(new PreviousDataDisplayer()); }
From source file:org.gwm.splice.client.service.GenericRemoteService.java
License:Apache License
public void doGet(String targetUri, IResponseHandler responseHandler, boolean raw) { String realUrl = null;/* w w w . j a v a 2 s.co m*/ if (!GWT.isScript()) { // if running in hosted mode, we need to send request to proxy servlet, // encoding the "real" target url in the "targeturl" parameter (which needs to be encoded) realUrl = GWT.getModuleBaseURL() + "/proxy?targeturl=" + encodeUrl(hostedModeTargetBaseUrl + "/" + targetUri); } else { realUrl = buildFullUrl(targetUri); } // DesktopManager.getInstance().getLogger().logInfo(realUrl); HTTPRequest.asyncGet(realUrl, new ServiceResponseHandler(responseHandler, raw)); }