Change Stylesheet depending on device
Hey, it ist possible to change the css in GWT depending which device the User has? f.e. if the User call my WebApp with chrome I want to load myWebapp.css when the User load from a website I want to remove myWebapp.css and replace it with myWebappMobile,css. I'm looking for something simular to replace-with /replace-with in gwt.xml but I found this only for java classes. Does any one know a good solution for this ? Thanks in advance -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT Cell tree refresh issue
On Tuesday, September 3, 2013 11:30:27 AM UTC+2, Harish Alwala wrote: Thanks for reply, Here I am attaching 3 classes. MyNode.java This is a bean class that holds the data to display in the tree MyTreeView.java Here we build the tree and add the nodes to the tree. First time when I build the treeView with data it invokes buildTree() where I call CellTree() constructor with MyViewModel as parameter, that will invoke getNodeInfo() (overidden method) of MyViewModel class. This is how I could able to see the data in tree view. But when I try to add a new child to the tree, I call the same flow, but it doesnot invoke the getNodeInfo() of the MyViewModel class. Hence I dont see the updated tree. What do you mean by I call the same flow ? To update your tree, the NodeInfo has to call updateRowData/updateRowCount on the HasData passed to it. With a DefaultNodeInfo, you'd have to call updateRowData/updateRowCount of your AbstractDataProvider. With a ListDataProvider, this is done by modifying the list returned by the ListDataProvider's getList(); in case you modified the underlying list (in your case, not possible as you copy it into a new ArrayList) then you can call the ListDataProvider's refresh(), but as the javadoc tells you, you should prefer getList(). Think about a CellTree as if it was made of nested CellLists (that's more or less the case), each one's data being provided by the NodeInfo. You have to work with your tree of NodeInfo nodes or their ListDataProvider to update the tree. The way I do it is I keep a MapMyNode, ListDataProviderMyNode, and update the tree through the MyViewModel with methods like add(MyNode parent, MyNode child). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GeoChart not working in GWT application
I don't know how to fix the problem you're facing, but if I understand correctly, you're wrapping the JS API. Have you considered using any of the two already available wrappers for GWT?: https://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted (official project from google) https://code.google.com/p/gwt-charts/ (unofficial but apparently more up-to-date with the JS API) I use the first one successfully with only a few JSNI snippets of code. I've never used the GeoChart, but both wrappers above claim to support it. On Friday, August 30, 2013 10:07:49 AM UTC-4, Marian M. wrote: Hi all, I'm working at an application made with gwt.. and I just integrated some charts with GWT Visualization api from google. Most of the charts have wrappers to implement those available in JS also in GWT. So, I made a wrapper for GeoChart chart.. and I got an error every time I try to instantiate this chart. Rest of the charts work perfectly. This is the error: 16:51:10.322 [ERROR] [reporting] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError) @com.qfp.reporting.charts.wrappers.GeoChart::createJso(Lcom/google/gwt/dom/client/Element;)([JavaScript object(3951)]): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.qfp.reporting.charts.wrappers.GeoChart.createJso(GeoChart.java) at com.google.gwt.visualization.client.visualizations.Visualization.init(Visualization.java:65) at com.google.gwt.visualization.client.visualizations.Visualization.init(Visualization.java:71) at com.google.gwt.visualization.client.visualizations.corechart.CoreChart.init(CoreChart.java:69) at com.qfp.reporting.charts.wrappers.GeoChart.init(GeoChart.java:74) at com.qfp.reporting.client.WidgetEditor$28.run(WidgetEditor.java:711) at com.google.gwt.ajaxloader.client.ExceptionHelper.runProtected(ExceptionHelper.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:662) I've debugged the application line by line and still can't figure what's the problem. In my chart wrapper I have the method createJso() implemented as a native method. In the superclasses of my class respectively, CoreChart and Visualization, I also have the method, only difference is that in Visualization superclass the createJso method is declarated as abstract. I really can't seem to find what's the problem. For the other charts everything works well. This is the part of the code that generates the error. public Visualization() { Element div = DOM.createDiv(); --jso = createJso(div); -- setElement(div); setStyleName(gwt-viz-container); } public Visualization(AbstractDataTable data, OptionsType options) { this(); this.options = options; this.dataTable = data; } Thank you, Marian -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: IE10 support in Gwt
Looks like your hover should be on the a element? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT In Eclipse Debug Mode All Of A Sudden is Super Slow
Also, for the beginners, you might have to set the log level to 'info' in the run configurations of the GWT. This is another reason why the debug on the GWT takes so long, initially when you run the application it will be set to 'All'. On Wednesday, July 3, 2013 10:14:10 AM UTC-5, Carl wrote: Breakpoints! That's it. I've had on and off slow performance when debugging my GWT app. Removing all breakpoints snapped performance right back to normal! excellent! thanks for posting. On Friday, 30 November 2012 12:30:39 UTC, hummh wrote: I had the same problem. There was a breakpoint at Command.execute() that resulted in long waiting times (minutes) running my web application in dev mode. Removing all the breakpoints helped. Thanks for the hint! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT In Eclipse Debug Mode All Of A Sudden is Super Slow
Also see http://code.google.com/p/google-web-toolkit/issues/detail?id=5261 You have to delete some temp files too. 2013/9/4 SaiP saisri@gmail.com Also, for the beginners, you might have to set the log level to 'info' in the run configurations of the GWT. This is another reason why the debug on the GWT takes so long, initially when you run the application it will be set to 'All'. On Wednesday, July 3, 2013 10:14:10 AM UTC-5, Carl wrote: Breakpoints! That's it. I've had on and off slow performance when debugging my GWT app. Removing all breakpoints snapped performance right back to normal! excellent! thanks for posting. On Friday, 30 November 2012 12:30:39 UTC, hummh wrote: I had the same problem. There was a breakpoint at Command.execute() that resulted in long waiting times (minutes) running my web application in dev mode. Removing all the breakpoints helped. Thanks for the hint! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
ServletContextEventHandler and static block
Hi all, Both ServletContextEventHandler and static block have high startup priority. In usage, what is the difference? What should be put in the SC event handler and the static block? Thanks Ming -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Blog article on using Canvas and GWT to create a client side image crop tool
I created this article because I couldn't find a similar article when I built the solution: http://lithosphere.lithium.com/t5/tech-blog/Lithium-Engineering-Using-GWT-and-HTML-5-Canvas-for-online/ba-p/100833 Full code is provided for anyone that wants to play around with the solution. -Dave -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Call REST service from GWT App's client side
Hi everyone! Please, help me figure out how can I manage to call the external REST service from GWT application's client code. I've heard, that GWT has a RequstBuilder class in order to do such things, but suddenly I figured out that this is a quite ancient approach to implement. Hence, the following code won't work: RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, http://localhost:1/hello;); builder.setHeader(content-type, text/html;charset=windows-1251); builder.setHeader(Access-Control-Allow-Origin, *);//*result doesn not depend on this line of code* try { Request response = builder.sendRequest(, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { answerFromRest.setText(request.toString() + \n); answerFromRest.setText(response.toString() + \n); int statusCode = response.getStatusCode(); if(statusCode == Response.SC_OK) { String responseBody = response.getText(); answerFromRest.setText(The result is + responseBody); } else { answerFromRest.setText(There was an error + statusCode + = + response.getText()); } } @Override public void onError(Request request, Throwable exception) { //error actually sending the request, never got sent } }); } catch (RequestException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } * * * * *statusCode *always equals 0 though when I access my depolyed REST through a WebBrowser, I get the result. This makes me feel like there is really no more support for that code in GWT... So, the question is - is there the other (working) way to call REST writing code in java ( I mean w/o using JSNI code to do that ). Any way, whatever approach is ( if it exists in GWT's nowadays ), can you please provide either _code_ or _decent link with tutor or smth like that_ ? Thank you very much, for the time spent on my subject * * -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: [gwt-contrib] gwt.junit.testcase.includes broken?
Hi, my guess is that it's just an oversight; at Google we have our own build stystem so we don't use the ant scripts all that often. If you want to dive in, I'd be interested in what you find. - Brian On Sat, Aug 31, 2013 at 2:33 PM, Daniel Trebbien dtrebb...@gmail.comwrote: Hi, I am trying to run only the I18NSuite tests in user/test/com/google/gwt/i18n/I18NSuite.java but I am finding that gwt.junit.testcase.includes is no longer working. This used to work: ant -Demma.enabled=false '-Dgwt.junit.testcase.includes=**/I18NSuite.class' test but now this runs all of the tests instead of just the tests in I18NSuite. I also tried adapting the command line mentioned in the thread How to run a single test ?https://groups.google.com/d/topic/google-web-toolkit-contributors/RSPG_158Y6c/discussion, but all of the tests for the user subproject are still run. Was support for gwt.junit.testcase.includes removed? Daniel -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.