response.getStatusCode()
I'm following https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideHttpRequests I have String url = http://.../index.php;; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url)); try { Request request = builder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { // Couldn't connect to server (could be timeout, SOP violation, etc.) } @Override public void onResponseReceived(Request request, Response response) { Window.alert(getStatusCode: + response.getStatusCode()); if (200 == response.getStatusCode()) { // Process the response in // response.getText() Window.alert(RESPONSE: + response.getText()); } else { // Handle the error. Can get the status // text from response.getStatusText() Window.alert(OTHER STATUS: + response.getStatusText()); } } }); } catch (RequestException e) { // Couldn't connect to server } I get an alert box from the above code getStatusCode:0 although my Apache2 access logs has code 200 when this code is hit. (And then OTHER STATUS: with empty status text). A comment in stackoverflow says, We've found a status code of 0 usually means the user navigated to a different page before the AJAX call completed. Going directly to the URL in a browser returns a test JSON string [{symbol:ABC,price:40.485578668179,change:-0.53944918844604}, {symbol:DEF,price:1.3606576154209,change:0.0051755221198266}] Please advise. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: response.getStatusCode()
SOLVED I assume this is due to the Same Origin Policy. When I put the compiled GWT code on the production server, which is the same URL in my question below, it works fine. I had been testing this code locally (on the development server), but making a URL request to the remote server (the production server). I suppose I would have to truly mirror development and production environments to test locally on the development server to not see this error, and still use GWT debugging, rather than only testing compiled code. On Mon, Sep 10, 2012 at 2:13 PM, Dee Ayy dee@gmail.com wrote: I'm following https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideHttpRequests I have String url = http://.../index.php;; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url)); try { Request request = builder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { // Couldn't connect to server (could be timeout, SOP violation, etc.) } @Override public void onResponseReceived(Request request, Response response) { Window.alert(getStatusCode: + response.getStatusCode()); if (200 == response.getStatusCode()) { // Process the response in // response.getText() Window.alert(RESPONSE: + response.getText()); } else { // Handle the error. Can get the status // text from response.getStatusText() Window.alert(OTHER STATUS: + response.getStatusText()); } } }); } catch (RequestException e) { // Couldn't connect to server } I get an alert box from the above code getStatusCode:0 although my Apache2 access logs has code 200 when this code is hit. (And then OTHER STATUS: with empty status text). A comment in stackoverflow says, We've found a status code of 0 usually means the user navigated to a different page before the AJAX call completed. Going directly to the URL in a browser returns a test JSON string [{symbol:ABC,price:40.485578668179,change:-0.53944918844604}, {symbol:DEF,price:1.3606576154209,change:0.0051755221198266}] Please advise. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: any chance to get FF15 dev plugin
Does the KeyPressHandler work for you in FF 15? I'm using OSX Snow Leopard, but does it work for you anyway? https://developers.google.com/web-toolkit/tools/gwtdesigner/tutorials/stockwatcher#event_handlers newSymbolTextBox.addKeyPressHandler(new KeyPressHandler() { public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER){ addStock(); } } }); Also noticed that the text box does not have focus, yet: newSymbolTextBox.setFocus(true); On Fri, Aug 31, 2012 at 7:56 PM, Juan Pablo Gardella gardellajuanpa...@gmail.com wrote: Thanks Brian!! 2012/8/31 Brian Slesinsky skybr...@google.com The missing plugin page is updated now. http://gwt.google.com/missing-plugin/MissingPlugin.html On Friday, August 31, 2012 10:18:48 AM UTC-7, Brian Slesinsky wrote: This is live at: https://dl-ssl.google.com/gwt/plugins/firefox/gwt-dev-plugin.xpi I still need to update the missing plugin page. On Thursday, August 30, 2012 5:20:37 PM UTC-7, Brian Slesinsky wrote: Thanks everyone. Our release process is surprisingly cumbersome, but it should be up soon. - Brian -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/5ySdoW3bhXYJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Run As Web Application acts like Debug As Web Application
On Fri, Mar 30, 2012 at 4:47 AM, Thomas Broyer t.bro...@gmail.com wrote: First, you might want to ask in the https://groups.google.com/forum/#!forum/google-plugin-eclipse group for questions related to the Google Plugin for Eclipse. Didn't even know there was one. How do I get Production Mode? That's the GWT Compile menu item (with the red toolbox icon). You'll find it either in the Google button-menu in the toolbar (blue circle with a blank g in it) or when right-clicking on your project within the Google submenu. Perfect, thanks. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Run As Web Application acts like Debug As Web Application
Tried the simple https://developers.google.com/eclipse/docs/getting_started in Safari 5.1.4 and Firefox 11.0 on OSX Snow Leopard 10.6.8 using Eclipse Indigo Classic 3.7.2. Both tell me: Development Mode requires the Google Web Toolkit Developer Plugin How do I get Production Mode? Maybe my problem is that I think Debug As means Development Mode run and Run As means Production Mode run? This is a brand new install of Indigo and GWT. Although I installed: http://dl.google.com/eclipse/inst/d2gwt/latest/3.7 expecting the full version rather than the lightweight version of GWT Designer; and http://dl.google.com/eclipse/plugin/3.7 selecting only the SDK (no AppEngine) and the Plugin -- ALTHOUGH I STILL SEE AppEngine files! Regards. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Deploying GWT application on a web server
I just found out GWT Designer is now free from Google and am taking another look at GWT. On Eclipse 3.5 Galileo, I've installed via Install New Software, GWT Plugin (Plugin; SDK's), and GWT Designer (GWT Designer; GWT Designer Editor; Infrastructure) -- all the items. Following the GWT Designer Quick Start http://code.google.com/webtoolkit/tools/gwtdesigner/quick_start.html I just want to deploy the Click me! project generated from the wizard to a regular Apache Web Server -- not to a Java Web Application Server. As I understand, I can use any server back end, and this particular hello world type project does not need a back end anyway. Do I just copy the war directory to my web server and launch ImageViewer.html? Is this an expanded web application archive? I suppose I need to Compile GWT Aplication which added com.mycompany.project.ImageViewer to the /war directory because it did not work without it. With com.mycompany.project.ImageViewer, it works when I point my browser to the file, I didn't host it on an actual web server. It seems a bit large for hello world, 3.2 MB, but it did say, Compiling 6 permutations, which I assume is for 6 browser quirk permutations, which I now benefit from not having to worry about? Before all this, I noticed I'm missing right-click on MyProject | Google Web Toolkit | Deploy module http://code.google.com/webtoolkit/tools/gwtdesigner/features/gwt/module_deployment.html Need I be concerned? I only have GWT module, GWT library, and GWT remote service in that menu. My Eclipse is running on a Mac OS X Snow Leopard, and the Finish button was intermittently grayed out while trying to accept the agreements to install the software. I intend to get some AJAX going and I'm not sure if I'll use a Java Web Application Server (I'm afraid of Oracle). Am I having any false starts here? Anything I'll need to worry about down the road? Regards. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.