Null pointer
Hi I try to connect to my database with GWT RPC. But i get a error. Help please Thks java.lang.NullPointerException at org.etude.gwt.server.DatabaseServiceImpl.saveData(DatabaseServiceImpl.java: 37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 569) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) package org.etude.gwt.server; import java.net.URLDecoder; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.Statement; import java.util.Map; import org.etude.gwt.client.DatabaseService; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class DatabaseServiceImpl extends RemoteServiceServlet implements DatabaseService { /** * */ private static final long serialVersionUID = 1L; @SuppressWarnings(rawtypes) @Override public void saveData(Map formData) throws IllegalArgumentException { try{ Class.forName(com.mysql.jdbc.Driver); Connection conn = DriverManager.getConnection(jdbc:mysql:// localhost:3306/oracle, root, ); Statement st = conn.createStatement(); //avec décodage StringBuffer sqlQuery = new StringBuffer(insert into gwtusers(username,password,email,phone)); sqlQuery.append(values(?,?,?,?)); PreparedStatement stmt = conn.prepareStatement(sqlQuery.toString()); LINE 37 stmt.setString(1,URLDecoder.decode(formData.get(username).toString(),UTF-8)); stmt.setString(2,URLDecoder.decode(formData.get(password).toString(),UTF-8)); stmt.setString(3,URLDecoder.decode(formData.get(email).toString(),UTF-8)); stmt.setString(4,URLDecoder.decode(formData.get(phone).toString(),UTF-8)); stmt.execute(); //sans décodage st.executeQuery(insert into gwtusers values ('+formData.get(username).toString()+ ','+formData.get(password).toString()+ ','+formData.get(email).toString()+ ','+formData.get(phone).toString()+')); conn.close(); //stmt.close(); //st.close(); }catch(Exception e){ e.printStackTrace(); } } } -- 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
Re: GWT (lazy) Widget rendering: Comparison of approaches
I have written a blog post about this issue. See: http://zoomblab.blogspot.com/2010/10/creating-custom-lazily-rendered-gwt.html -- 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: GWT (lazy) Widget rendering: Comparison of approaches
On Wednesday, May 16, 2012 4:03:40 PM UTC+2, Chris Lercher wrote: There are several competing (or complemental) new/experimental (or deprecated) classes around, which deal with rendering Widgets in alternative (often lazy) ways in GWT: - GXT2's lazy Componenthttp://grepcode.com/file/repo1.maven.org/maven2/com.extjs/gxt/2.2.0/com/extjs/gxt/ui/client/widget/Component.java (which has been deprecated in GXT3) - LazyPanelhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/LazyPanel.html - PotentialElementhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/PotentialElement.html [experimental] - IsRenderablehttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/IsRenderable.html [very experimental] and RenderablePanelhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/RenderablePanel.html [experimental] Seeing how GXT2 had problems with their lazy rendering, what can we expect from these concepts? Looking into trunk, IsRenderable seems to evolve (using a new RenderableStamper class), so there's probably something in the pipeline... I know, that this is not a concrete question - I'm just curious if someone has interesting information about this subject? AFAICT, PotentialElement and IsRenderable are to speed-up rendering of widgets, particularly when used within an HTMLPanel or RenderablePanel in a UiBinder template: the widget is rendered to SafeHtml (and stamped), concatenated to the HTML of the containing HTMLPanel and rendered as a single big HTML string, then the stamped element is retrieved out of the HTMLPanel and the widget is attached to it (claimElement) and finally logically attached to the HTMLPanel (as its parent widget). I suppose they could also be used to attach widgets to some HTML generated (pre-rendered) on the server-side (similar to Closure's decorate(), and the various static wrap() methods used in basic GWT widgets; there's no notion of canDecorate() as in Closure though, so it'd be your responsibility to build this into your widgets; not really for reusable widgets, more for applications you control from end-to-end). -- 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/-/KcnUx7up1MsJ. 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.
Unable to install GWT in Eclipse(Helios)
Hi, I am new to GWT. While installing GWT in Eclipse I am getting a below error. An error occurred while collecting items to be installed session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Unable to read repository at http://dl.google.com/eclipse/plugin/core/3.6/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205091048-rel-r36.jar. Please help me out to resolve this error. Thnks -- 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.
user session log module/plugin for GWT
Hello, I'm looking for a tool that would allow me to log user sessions with exact interactions and activity flows (or something that would allow my to conclude) in large GWT application. The problem is that it was written in such a way that there's only a single URL invoked once after logging in. Do any modules/plugin for GWT exist that would output the user interaction to some kind of a log? Kind regards, Cyryl -- 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/-/0-5x5PQoJ3YJ. 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.
GWT Browser Dev-Plugin
Hi All, I get an error 404 while downloading GWT Dev Plugin for IE9. (https:// dl-ssl.google.com/tag/s/appguid%3D%7B9a5e649a- ec63-4c7d-99bf-75adb345e7e5%7D%26lang%3Den%26appname%3DGWT %2520Developer%2520Plugin%2520for%2520IE%2520%2528x86%2529%26needsadmin %3Dfalse/gwt/plugins/ie/GwtDevPluginSetup.exe) 404. That’s an error. The requested URL /tag/s/appguid%3D%7B9a5e649a- ec63-4c7d-99bf-75adb345e7e5%7D%26lang%3Den%26appname%3DGWT %2520Developer%2520Plugin%2520for%2520IE%2520%2528x86%2529%26needsadmin %3Dfalse/gwt/plugins/ie/GwtDevPluginSetup.exe was not found on this server. That’s all we know. Thank u very much for your help! Fabio -- 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.
couldn't load panel till resize
Hey, I'm a newbie in GWT, I'm developing an application about displaying charts. After loading the page, I have to resize the panel manually to get my chart loaded. (Because I activated Resizable option resize = new Resizable(panel); resize.setMinHeight(400); resize.setMinWidth(400); ) I do need your help, any suggestion would help me. Thank you -- 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: Is this a bug in RequestFactory when a collection has a null? Resolver.class ...
As you know from the bug report you linked to this bug has been marked as fixed, not released. Posting a new comment on a bug that has been closed is not very helpful -- it only distracts busy developers from fixing actual bugs. Wait for the fix to be released in the next version of GWT then check that it solves your bug. -- 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/-/KG_oD5UjlCgJ. 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.
GWT + Hibernate + MySQL inside Eclipse
Our Hibernate setup works fine in non-GWT projects. I'm using Eclipse Indigo, Google Suite Plugin 2.5, Google GWT Designer 2.4.2. The short-short version is that the MysqlConnectionPoolDataSource class from jetty-env.xml is evidently not getting instantiated, causing the resource reference from web.xml to fail. Here are the steps I took and excerpts of files that I think matter. (Apologies in advance - this is a bit verbose but wanted to be sure my question is complete and clear.) My war/WEB-INF/classes/hibernate.cfg.xml includes: property name=hibernate.connection.datasource *java:comp/env/jdbc/nndb */property A service class AuthenticateServiceImpl.authenticate(Credentials c) calls DAOFactory.getDefaultInstance().getCustomerDAO(); The above works fine in my pure tomcat (non-GWT project). But in the GWT project it fails with: SEVERE: Could not find datasource: java:comp/env/jdbc/nndb javax.naming.NameNotFoundException; remaining name 'jdbc/nndb' So, I added following entry to web.xml: resource-ref descriptionNN Database Connection Pooling/description res-ref-name*jdbc/nndb*/res-ref-name res-type*javax.sql.DataSource*/res-type res-authContainer/res-auth res-sharing-scopeShareable/res-sharing-scope /resource-ref and also created CustomJettyLauncher as described herehttp://webtide.intalio.com/2011/08/gwt-and-jndi/ . and added Eclipse run config to use it (Run Config Arguments -server comCustomJettyLauncher) This results in: jetty-6.1.x [WARN] Configuration problem at resource-refdescriptionNN Database Connection Pooling/descriptionres-ref-namejdbc/nndb/res-ref-nameres-typejavax.sql.DataSource/res-typeres-authContainer/res-authres-sharing-scopeShareable/res-sharing-scope/resource-ref java.lang.IllegalStateException: Nothing to bind for name * javax.sql.DataSource/default* Presumably at this point I need an entry in either the jetty-env.xml or jetty-web.xml file (which?) defining the resource. I tried jetty-env.xml: ?xml version=1.0? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext New id=nndb class=org.mortbay.jetty.plus.naming.Resource Argj*dbc/nndb*/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource Set name=Urljdbc:mysql://*dbserver/dbname*/Set Set name=User*dbuser*/Set Set name=Password*dbpasswd*/Set /New /Arg /New /Configure But the above error (Nothing to bind for name javax.sql.DataSource/default) remains. Interestingly, if I intentionally bugger up the datasource classname (e.g. NOSUCH.com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource) there's no gripe, so it may not even be trying to instantiate that class. (Similar tracer errors for WebAppContext and Resource *DO* produce gripes, so it's only ConnectionPoolDataSource that it's not trying to instantiate.) I also tried using a jetty-web.xml file but that is evidently not getting read at all. Whew! Does anyone see what's wrong? Any recommendations would be greatly appreciated. Thanks in advance! -- 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/-/zV3tAutRFVUJ. 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: Google IO 2012 : no GWT session ?
Op zaterdag 19 mei 2012 09:34:24 UTC+2 schreef kritic het volgende: Regardless of what the GWT team says, I do believe GWT as it is now will be phased out. Don't get me wrong, I think the features that GWT provides are second to none and the work put into it has been nothing short of impressive, but it has to be recognized that it is also becoming a rather pain in lower back for Google simply because it uses Java. Seems odd, but I really think the whole thing with Android is leaving a bad taste. I really do think Java will become used less and less for future projects (especially GWT). Java is the main language in many enterprise projects and runs on 70% of the mobiles. So no, it won't go away. It is also the main course language for computer science. The way GWT is now, like I wrote already, will probably be shifted to something else. Dart is all the rage right now and it's nice, however it almost feels like an attempt to replace GWT. Golang (Go) is another language that is very well thought out and could conceivably replace Java within, at least, Google. Dart is not going to be accepted by the other browsers. It is no standard and has no real added value and you can't connect it easily to server side code based on J2EE/EJB3. GO, is a quick and hack language for prototyping. It is not going to replace Java or C#. Perhaps emscripten has been looked at by the GWT team. Perhaps it may be better to use something like that - which will introduce a mix of languages with all the same features as GWT? I would enjoy that. I think many would. Right now, though, I am keeping my distance from GWT. Even though it's a fantastic technology. On Thursday, May 17, 2012 2:00:00 AM UTC-4, Celinio Fernandes wrote: Hello, I just noticed that the schedule for Google IO 2012 is now available : https://developers.google.com/events/io/sessions Not sure whether it is definitive or not. I see that this year there is no session dedicated to GWT. How come ? But there are 2 sessions dedicated to Dart. Is this a sign ? -- 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/-/RzMI9-jKiVkJ. 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.
Not able to use ValueSpinner.....
Hello, I have downloaded 'gwt-incubator-20101117-r1766.jar' file and trying to use the ValueSpinner widget from it. But when I run my application, it throws following exception: java.lang.RuntimeException: Deferred binding failed for 'com.google.gwt.widgetideas.client.ValueSpinner $ValueSpinnerResources' (did you forget to inherit a required module?) I have inherited following modules in my module: inherits name=com.google.gwt.libideas.ImmutableResources / inherits name='com.google.gwt.widgetideas.WidgetIdeas' / Do you know if I need to inherit any additional module? Thank you, Amay. -- 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: Local storage doesn't work with ie8 in gwt 2.4
If you want to force IE8-super-standards mode (even when the user has compatibility mode set), add the following meta tag: meta http-equiv=X-UA-Compatible content=IE=8 http://code.google.com/p/google-web-toolkit/wiki/IE8Support#Deferred_Binding On Sunday, October 9, 2011 8:16:34 PM UTC+4, haluk wrote: I know that there is local storage support in ie8 but when I do Storage.getLocalStorageIfSupported() in gwt 2.4, I get null value for ie8, but it works for other browsers (chrome, firefox safari). Does anyone have any idea, what am I doing wrong? Do I need to handle ie8 differently? -- 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/-/ksu4xf3z2gcJ. 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.
gwt - problem accessing servlet in inherited module
I have a widget configurationWidget in one module called Configuration that uses the RPC to get the data from ConfigurationService Rpc interface. I'm inheriting this module in another GWT module called Admin (I packageconfigurationWidget . as jar with sources, and added it in module Admin). Then I try to create this widget in the second (Admin) module and get message In Admin/Web-INF/lib the configurationWidget jar exist but when I try to deploy admin module in jboss server I get this message [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.server.ConfigurationServiceImpl in Web.xml of admin module servlet servlet-nameFlowMindAdminService/servlet-name servlet-classcom.admin.server.FlowMindAdminServiceImpl/servlet- class /servlet servlet-mapping servlet-nameFlowMindAdminService/servlet-name url-pattern/FlowMindAdmin/FlowMindAdminService/url-pattern /servlet-mapping servlet servlet-nameConfigurationService/servlet-name servlet-classcom.server.ConfigurationServiceImpl/servlet-class /servlet servlet-mapping servlet-nameConfigurationService/servlet-name url-pattern/FlowMindAdmin/ConfigurationService/url-pattern /servlet-mapping can some one help me ?How can invoke servlet configuration in admin module ? -- 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.
gwt - problem accessing servlet in inherited module loading in Jboss server
I have two maven projects, Project A : module A with servlet ConfigurationServiceImpl for RCP call . A was package as jar Project B : module B with also servlet AdminServiceImpl The module B use module A . B.gwt.xml inherits name='com.A'/ in the pom.xml of B I add dependency to A project After compile of module B the A.jar was in B\WEB-INF\lib I try to deployer module B in jboss server but I have this message [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.server.ConfigurationServiceImpl. What I missing to do ? -- 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.
Editor framework - return error from proprietary server validation (not requestfactory)
I am using the Editor framework combined with a proprietary rest-based back end. The objects returned from my back end service may contain validation errors (though not JSR 303 style errors). If I want to display these errors in my editor, do I just create my own implementation of ConstraintViolation and convert my own error format to a list of those? I'm guessing the flow is: 1. user clicks save 2. call driver.flush() 3. if no errors, persist object to server 4. server returns object w/validation errors 5. call driver.setConstraintViolations(myViolations); 6. call driver.edit(myObject); Is there anything else I need to do? Will this interfere with client-side validations? thanks leemon -- 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/-/uBCI4mCq7ucJ. 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.
absolute paths for resources
Hello, GWT seems to use relative paths for the generated resources like standard.css and *.cache.js. How can I tell GWT to generate absolute paths for these, Regards Apoorve -- 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/-/dm0oA4MFjdQJ. 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: Celltable scrollbar
Use ScrollPanel ... g:ScrollPanel ui:field=gridScroll width=100% height=480px g:FlowPanel ui:field=flexGridPanel c:CellTable ui:field=grid/c:CellTable /g:FlowPanel /g:ScrollPanel Thanks Rajeshwar On Tue, May 22, 2012 at 2:30 PM, Ashu swathi.kambhamp...@gmail.com wrote: Hi, Is there any posibilty to add scrollbar to cellist currently i am using pager but i have a reuirement that to add scroll bar. Please let me know is there any way to add this? Thanks in advance. -- 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/-/P2A4DkBTdJMJ. 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.
JSON Parsing in GWT Client
We have use GWT Platform with GWTP client and rest web services within GUICE container. Rest service invocation from GWT client is done using JSONPRequestbuilder. I want to know which is the best JSON response string parsing technique for GWT? - JSON to Java serialization/deserialization After lot of search on google, I found out that we have these many options. a. GWT built in JSONParser parseStrict method which is called secured and best way to go. But this may not be suitable for complex JSON response string. Becuase you need to write lot of code to parse each item in JSON response and convert to a Java object. b. GWT AutobeanFactory approach - I dont know how best to use this? We are using GWT 2.4, you do not have any complete example of using this approach at all. Everywhere, people say its an approach but no where we have detailed description on this. Few samples on google were from gwt older versions which were changed a lot in GWT 2.4. Please somebody share a good example with GWT 2.4 and Autobean factory approach for JSON ser/deser... c. JavaScript overlay types: People say it is not the secured way to go. So I am bit hesitate whether we should use this or not. Moreover, we are migrating from GWT to SmartGWT very soon. I hope, the rest call services with these should continue to work even in SmartGWT without any changes. (Because SmartGWT also comes with a predefined format JSON rest support which we may not use as we already have built these services in general). Kindly advice asap. 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.
Root path for a GWT application
Hi all, I'm currently building a GWT application but my customer does not want to see anything in the URL path except the domain. For example, I have actually the application deployed on the URL : http://www.foo.com/bar/Bar.html (where bar is the module name) and we actually want only http://www.foo.com. How to achieve this ? Thanks a lot for your help. David -- 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/-/UYdbi_tpd1YJ. 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.
How to access a GWT Servlet from a C# application?
Hy, I am trying to access a GWT Servlet from a C# application. How do I do that? To explain it with the Sample Code: If I send Test to the server I would like to get back Hello Test!. Regards, Clemens -- 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.
Mixing layout scheme
RootPanel.get().add(firstBasicPanel); RootPanel.get().add(secondBasicPanel); RootLayoutPanel.get().add(firstLayoutPanel); RootLayoutPanel.get().add(secondLayoutPanel); RootPanel.get().add(thirdLayoutPanel); RootLayoutPanel.get().add(thirdBasicPanel); Theoretical, firstBasicPanel and secondBasicPanel underlying the same layout system RootPanel are supposed to behave predictably, respectively firstLayoutPanel and secondLayoutPanel underlying RootLayoutPanel. Would thirdLayoutPanel underlying the different layout system RootPanel or thirdBasicPanel underlying RootLayoutPanel stirs uncertainty in the ever perfection? -- 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: Root path for a GWT application
On Tuesday, May 22, 2012 2:18:08 PM UTC+2, David Wery wrote: Hi all, I'm currently building a GWT application but my customer does not want to see anything in the URL path except the domain. For example, I have actually the application deployed on the URL : http://www.foo.com/bar/Bar.html (where bar is the module name) and we actually want only http://www.foo.com. How to achieve this ? Nothing to do with GWT actually, more with your deployment. Assuming you're use Java on the server too, and deploying as a WAR into something like Tomcat or Jetty, then to remove the '/bar/' context-path, the easiest is to simply rename your war into ROOT.war (for Tomcat) or root.war (for Jetty). http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic_Application_Deployment http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications To remove the need for the Bar.html part, rename your page as index.html or add the following to your web.xml: welcome-file-list welcome-fileBar.html/welcome-file /welcome-file-list https://developers.google.com/appengine/docs/java/config/webxml#The_Welcome_File_List (not specific to AppEngine, see the links to the specs at the top of the page) -- 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/-/uJKn-uuOxtQJ. 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: Null pointer
You're formData map is probably null. Just a guess, but I think you need to be more specific with your Map class, using, say MapK,V or something more specific. From the develper's guide: Raw Types Collection classes such as java.util.Set and java.util.List are tricky because they operate in terms of Object instances. To make collections serializable, you should specify the particular type of objects they are expected to contain through normal type parameters (for example, MapFoo,Bar rather than just Map). If you use raw collections or maps you will get bloated code and be vulnerable to denial of service attacks. See https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideRemoteProcedureCalls On Wednesday, May 23, 2012 3:12:22 AM UTC-4, SCK wrote: Hi I try to connect to my database with GWT RPC. But i get a error. Help please Thks java.lang.NullPointerException at org.etude.gwt.server.DatabaseServiceImpl.saveData(DatabaseServiceImpl.java: 37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 569) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) package org.etude.gwt.server; import java.net.URLDecoder; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.Statement; import java.util.Map; import org.etude.gwt.client.DatabaseService; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class DatabaseServiceImpl extends RemoteServiceServlet implements DatabaseService { /** * */ private static final long serialVersionUID = 1L; @SuppressWarnings(rawtypes) @Override public void saveData(Map formData) throws IllegalArgumentException { try{ Class.forName(com.mysql.jdbc.Driver); Connection conn = DriverManager.getConnection(jdbc:mysql:// localhost:3306/oracle, root, ); Statement st = conn.createStatement(); //avec décodage StringBuffer sqlQuery = new StringBuffer(insert into gwtusers(username,password,email,phone)); sqlQuery.append(values(?,?,?,?)); PreparedStatement stmt = conn.prepareStatement(sqlQuery.toString()); LINE 37 stmt.setString(1,URLDecoder.decode(formData.get(username).toString(),UTF-8)); stmt.setString(2,URLDecoder.decode(formData.get(password).toString(),UTF-8)); stmt.setString(3,URLDecoder.decode(formData.get(email).toString(),UTF-8));
Re: JSON Parsing in GWT Client
Both AutoBeanFactory as well as JSO are secure and suitable for parsing JSON. The good thing about AutoBeanFactory is that you can also use on the backend to encode objects as JSON. Did you check the official google docs on AutoBeans ( http://code.google.com/p/google-web-toolkit/wiki/AutoBean)? Another approach I have been using in my projects (GWTP) is Harald Pehl's piriti library (http://code.google.com/p/piriti/). On Monday, May 21, 2012 2:08:00 PM UTC+2, Santosh wrote: We have use GWT Platform with GWTP client and rest web services within GUICE container. Rest service invocation from GWT client is done using JSONPRequestbuilder. I want to know which is the best JSON response string parsing technique for GWT? - JSON to Java serialization/deserialization After lot of search on google, I found out that we have these many options. a. GWT built in JSONParser parseStrict method which is called secured and best way to go. But this may not be suitable for complex JSON response string. Becuase you need to write lot of code to parse each item in JSON response and convert to a Java object. b. GWT AutobeanFactory approach - I dont know how best to use this? We are using GWT 2.4, you do not have any complete example of using this approach at all. Everywhere, people say its an approach but no where we have detailed description on this. Few samples on google were from gwt older versions which were changed a lot in GWT 2.4. Please somebody share a good example with GWT 2.4 and Autobean factory approach for JSON ser/deser... c. JavaScript overlay types: People say it is not the secured way to go. So I am bit hesitate whether we should use this or not. Moreover, we are migrating from GWT to SmartGWT very soon. I hope, the rest call services with these should continue to work even in SmartGWT without any changes. (Because SmartGWT also comes with a predefined format JSON rest support which we may not use as we already have built these services in general). Kindly advice asap. Thanks -- 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/-/TTEywqVq6FkJ. 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: Null pointer
To add to what Thad said, your map should look like this MapString, String formData since the key of the map looks like a String, and your just doing a toString on the value. So when you create your map it should probably look something like this. MapString, String formData = new HashMapString, String(); It's really important that you type any collection object (Map, Set, List, ...) since your compiled code will be huge, and it save a lot of casting of objects. Not to mention being able to easily loop through collections using the a for-each loop like so. ListString items = new ArrayListString(); //add items to the list. for(String item : items) print(item); Lastly using the debugger is your friend. The possible items that could be null are formData, formData.get(username), and stmt. My guess is that either your map is null, or your map doesn't contain username. Trevor On Wednesday, May 23, 2012 2:12:22 AM UTC-5, SCK wrote: Hi I try to connect to my database with GWT RPC. But i get a error. Help please Thks java.lang.NullPointerException at org.etude.gwt.server.DatabaseServiceImpl.saveData(DatabaseServiceImpl.java: 37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 569) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) package org.etude.gwt.server; import java.net.URLDecoder; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.Statement; import java.util.Map; import org.etude.gwt.client.DatabaseService; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class DatabaseServiceImpl extends RemoteServiceServlet implements DatabaseService { /** * */ private static final long serialVersionUID = 1L; @SuppressWarnings(rawtypes) @Override public void saveData(Map formData) throws IllegalArgumentException { try{ Class.forName(com.mysql.jdbc.Driver); Connection conn = DriverManager.getConnection(jdbc:mysql:// localhost:3306/oracle, root, ); Statement st = conn.createStatement(); //avec décodage StringBuffer sqlQuery = new StringBuffer(insert into gwtusers(username,password,email,phone)); sqlQuery.append(values(?,?,?,?)); PreparedStatement stmt = conn.prepareStatement(sqlQuery.toString()); LINE 37 stmt.setString(1,URLDecoder.decode(formData.get(username).toString(),UTF-8));
Re: Split UIBinder File
Markandayarushi, In response to your reply from last night, I don't know of any way to include raw XML from another *.ui.xml file into a UiBinder file. This is against the design of the UiBinder. You said you want to break a UiBinder out into several files for separation of concerns. I suggest you use the above example of breaking your page into UiBinder widgets as this is the standard GWT UiBinder pattern. The Using Panels example in the docs is a good example of this: https://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinder#Panels Sincerely, Joseph -- 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/-/24A4KGx6BDMJ. 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: Read in binary file into byte[] ?
I think I should have been more clear. I don't want to load a file from the users computer. I want to read a file from the directory on the server where my GWT app lives. I just want to know the options I have to read this binary file into a byte[]. I am very new with GWT :) On May 23, 4:53 am, Jim Douglas jdou...@basis.com wrote: Not in GWT proper, and not reliably in all browsers. Start your reading here: http://www.google.com/search?q=javascript+file+api On May 22, 12:42 pm, Carsten carsten.schm...@googlemail.com wrote: Hi, is it possible to read in a binary file in my GWT Java-code and convert it into a byte[] ? Thanks! Carsten -- 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: Read in binary file into byte[] ?
in general you don't use byte[] or the bynary content of a file directly in the client side, unless you are making something *really special* like implementing image filters using html canvas or somthing like that. What are you trying to do or better, why do you have to read a file into a byte[] in the client side? On Wed, 23 May 2012 08:30:25 -0700 (PDT) Carsten carsten.schm...@googlemail.com wrote: I think I should have been more clear. I don't want to load a file from the users computer. I want to read a file from the directory on the server where my GWT app lives. I just want to know the options I have to read this binary file into a byte[]. I am very new with GWT :) On May 23, 4:53 am, Jim Douglas jdou...@basis.com wrote: Not in GWT proper, and not reliably in all browsers. Start your reading here: http://www.google.com/search?q=javascript+file+api On May 22, 12:42 pm, Carsten carsten.schm...@googlemail.com wrote: Hi, is it possible to read in a binary file in my GWT Java-code and convert it into a byte[] ? Thanks! Carsten -- 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. -- Sebastian Gurin sgu...@softpoint.org -- 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: Read in binary file into byte[] ?
Well, it is a binary file with point/spline-data. I need to construct eventually Path objects out of this data and draw it on a canvas. A byte[] would be the perfect data structure to hold this data. On May 23, 3:26 pm, Sebastian Gurin sgu...@softpoint.org wrote: in general you don't use byte[] or the bynary content of a file directly in the client side, unless you are making something *really special* like implementing image filters using html canvas or somthing like that. What are you trying to do or better, why do you have to read a file into a byte[] in the client side? On Wed, 23 May 2012 08:30:25 -0700 (PDT) Carsten carsten.schm...@googlemail.com wrote: I think I should have been more clear. I don't want to load a file from the users computer. I want to read a file from the directory on the server where my GWT app lives. I just want to know the options I have to read this binary file into a byte[]. I am very new with GWT :) On May 23, 4:53 am, Jim Douglas jdou...@basis.com wrote: Not in GWT proper, and not reliably in all browsers. Start your reading here: http://www.google.com/search?q=javascript+file+api On May 22, 12:42 pm, Carsten carsten.schm...@googlemail.com wrote: Hi, is it possible to read in a binary file in my GWT Java-code and convert it into a byte[] ? Thanks! Carsten -- 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 athttp://groups.google.com/group/google-web-toolkit?hl=en. -- Sebastian Gurin sgu...@softpoint.org -- 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: Unable to install GWT in Eclipse(Helios)
Hi, try download the package GWT and install locally, here the tutorial: https://developers.google.com/eclipse/docs/install-from-zip?hl=es-MX -- 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: Read in binary file into byte[] ?
If the goal is to read a file and perform computations on the data, then that process belongs on the server, where it can be done in Java, and on a machine that has significantly more horsepower. Process the data as much as makes sense for your application, then ship the processed data over to the client as the final step. On May 23, 9:39 am, Carsten carsten.schm...@googlemail.com wrote: Well, it is a binary file with point/spline-data. I need to construct eventually Path objects out of this data and draw it on a canvas. A byte[] would be the perfect data structure to hold this data. On May 23, 3:26 pm, Sebastian Gurin sgu...@softpoint.org wrote: in general you don't use byte[] or the bynary content of a file directly in the client side, unless you are making something *really special* like implementing image filters using html canvas or somthing like that. What are you trying to do or better, why do you have to read a file into a byte[] in the client side? On Wed, 23 May 2012 08:30:25 -0700 (PDT) Carsten carsten.schm...@googlemail.com wrote: I think I should have been more clear. I don't want to load a file from the users computer. I want to read a file from the directory on the server where my GWT app lives. I just want to know the options I have to read this binary file into a byte[]. I am very new with GWT :) On May 23, 4:53 am, Jim Douglas jdou...@basis.com wrote: Not in GWT proper, and not reliably in all browsers. Start your reading here: http://www.google.com/search?q=javascript+file+api On May 22, 12:42 pm, Carsten carsten.schm...@googlemail.com wrote: Hi, is it possible to read in a binary file in my GWT Java-code and convert it into a byte[] ? Thanks! Carsten -- 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 athttp://groups.google.com/group/google-web-toolkit?hl=en. -- Sebastian Gurin sgu...@softpoint.org -- 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: Read in binary file into byte[] ?
so I guess it is an array of points and you wish to represent them as byte[]. In the client side, I think byte[], int[] or double[] are the same internally, since javascript only support a single Number type. Most charting / graphics libraries will accept a native javascript array of numbers as the input I suppose that is your case. Also I suspect you have already the points prepared, at the server side in binary format. What I sould do is create a servlet that reads those files in the server side and return a JSON array of numbers. Then in javascript (client side) you call this servlet with ajax, perform eval() for obtaining the javascript array of values, and do the drawing using that javsacript array of numbers. Hope that helps. On Wed, 23 May 2012 09:39:03 -0700 (PDT) Carsten carsten.schm...@googlemail.com wrote: Well, it is a binary file with point/spline-data. I need to construct eventually Path objects out of this data and draw it on a canvas. A byte[] would be the perfect data structure to hold this data. On May 23, 3:26 pm, Sebastian Gurin sgu...@softpoint.org wrote: in general you don't use byte[] or the bynary content of a file directly in the client side, unless you are making something *really special* like implementing image filters using html canvas or somthing like that. What are you trying to do or better, why do you have to read a file into a byte[] in the client side? On Wed, 23 May 2012 08:30:25 -0700 (PDT) Carsten carsten.schm...@googlemail.com wrote: I think I should have been more clear. I don't want to load a file from the users computer. I want to read a file from the directory on the server where my GWT app lives. I just want to know the options I have to read this binary file into a byte[]. I am very new with GWT :) On May 23, 4:53 am, Jim Douglas jdou...@basis.com wrote: Not in GWT proper, and not reliably in all browsers. Start your reading here: http://www.google.com/search?q=javascript+file+api On May 22, 12:42 pm, Carsten carsten.schm...@googlemail.com wrote: Hi, is it possible to read in a binary file in my GWT Java-code and convert it into a byte[] ? Thanks! Carsten -- 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 athttp://groups.google.com/group/google-web-toolkit?hl=en. -- Sebastian Gurin sgu...@softpoint.org -- 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. -- Sebastian Gurin sgu...@softpoint.org -- 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: Read in binary file into byte[] ?
See the Google IO games lecture @ 33:50, they discuss this issue in GWT with binary data transfers: http://www.youtube.com/watch?v=NNmoEOpGJdk Sincerely, Joseph -- 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/-/s-mnpgM9x3MJ. 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: Read in binary file into byte[] ?
they mention passing the binary data using utf strings. I wonder if in the server side we can use TextResource.getText().getBytes(UTF-8) safely for that. Also it uses JavaScript typed arrays (new FLoat32Array) for accssing the array in javascript but I wonder if that is really neccesary. Very nice video thanks for sharing. On Wed, 23 May 2012 10:18:12 -0700 (PDT) Joseph Lust lifeofl...@gmail.com wrote: See the Google IO games lecture @ 33:50, they discuss this issue in GWT with binary data transfers: http://www.youtube.com/watch?v=NNmoEOpGJdk Sincerely, Joseph -- 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/-/s-mnpgM9x3MJ. 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. -- Sebastian Gurin sgu...@softpoint.org -- 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: Detecting Proxy Update via EntityProxyChange event
So... what is EntityProxyChange for? I am using EntityProxyChange to keep in sync two view (list and details of people). But I am not sure if this is correct. Every time I receive an UPDATE event, I send a new request. Because I suscribe EntityProxyChange in both views, list and details, I need to send two request. I use RequestBatcher, so practicaly only one request is sended, but anyway Its look ugly. If I want to use the same proxy in multiples views, views which shown all at the same time, which is the best aproach? EntityProxyChange or create my owns application events. On Sunday, January 29, 2012 4:08:42 PM UTC+1, Thomas Broyer wrote: If you already know the EntityProxyId? the event is about? -- 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/-/xZKW7hgNHQkJ. 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: SmartGWT
Isomorphic Support routinely receives kudos from customers and the community, with 20-30 forum posts a day coming right from the dev and support teams. When we aren't helping individuals, we're creating new samples and writing new docs for everyone. This person (sbt) is not a customer, posted multiple duplicates of an elementary question covered prominently in introductory documentation, was referred politely to such documentation, posted follow-ups indicating he still hadn't read the docs he was referred to, then became abusive when both the community and Isomorphic ignored him. But don't take my word for it, here are the threads: http://forums.smartclient.com/showthread.php?t=22138 http://forums.smartclient.com/showthread.php?t=22095 http://forums.smartclient.com/showthread.php?t=22139 http://forums.smartclient.com/showthread.php?t=22106 Note these are partly duplicates - we had to delete 5 other verbatim duplicates. The more you look into criticisms of SmartGWT, the more you will find they are as baseless as this one. We offer a very high quality product, rapid innovation, and a responsive support team that aggressively fixes issues. SBT is almost certain to fly off the handle now, so just FYI, I do not plan to reply. On Monday, May 21, 2012 3:21:49 AM UTC-7, sbt wrote: It is free but their support is pathetic I experienced it. On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne -- 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/-/r1zuSjOykAEJ. 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: How to manually instantiate ValueProxy/EntityProxy instances in order to broadcast notifications?
I am also interested in this info! But I am not sure if manually instantiation is the best solution. If you receive a notification about some entity been updated in the server side, through atmosphere for example, you send a find(EntityProxyId) to request the real data, isnt it? On Saturday, January 21, 2012 2:22:28 PM UTC+1, Yaya @ work wrote: Hi ! As many others, I'm trying to palliate the understandable limitation that entity change events one can subscribe to with EntityProxyChange.registerForProxyType(...) won't include notifications for changes made by other clients, including non GWT ones. (Which is obviously beyond GWT's control and scope.) As such, I would like all clients to be able to subscribe to system wide entity change notifications, which would be pushed (most likely) by Atmosphere. As client code is handling EntityProxy or ValueProxy instances, I wish these notifications could convey similar objects. Unfortunately, I haven't found an obvious way (or, at least, obvious enough for me ;-)) to explicitly instantiate Entity/Value Proxies from corresponding entities. The RequestFactory code that perform such instantiation/conversion seems to be quite tight to RequestState, Resolver co, which are package protected. Would anyone know of a way to do so ? Thanks in advance for your insights, Yannis -- 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/-/zg--HjZZ1vAJ. 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.
Dictionary not found by Maven plugin
My EntryPoint class, MyModule.java, loads a com.google.gwt.i18n.client.Dictionary with a script tag in MyModule.html. This works fine from Ant devmode and fine when I would run it through Eclipse: Dictionary dict = Dictionary.getDictionary(MyDictionary); I'm trying to move this class into a Maven structure. Although my dictionary's js file in in src/main/webapp with MyModule.html, when I try to run the webapp through Eclipse, get an exception that MyDictionary is not a JavaScript object. Why can't it be seen? -- 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/-/HhAHfs-3-nsJ. 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: ScrollPanel inside HeaderPanel // Another option for an auto-resizable DockLayoutPanel?
Did you ever figure out a solution to this? On Sunday, June 5, 2011 4:21:17 PM UTC-4, Ernesto Oltra wrote: The title says all. I have the following structure: - DockLayoutPanel - north - north - center - HeaderPanel - header: [ Here I have a HTMLPanel, it can change, and so its height ] - content: ScrollPanel The problem is ScrollPanel extends beyond the screen (HeaderPanel content has overflow:hidden in its CSS) If it has no solution, is there any alternatives in order to have an auto-resizable north panel in a DockLayoutPanel? -- 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/-/aBCOb8rkmJoJ. 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: user session log module/plugin for GWT
I recommend Google Analytics. Just wireup to their events logging toolhttp://support.google.com/googleanalytics/bin/answer.py?hl=enanswer=55521. There are other solutions out there like Tea Leaf and WebTrekk, but many such solutions don't like dynamic client side generated pages like GWT. For a working example see http://code.google.com/p/gwt-examples/ and Google Analytics Integrated Application. Since our company can't use GA, our team is just writing out own handler since we just want to collect discrete events like clicks and opening of certain sub-apps. The gist is to have a client side buffer collecting events and then relaying them back to the server at some interval (i.e. every 5s). You can see this in the GA tool, click the link 6 times fast and you'll only see one server post. Also note that rather than having the receiving the data via a servlet and storing it in the db, it is often better and faster to just point to a static empty file (i.e. empty.htm) and just add your data as GET params (i.e. empty.htm?evt=clickx=344y=45). Then sum that information from the Apache with a cron task. Sincerely, Joseph -- 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/-/guss_0j5eWwJ. 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: How to access a GWT Servlet from a C# application?
make a http-request to the right url/path. at http level it doesnt make matter if u're using servlet or php or whatever On Mon, May 21, 2012 at 7:08 PM, Clemens Bartz clemens.bart...@gmail.comwrote: Hy, I am trying to access a GWT Servlet from a C# application. How do I do that? To explain it with the Sample Code: If I send Test to the server I would like to get back Hello Test!. Regards, Clemens -- 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.
Large GIN Modules and DevMode performance
Hi, At the moment we've a large scale application that reached a bottleneck at DevMode startup time. It takes ~120s to hit onModuleLoad() call and spends most of the time generating and compiling GIN Injector ~85%. Our best result was to target gwt-UnitCache to a virtual disk in RAM, this speeded things up but still not under 90s to reach onModuleLoad(). Does exist any other way to improvide GIN processing without trying to isolate groups of screens on their own GWT modules (by consequence smaller GIN modules) and run only the one a developer is working on. I think we could not reach an acceptable startup time (20s) without it. This only brings some small concerns about mantaining dev mode code only (besides gwt.xml files), at least ActivityMapper, HistoryMapper and GIN module to switch. How do you tackle this issue on your large scale projects? -- 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: Google IO 2012 : no GWT session ?
The History and Future of Google Web Toolkitbyt Ray Cromwell https://developers.google.com/events/io/sessions/gooio2012/218/ On Thursday, 17 May 2012 11:30:00 UTC+5:30, Celinio Fernandes wrote: Hello, I just noticed that the schedule for Google IO 2012 is now available : https://developers.google.com/events/io/sessions Not sure whether it is definitive or not. I see that this year there is no session dedicated to GWT. How come ? But there are 2 sessions dedicated to Dart. Is this a sign ? -- 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/-/6fxs0dDdTW8J. 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: Google IO 2012 : no GWT session ?
The History and Future of Google Web ToolkitRay Cromwell https://developers.google.com/events/io/sessions/gooio2012/218/ On Thursday, 17 May 2012 11:30:00 UTC+5:30, Celinio Fernandes wrote: Hello, I just noticed that the schedule for Google IO 2012 is now available : https://developers.google.com/events/io/sessions Not sure whether it is definitive or not. I see that this year there is no session dedicated to GWT. How come ? But there are 2 sessions dedicated to Dart. Is this a sign ? -- 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/-/Bv_QbUgZzuUJ. 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: ScrollPanel inside HeaderPanel // Another option for an auto-resizable DockLayoutPanel?
Does the setSize() trick work? 2012/5/23 Shaun Tarves sh...@tarves.net Did you ever figure out a solution to this? On Sunday, June 5, 2011 4:21:17 PM UTC-4, Ernesto Oltra wrote: The title says all. I have the following structure: - DockLayoutPanel - north - north - center - HeaderPanel - header: [ Here I have a HTMLPanel, it can change, and so its height ] - content: ScrollPanel The problem is ScrollPanel extends beyond the screen (HeaderPanel content has overflow:hidden in its CSS) If it has no solution, is there any alternatives in order to have an auto-resizable north panel in a DockLayoutPanel? -- 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/-/aBCOb8rkmJoJ. 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: SmartGWT
ckendrick, there is not a single word that may be called as abusive from my side. Please be articulate and you should have a substantial arguments in your reply. In the provided threads, it is clear that i am a newbie to this framework and asking queries because there isn't sufficient information that can be digested for a new user. You behaviour is very defensive and it was you Admin who threaten me to block. I explained for duplicate publications that it was a mistake but you keep on pushing the things. Even, i suggested you many things which can be of your benefit , not mine and be assertive here .Don't use the word abusive here . It is clearly the uncorporation act done by you and *can be pursed in courts. * Be careful not to use such words having no such reality. It was your Admin who threaten me not me so be professional . Feel proud that people using your product and stop such irrelevant unjustified words. On Wednesday, May 23, 2012 11:54:33 PM UTC+5, ckendrick wrote: Isomorphic Support routinely receives kudos from customers and the community, with 20-30 forum posts a day coming right from the dev and support teams. When we aren't helping individuals, we're creating new samples and writing new docs for everyone. This person (sbt) is not a customer, posted multiple duplicates of an elementary question covered prominently in introductory documentation, was referred politely to such documentation, posted follow-ups indicating he still hadn't read the docs he was referred to, then became abusive when both the community and Isomorphic ignored him. But don't take my word for it, here are the threads: http://forums.smartclient.com/showthread.php?t=22138 http://forums.smartclient.com/showthread.php?t=22095 http://forums.smartclient.com/showthread.php?t=22139 http://forums.smartclient.com/showthread.php?t=22106 Note these are partly duplicates - we had to delete 5 other verbatim duplicates. The more you look into criticisms of SmartGWT, the more you will find they are as baseless as this one. We offer a very high quality product, rapid innovation, and a responsive support team that aggressively fixes issues. SBT is almost certain to fly off the handle now, so just FYI, I do not plan to reply. On Monday, May 21, 2012 3:21:49 AM UTC-7, sbt wrote: It is free but their support is pathetic I experienced it. On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne On Saturday, May 19, 2012 3:12:36 AM UTC+5, Akram.Moncer wrote: hello, is SmartGwt free for the commercial use ? thanks -- Akram MONCER Personne -- 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/-/vA9liX8qmwIJ. 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: maven gwt module depends on a external jar
how to run my mavenize core project (which is called by webapp project written in gwt) in eclipse debug mode so I can run it step by step? I do not know where to ask, I try to subscribe http://dev.eclipse.org/mhonarc/lists/m2e-users/ and send the question to that email address, but I cannot see my question in http://dev.eclipse.org/mhonarc/lists/m2e-users/ -- 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/-/DQTHog0IC54J. 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.
[gwt-contrib] Re: Fixing a Chrome animation bug where animations never stop running. The timestamp that webkitReq... (issue1702803)
Looks like we should re-open this CL: http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision We might also want to revisit the Mozilla implementation with a similar change to make sure it won't break in a future version of Firefox. (and also note that, starting with v11, Firefox now returns a 'requestID' that can be used with mozCancelAnimationFrame: https://developer.mozilla.org/en/DOM/window.requestAnimationFrame#AutoCompatibilityTable Given that this is a relatively recent version, we might want to keep our 'wrapper' hack for now, but we could complement it with a call to mozCancelAnimationFrame if mozRequestAnimationFrame returned a non-zero value) Ideally, we'd like to be able to take advantage of the high-res timers when available, but that's something we'd better do in a few months, when they *are* available. http://gwt-code-reviews.appspot.com/1702803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix for issue 5952: RequestContext#isChanged. (issue1601806)
http://gwt-code-reviews.appspot.com/1601806/diff/40003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/40003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode706 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:706: boolean isDiffing() { On 2012/05/22 23:03:44, rdayal wrote: Nit: package protected methods need to appear after protected methods. Oops! Done. http://gwt-code-reviews.appspot.com/1601806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] HELP: Generated Javascript contains wrong prototype assignments
Hi, I hope you can give me some advice on the following problem we currently have as I have no idea where to start. In our app we use activities and have used an ActivityProxy (pretty similar to the solution in http://code.google.com/p/google-web-toolkit/issues/detail?id=5129) to code split all of our activities and everything works great. Now we have refactored our code so that our ActivityProxy acts like an ActivityMapper so we can code split groups of activities to reduce the number of split points and make split points a bit bigger. This works in general, but now we got unexpected ClassCastException's for some of our classes which clearly should not happen: We cast specific implementations in an interface they implement (e.g. MyPlace implements IPlace, MyCommand implements ActionCommand). Currently we have found 3 classes where this happens and they have in common that the compile report says that each of this classes belongs to two different split points (no code in left over and no code in initial). The first split point is our web app split point (the whole app is behind a split point so we dont have to load the whole app to decide if someone is logged in or not) and the second split point is the mentioned group of activities (so the second split point could be treated as a child to the web app split point). Whenever this happens, the GWT compiler forgets to insert a prototype assignment which results in ClassCastExceptions. Some details of whats going on using on of our Place classes that cant be cast into its interface anymore: Our place class definitions: public interface IPlace { String getPlaceNameAndToken(); String getToken(); } public abstract class AbstractPlace extends Place implements IPlace { public AbstractPlace(String placeName, IPlace parent) { //assign to fields } //implement getPlaceNameAndToken() using placeName and getToken() } public class CustomPlace extends AbstractPlace { public CustomPlace() { this(null, null) //*note: 1-arg constructor is skipped* } public CustomPlace(Long dataBaseId1) { this(dataBaseId1, null); } public CustomPlace(Long dataBaseId1, Long dataBaseId2) { super(CustomPlace, new SomeParentPlace()); //assign parameters to fields } //implement getToken(); from IPlace } Now in our web app split point we have code that looks like new CustomPlace().getPlaceNameAndToken() to fill a Hyperlink. In our second split point (that contains a group of Activities), the CustomActivity uses the 1-arg constructor and the 2-arg constructor of CustomPlace to create places for placeController.goTo() calls. After compiling things in PRETTY mode the following has happend: The first split point (web app split point) contains the following code: function CustomPlace_0(){ $clinit_Place(); CustomPlace_2.call(this, null, null); } function CustomPlace_2(dataBaseId1, dataBaseId2){ $clinit_Place(); AbstractPlace_0.call(this, 'custom', new SomeParentPlace_0); this.dataBaseId1 = dataBaseId1; this.dataBaseId2 = dataBaseId2; } function CustomPlace(){ } _ = CustomPlace_2.prototype = CustomPlace_0.prototype = CustomPlace.prototype = new AbstractPlace; This seems totally fine to me. In our web app split point we use the no-arg default constructor (which calls the 2-arg constructor) to construct a CustomPlace to call getPlaceNameAndToken() to fill a Hyperlink (mentioned above). Thus the no-arg constructor and the 2-arg constructor functions are part of that split point. The second split point (activity split point) has the following code: function CustomPlace_1(dataBaseId1){ $clinit_Place(); CustomPlace_2.call(this, dataBaseId1, null); } Also seems fine to me in general. The CustomActivity uses the 1-arg constructor and 2-arg constructor but we already have the no-arg/2-arg constructor in the first split point (which must be downloaded before this second split point). So this split point only contains the 1-arg constructor. But whats missing is the correct assignment of CustomPlace_1.prototype in a way the first split point does. Without this assignment any instance created with the 1-arg constructor is broken in web mode and can't be cast to anything (creating instances with the other constructors works). This is because for casting, GWT seems to use a method called dynamicCast(src, dstId) where dstId is a unique number available for each type. This method then checks a special map on the src to see if it contains dstId or not. Because of the missing prototype assignment this special map is not accessible (undefined, as it is defined in AbstractPlace but __proto__ does not point to it) and thus a ClassCastException will be generated. In dev mode you won't see any problems as normal Java code is executed. We tried to create a proof of concept project but we were unable to reproduce the exact same situation. Currently we have created a branch of our app and deleting
[gwt-contrib] Re: Add white-space support to Style (issue1714803)
LGTM And now we have to find a committer to get this in: John maybe? http://gwt-code-reviews.appspot.com/1714803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix for issue 5952: RequestContext#isChanged. (issue1601806)
On 2012/05/23 10:08:59, tbroyer wrote: http://gwt-code-reviews.appspot.com/1601806/diff/40003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/40003/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode706 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:706: boolean isDiffing() { On 2012/05/22 23:03:44, rdayal wrote: Nit: package protected methods need to appear after protected methods. Oops! Done. LGTM. Brian, what say you? http://gwt-code-reviews.appspot.com/1601806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: AbsolutePanel logs IllegalStateException in dev mode (issue1703803)
LGTM. http://gwt-code-reviews.appspot.com/1703803/diff/1/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java File user/src/com/google/gwt/user/client/ui/AbsolutePanel.java (right): http://gwt-code-reviews.appspot.com/1703803/diff/1/user/src/com/google/gwt/user/client/ui/AbsolutePanel.java#newcode256 user/src/com/google/gwt/user/client/ui/AbsolutePanel.java:256: if(!isAttached()) Nit: formatting if (!isAttached()) { return; } http://gwt-code-reviews.appspot.com/1703803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Integer.TYPE, etc. (issue1528806)
Stephen, do you want to open a new issue for this (with a clean patch)? http://gwt-code-reviews.appspot.com/1528806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Add Integer.TYPE, etc. (issue1710804)
Reviewers: rdayal, Please review this at http://gwt-code-reviews.appspot.com/1710804/ Affected files: M user/super/com/google/gwt/emul/java/lang/Boolean.java M user/super/com/google/gwt/emul/java/lang/Byte.java M user/super/com/google/gwt/emul/java/lang/Double.java M user/super/com/google/gwt/emul/java/lang/Float.java M user/super/com/google/gwt/emul/java/lang/Integer.java M user/super/com/google/gwt/emul/java/lang/Long.java M user/super/com/google/gwt/emul/java/lang/Short.java M user/super/com/google/gwt/emul/java/lang/Void.java Index: user/super/com/google/gwt/emul/java/lang/Boolean.java diff --git a/user/super/com/google/gwt/emul/java/lang/Boolean.java b/user/super/com/google/gwt/emul/java/lang/Boolean.java index 6273bd2f65353b7bfc68130b01724fb3c1fba1d6..b8d8c1aa62935dcaf9bc4bef82f24d4727dfa349 100644 --- a/user/super/com/google/gwt/emul/java/lang/Boolean.java +++ b/user/super/com/google/gwt/emul/java/lang/Boolean.java @@ -26,11 +26,13 @@ public final class Boolean implements ComparableBoolean, Serializable { */ // CHECKSTYLE_OFF: These have to be created somewhere. - public static Boolean FALSE = new Boolean(false); - public static Boolean TRUE = new Boolean(true); + public static final Boolean FALSE = new Boolean(false); + public static final Boolean TRUE = new Boolean(true); // CHECKSTYLE_ON + public static final ClassBoolean TYPE = boolean.class; + public static boolean parseBoolean(String s) { return true.equalsIgnoreCase(s); } Index: user/super/com/google/gwt/emul/java/lang/Byte.java diff --git a/user/super/com/google/gwt/emul/java/lang/Byte.java b/user/super/com/google/gwt/emul/java/lang/Byte.java index 4d6b7573ae4df2bc3feb2347f71885826688db60..664589efc43193341cc35b9f72ae0de1d42122ca 100644 --- a/user/super/com/google/gwt/emul/java/lang/Byte.java +++ b/user/super/com/google/gwt/emul/java/lang/Byte.java @@ -23,6 +23,7 @@ public final class Byte extends Number implements ComparableByte { public static final byte MIN_VALUE = (byte) 0x80; public static final byte MAX_VALUE = (byte) 0x7F; public static final int SIZE = 8; + public static final ClassByte TYPE = byte.class; /** * Use nested class to avoid clinit on outer. Index: user/super/com/google/gwt/emul/java/lang/Double.java diff --git a/user/super/com/google/gwt/emul/java/lang/Double.java b/user/super/com/google/gwt/emul/java/lang/Double.java index 3397187fd80d34911014c4aa212ad0668d5dff16..5144653a41d0def1144f37f5d814cd259b8f7ac5 100644 --- a/user/super/com/google/gwt/emul/java/lang/Double.java +++ b/user/super/com/google/gwt/emul/java/lang/Double.java @@ -31,6 +31,7 @@ public final class Double extends Number implements ComparableDouble { public static final double NEGATIVE_INFINITY = -1d / 0d; public static final double POSITIVE_INFINITY = 1d / 0d; public static final int SIZE = 64; + public static final ClassDouble TYPE = double.class; // 2^512, 2^-512 private static final double POWER_512 = 1.3407807929942597E154; Index: user/super/com/google/gwt/emul/java/lang/Float.java diff --git a/user/super/com/google/gwt/emul/java/lang/Float.java b/user/super/com/google/gwt/emul/java/lang/Float.java index f0a8f6d9413046ce28a3ff48d2a8a12ce892ebd7..f10cd9ed32c162398bcd98e59e2f1a381edf479a 100644 --- a/user/super/com/google/gwt/emul/java/lang/Float.java +++ b/user/super/com/google/gwt/emul/java/lang/Float.java @@ -28,6 +28,7 @@ public final class Float extends Number implements ComparableFloat { public static final float NEGATIVE_INFINITY = -1f / 0f; public static final float POSITIVE_INFINITY = 1f / 0f; public static final int SIZE = 32; + public static final ClassFloat TYPE = float.class; private static final long POWER_31_INT = 2147483648L; private static final long POWER_32_INT = 4294967296L; Index: user/super/com/google/gwt/emul/java/lang/Integer.java diff --git a/user/super/com/google/gwt/emul/java/lang/Integer.java b/user/super/com/google/gwt/emul/java/lang/Integer.java index 6a44ab67963b0037a27d487d76766ea519592387..04e2b005ff1412fb2c18bbd443844e0e92943089 100644 --- a/user/super/com/google/gwt/emul/java/lang/Integer.java +++ b/user/super/com/google/gwt/emul/java/lang/Integer.java @@ -23,6 +23,7 @@ public final class Integer extends Number implements ComparableInteger { public static final int MAX_VALUE = 0x7fff; public static final int MIN_VALUE = 0x8000; public static final int SIZE = 32; + public static final ClassInteger TYPE = int.class; /** * Use nested class to avoid clinit on outer. Index: user/super/com/google/gwt/emul/java/lang/Long.java diff --git a/user/super/com/google/gwt/emul/java/lang/Long.java b/user/super/com/google/gwt/emul/java/lang/Long.java index 0971d94975ef6ba8555d04534230c97f6612de11..c0b08d7eeefbba80dcd46af6aabc74d9f9efb68e 100644 --- a/user/super/com/google/gwt/emul/java/lang/Long.java +++
[gwt-contrib] Re: Add Integer.TYPE, etc. (issue1528806)
Stephen, do you want to open a new issue for this (with a clean patch)? Sure, done: http://gwt-code-reviews.appspot.com/1710804 Closing this one. http://gwt-code-reviews.appspot.com/1528806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Using SafeStyles in the ButtonCellBase Templates to avoid the compiler warnings against using St... (issue1707804)
Committed as r10985 http://gwt-code-reviews.appspot.com/1707804/diff/1/user/src/com/google/gwt/cell/client/ButtonCellBase.java File user/src/com/google/gwt/cell/client/ButtonCellBase.java (right): http://gwt-code-reviews.appspot.com/1707804/diff/1/user/src/com/google/gwt/cell/client/ButtonCellBase.java#newcode61 user/src/com/google/gwt/cell/client/ButtonCellBase.java:61: public static interface AppearanceC { On 2012/05/17 23:34:05, skybrian wrote: Style: all interfaces are static, and the static keyword should be omitted. Done. http://gwt-code-reviews.appspot.com/1707804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] HELP: Generated Javascript contains wrong prototype assignments
Whenever this happens, the GWT compiler forgets to insert a prototype assignment which results in ClassCastExceptions. This sounds vaguely like a problem scala-gwt ran into in the scala-ized GWT showcase with classes that were shared across split points. The problem there was with undefined class literals, which is different from what you're seeing, but might be related. Can you apply this patch to a local GWT trunk build and see if it helps: http://gwt-code-reviews.appspot.com/1513803/ - Stephen -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add white-space support to Style (issue1714803)
Looking at it now http://gwt-code-reviews.appspot.com/1714803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Preparing for an upcoming API change to requestAnimationFrame where browsers will pass a sub-mil... (issue1715803)
Reviewers: rdayal, Description: Preparing for an upcoming API change to requestAnimationFrame where browsers will pass a sub-millisecond timer instead of a Date.now() timestamp. This can cause havoc with animations and has already popped up in the Chrome dev channel (but was reverted). We now ignore the native callback argument and just grab the current time from javascript. http://gwt-code-reviews.appspot.com/1702803/ Please review this at http://gwt-code-reviews.appspot.com/1715803/ Affected files: M user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java M user/src/com/google/gwt/animation/client/AnimationSchedulerImplWebkit.java Index: user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java === --- user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java (revision 10982) +++ user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java (working copy) @@ -64,9 +64,12 @@ */ private native void requestAnimationFrameImpl(AnimationCallback callback, AnimationHandleImpl handle) /*-{ -var wrapper = $entry(function(time) { +var wrapper = $entry(function() { if (!hand...@com.google.gwt.animation.client.AnimationSchedulerImplMozilla.AnimationHandleImpl::canceled) { - callba...@com.google.gwt.animation.client.AnimationScheduler.AnimationCallback::execute(D)(time); +// Older versions of firefox pass the current timestamp, but newer versions pass a +// high resolution timer. We normalize on the current timestamp. +var now = @com.google.gwt.core.client.Duration::currentTimeMillis()(); + callba...@com.google.gwt.animation.client.AnimationScheduler.AnimationCallback::execute(D)(now); } }); $wnd.mozRequestAnimationFrame(wrapper); Index: user/src/com/google/gwt/animation/client/AnimationSchedulerImplWebkit.java === --- user/src/com/google/gwt/animation/client/AnimationSchedulerImplWebkit.java (revision 10982) +++ user/src/com/google/gwt/animation/client/AnimationSchedulerImplWebkit.java (working copy) @@ -63,10 +63,11 @@ private native double requestAnimationFrameImpl(AnimationCallback callback, Element element) /*-{ var _callback = callback; -var wrapper = $entry(function(time) { - // Chrome 10 does not pass the 'time' argument, so we fake it. - time = time || @com.google.gwt.core.client.Duration::currentTimeMillis()(); - _callba...@com.google.gwt.animation.client.AnimationScheduler.AnimationCallback::execute(D)(time); +var wrapper = $entry(function() { + // Older versions of Chrome pass the current timestamp, but newer versions pass a + // high resolution timer. We normalize on the current timestamp. + var now = @com.google.gwt.core.client.Duration::currentTimeMillis()(); + _callba...@com.google.gwt.animation.client.AnimationScheduler.AnimationCallback::execute(D)(now); }); return $wnd.webkitRequestAnimationFrame(wrapper, element); }-*/; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a Chrome animation bug where animations never stop running. The timestamp that webkitReq... (issue1702803)
http://gwt-code-reviews.appspot.com/1702803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a Chrome animation bug where animations never stop running. The timestamp that webkitReq... (issue1702803)
Thanks for the heads up Thomas. I've updated the CL to include firefox. http://gwt-code-reviews.appspot.com/1702803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a Chrome animation bug where animations never stop running. The timestamp that webkitReq... (issue1702803)
LGTM http://gwt-code-reviews.appspot.com/1702803/diff/5001/user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java File user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java (right): http://gwt-code-reviews.appspot.com/1702803/diff/5001/user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java#newcode69 user/src/com/google/gwt/animation/client/AnimationSchedulerImplMozilla.java:69: // Older versions of firefox pass the current timestamp, but newer versions pass a Actually no FF version pass the high res value. The spec has changed but only WebKit has adapted yet. http://gwt-code-reviews.appspot.com/1702803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add white-space support to Style (issue1714803)
committed as r10988 http://gwt-code-reviews.appspot.com/1714803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Integer.TYPE, etc. (issue1710804)
On 2012/05/23 16:20:30, stephenh wrote: Ran this through our battery of tests, and this is the failure that I saw: apicheck-nobuild: [java] Found 38 new resources [java] Found 38 new resources [java] ApiChanges [ [java] com.google.gwt.core.client.impl.CrossSiteIframeLoadingStrategy MISSING [java] com.google.gwt.core.client.impl.XhrLoadingStrategy.RequestData MISSING [java] java.lang.Boolean::FALSE FINAL_ADDED [java] com.google.gwt.core.client.impl.XhrLoadingStrategy::createXhr() MISSING [java] java.lang.Boolean::TRUE FINAL_ADDED [java] API compatibility check FAILED [java] com.google.gwt.core.client.impl.XhrLoadingStrategy::onLoadError(Lcom/google/gwt/core/client/impl/XhrLoadingStrategy$RequestData;Ljava/lang/Throwable;Z) MISSING [java] com.google.gwt.core.client.impl.XhrLoadingStrategy::tryLoad(Lcom/google/gwt/core/client/impl/XhrLoadingStrategy$RequestData;) MISSING [java] com.google.gwt.i18n.client.impl.DateRecord MISSING [java] ], not found. Are you using a properly formatted configuration file? Looks like this happens when running 'ant apicheck'. Can you fix this up? http://gwt-code-reviews.appspot.com/1710804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: DefaultProxyStore violated ProxyStore#nextId contract. (issue1622803)
http://gwt-code-reviews.appspot.com/1622803/diff/6001/user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java File user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java (right): http://gwt-code-reviews.appspot.com/1622803/diff/6001/user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java#newcode71 user/src/com/google/web/bindery/requestfactory/shared/DefaultProxyStore.java:71: nextId = map.size(); I think there's some implicit contract between ProxyStore and its caller that isn't documented? Since nextId field is never serialized and put() never needs to be called, here's a simple test that wouldn't work with the current implementation: - create new proxy - call nextId() - serialize - deserialize - call nextId() The map will still have zero elements so it will return the same id twice. Initializing from map.size() might be a reasonable thing to for backward compatibility with a previous version of DefaultProxyStore, but for the current version, it seems like we should actually be serializing the nextId field and restoring it? So EXPECTED_VERSION probably needs to be bumped up and the protocol changed? Or alternately, the contract on ProxyStore isn't correct and this sequence of calls isn't allowed. In that case we should probably update the javadoc on ProxyStore to explain what the contract actually is. http://gwt-code-reviews.appspot.com/1622803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Integer.TYPE, etc. (issue1710804)
Can you fix this up? Do you want me to just add something to gwt23_24userApi.conf? I don't see a gwt24_25userApi.conf. Not sure if I should just make a new gwt24_25userApi.conf and I'm good to go or if I need to make new reference jars... http://gwt-code-reviews.appspot.com/1710804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Removing uses of deprecated Tree code in GWT showcase sample and TreeExample. (issue1712804)
LGTM http://gwt-code-reviews.appspot.com/1712804/diff/1/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java File samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java (right): http://gwt-code-reviews.appspot.com/1712804/diff/1/samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java#newcode194 samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwTree.java:194: item.addTextItem(); Off topic, but this is a weird hack to include in sample code. Assuming that dynamically generating children is something we want to demonstrate at all (I'm not convinced), shouldn't there be a better API for this? http://gwt-code-reviews.appspot.com/1712804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Added style getters to UiRenderers (issue1700803)
http://gwt-code-reviews.appspot.com/1700803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Filter no longer referenced symbols from symbol table. (issue1711804)
Updated. http://gwt-code-reviews.appspot.com/1711804/diff/1/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java (right): http://gwt-code-reviews.appspot.com/1711804/diff/1/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#newcode1280 dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:1280: SymbolData[] r = new SymbolData[result.size()]; On 2012/05/23 08:56:01, tbroyer wrote: Could be simplified to: return result.toArray(new SymbolData[result.size()]); Done. http://gwt-code-reviews.appspot.com/1711804/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java File dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java (right): http://gwt-code-reviews.appspot.com/1711804/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java#newcode43 dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java:43: public VerifySymbolMap( On 2012/05/23 08:56:01, tbroyer wrote: Should it be 'private' ? Done. http://gwt-code-reviews.appspot.com/1711804/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java#newcode57 dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java:57: public static void exec(JsProgram jsProgram, JavaToJavaScriptMap jjsmap, On 2012/05/23 08:56:01, tbroyer wrote: IIRC, static members should appear before instance members in our style guide. You are right. I usually let the pre-submit script tells me what goes where when I submit. http://gwt-code-reviews.appspot.com/1711804/diff/1/dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java#newcode63 dev/core/src/com/google/gwt/dev/jjs/impl/VerifySymbolMap.java:63: accept(jsProgram); On 2012/05/23 08:56:01, tbroyer wrote: Given that jsProgram is only used here, could we remove the field and that method? and change exec() to: new VerifySymbolMap(jjsmap, symbolTable).accept(jsProgram); good call. http://gwt-code-reviews.appspot.com/1711804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Filter no longer referenced symbols from symbol table. (issue1711804)
http://gwt-code-reviews.appspot.com/1711804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix for issue 5952: RequestContext#isChanged. (issue1601806)
http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode117 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:117: public boolean diffing; On 2012/05/23 18:05:24, skybrian wrote: I'm puzzled why all these fields are public when the State class is protected. But I suppose it's okay. Yes, strange (and I could have made the new field 'private', given that the isDiffing() is package-protected :-/ ), but it's an impl class, so... http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java File user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java#newcode95 user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java:95: public static SimpleBar returnFirst(ListSimpleBar list) { On 2012/05/23 18:05:24, skybrian wrote: It's weird that this method isn't just inlined. It can be called from the client-side, it's a service method (SimpleBarRequest). http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java File user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java#newcode78 user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java:78: context.findSimpleFooById(1L).with(barField, oneToManyField).fire( On 2012/05/23 18:05:24, skybrian wrote: I'm confused because this looks like an async test, but delayTestFinish() and finishTest() are never called. How do we know all this code is ever reached? D'oh! Looks like you're right. It *will* be reached in RequestPayloadJreTest because the RequestTransports there are synchronous (so the 'fire()' methods are synchronous), but you're right it won't be reached when run as a GWTTestCase (in either dev mode or prod mode). http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java#newcode117 user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java:117: SimpleProxyId? id = (SimpleProxyId?) foo.stableId(); On 2012/05/23 18:05:24, skybrian wrote: There's no guarantee that this code is reached. (If too little data is sent, the test wouldn't fail.) It might be simpler to introduce a findOperation helper method and do something like this: SimpleProxyId? fooId = findOperation(requestMessage, fooTypeToken); // ... do asserts ... The findOperation() method should automatically assert that there's exactly one match. IIRC, we're actually expecting several operationMessages for the same type (at least for valueTypeToken). However, this test is not about which messages are sent (these would be caught in all the other RF tests) but what they contain. For instance, we don't check that we don't have operations for other types than fooTypeToken and valueTypeToken, we only check what the messages of these types contain. When we'll revisit AbstractRequestContext#makeOperations to no longer send proxies that have not changed, then we'll revisit this test too, because then we'll care which proxy is sent to the server. Here, what we care is that barField, oneToManyField and oneToManySetField don't appear as modified properties. I could add a flag or counter in the 'if's and then check their values after the loops to assert this code has been reached? Or maybe simply add a comment making explicit what we're checking here? http://gwt-code-reviews.appspot.com/1601806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix for issue 5952: RequestContext#isChanged. (issue1601806)
http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java File user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java#newcode95 user/test/com/google/web/bindery/requestfactory/server/SimpleBar.java:95: public static SimpleBar returnFirst(ListSimpleBar list) { On 2012/05/24 00:28:11, tbroyer wrote: On 2012/05/23 18:05:24, skybrian wrote: It's weird that this method isn't just inlined. It can be called from the client-side, it's a service method (SimpleBarRequest). Oh, I see. (Off topic rant.) This is just test code, but I'm annoyed that I have to search the codebase for interfaces annotated with @Service or @ServiceName that point to this class in order to tell whether a method I'm looking at is directly called over the Internet or not. That's pretty dangerous. There needs to be some kind of annotation cluing the reader in that this is an RPC endpoint. I think GWT-RPC did a better job here, because the class extends RemoteServiceServlet and implements the service interface. http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java File user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/45014/user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java#newcode117 user/test/com/google/web/bindery/requestfactory/shared/impl/RequestPayloadTest.java:117: SimpleProxyId? id = (SimpleProxyId?) foo.stableId(); On 2012/05/24 00:28:11, tbroyer wrote: I could add a flag or counter in the 'if's and then check their values after the loops to assert this code has been reached? Sure, I think that's good. Increment a counter and assert that it's = 1 after the for loop. (If it drops to zero due to a code change and that's intentional, we have some dead code to delete.) http://gwt-code-reviews.appspot.com/1601806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Integer.TYPE, etc. (issue1710804)
We will need a new config file for GWT 2.5, I don't know exactly where in the release process that goes, but probably sooner rather than later. http://gwt-code-reviews.appspot.com/1710804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add Integer.TYPE, etc. (issue1710804)
We will need a new config file for GWT 2.5 I started copy/pasting the config file for 2.4, but it has some comments that I really am not following...Rajeev, could you or someone more familiar with apicheck get it setup for 2.5? I suppose if I tracked down the commit that set it up for 2.4, I could just change whatever it changed...I'll look in to that. http://gwt-code-reviews.appspot.com/1710804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors