Re: Dev plugin for firefox 3.7
On Sep 9, 2:38 am, csillag csillag.kris...@gmail.com wrote: I hope this gets fixed soon, because my GWT apps totally fail with FF4, and I can not even start to debug them until I have a dev plugin ready. In the mean time, can't you compile with -style PRETTY and debug using Firebug? (or the Web Console? haven't tried it yet) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Expenses Sample project
I got the same javax.validation error. The error is thrown out during the gwtc process. Something wrong with the gwt trunk version? -Super On Sep 8, 1:01 pm, Travis Camechis camec...@gmail.com wrote: I just did a fresh maven build it ran successfully. I did get some errors due to javax.validation problems but the build still ran. Make sure your up to date as well as your GWT_TOOLS. On Wed, Sep 8, 2010 at 11:58 AM, superdama zack...@gmail.com wrote: Travis, Good for mvn compile, no good for mvn gwt:compile. Any advice? On Sep 7, 10:07 am, Travis Camechis camec...@gmail.com wrote: try running tools/scripts/maven_script.sh from the root of the GWT checkout. This will build a current copy of GWT and them to your local maven repo. You should then be able to do a mvn compile, mvn gwt:compile, mvn gw:run. On Sun, Sep 5, 2010 at 9:08 AM, superdama zack...@gmail.com wrote: Hi guys, I got the same issue. Still don't know how to solve the problem. Frustrating. -Zack On Aug 25, 9:22 pm, tc camec...@gmail.com wrote: Does anyone know why I would get this error when trying to run the samples/expensesapp via maven. : java.lang.NoClassDefFoundError: org/datanucleus/ PersistenceConfiguration java.lang.NoClassDefFoundError: Could not initialize class com.google.gwt.sample.expenses.server.domain.EMF I am running this by using these commands. mvncompilemvngwt:compilemvngwt:run I also tried to usemvngae:run but get the same error. This is the sample project in the trunk of the GWT samples area. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT war file inside a EAR file
Hi folks! So, i finally get it working! I reviewed my ear packaging and realized there wasn't a lib folder with dependences jars. All my jars was scattered inside the ear. Sooo i created the lib folder and packaged all my libs, including gwt-servlet.jar, what definitely made the difference. I really appreciate your help. Thank you very much!!! 2010/9/8 Jatin Bhadra bhadraja...@gmail.com Can you check the jars that you have packaged in the WEB-INF/lib. Please check if there any j2ee.jar or servlet.jar in your EAR package Jatin Bhadra www.apartech.co.uk On Sep 8, 1:51 pm, Marcelo Balloni marceloball...@gmail.com wrote: At the moment i'm not packaging anything else besides the gwt war file and and related jars. Just a test to proceed and move on with ear package. For now i'm without new ideas, desperate i would say hahaha I'm try now, but i'm running out of alternatives. Thank you very much! 2010/9/8 jocke eriksson jock...@gmail.com Well I hardly think this is GWT related. You should seek advice from your EJB server support, FAQ or mailing list. 2010/9/8 Marcelo Balloni marceloball...@gmail.com I made a thousand testes and nothing is working here =/ As an war file it works pretty fine, but i really need a ear package =/ Any sugestions please? Thank you!! 2010/9/6 Marcelo Balloni marceloball...@gmail.com Bad news. Still no working. I created the weblogic-application.xml descriptor file and it is still not working =/ I got the following error: An error occurred during activation of changes, please see the log for details. weblogic.application.ModuleException: com/c/w/server/MyServiceImpl : com/google/gwt/user/server/rpc/RemoteServiceServlet Any idea? If i package like a simple war file it works pretty fine. Thank you! 2010/9/5 KevMo kevinps...@gmail.com I've successfully created an EAR with GWT and glassfish, it wasn't too difficult. I used gilead with hibernate for persistence. The only trick was getting GWT to compile, as my entities are in the EJB, and GWT was in the WAR. I simply made sure the .java files we available to the WAR. I can provide a sample project if needed. Cheers, Kevin On Sep 4, 5:51 pm, Marcelo Balloni marceloball...@gmail.com wrote: Hi Mariano, Thank you very much. I Already have an application.xml descriptor with exactly all proper configurations. What i don't have is a weblogic-application.xml descriptor, but i'll try it no later than monday. But i must ask, what if i try to deploy on glassfish or jboss per example (real situation here)? do i need some particular descriptor to? Actually i haven't tested deploying it on glassfish before, gonna do that. One more time thank you very much. 2010/9/4 Mariano mgo1...@gmail.com Hi Marcelo, Some weeks ago I've implemented exactly what you are trying (putting the WAR inside an EAR file and deploying it into a Weblogic server). Doing it it was pretty straightforward in my case, I didn't need any change regarding GWT coding or deployment. The steps I followed were: 1. Create an application.xml descriptor 2. Create a weblogic-application.xml descriptor 3. Do all the proper EAR packaging (see next paragraph for my directory layout) After doing that in order to deploy it in Weblogic, just copy that EAR file into your DOMAIN/autodeploy directory OR deploy it thru WebLogic's console as any usual application. This is my directory layout: app-ear/META-INF/MANIFEST.MF app-ear/META-INF/application.xml app-ear/META-INF/weblogic-application.xml app-ear/myapp.war And the contents of my deployment descriptor files are: Content of META-INF/application.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' ' http://java.sun.com/dtd/application_1_3.dtd' application display-nameMy Application/display-name descriptionMy Application description/description !-- GUI -- module web web-urimyapp.war/web-uri context-rootmyapp/context-root /web /module /application Content of META-INF/weblogic-application.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE weblogic-application PUBLIC -//BEA Systems, Inc.//DTD WebLogic Application 8.1.0//EN http://www.bea.com/servers/wls810/dtd/ weblogic-application_2_0.dtd weblogic-application prefer-application-packages !-- I have something here, but it is related to my particular application and not related with GWT -- /prefer-application-packages /weblogic-application Hope it helps and
Client side serialization and deserialization of GWT objects
Hey All, I need to create an EventBus implementation that will serialize and deserialize event data objects solely on the client side to allow for event sharing between mulitple GWT modules on a single page. Does anyone know of an easy way for me to do that or possibly an example or implementation that has already been done? Thanks in advance -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Client side serialization and deserialization of GWT objects
RPC serialization is not symetric, so you wil lnot be able to serialize/deserialize objects on the client side using this mechanism. We achieved just what you describe by creating a JSON serializer/deserializer on the client side. I'm sorry that I'm not allowed to shar e this code. :-/, but I know some pretty good opsen source JSON serializers are under development. regards, Etienne 2010/9/9 bconoly bcon...@gmail.com: Hey All, I need to create an EventBus implementation that will serialize and deserialize event data objects solely on the client side to allow for event sharing between mulitple GWT modules on a single page. Does anyone know of an easy way for me to do that or possibly an example or implementation that has already been done? Thanks in advance -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem when server is ofline
I'm ruing appliaction on windows 7. I'm connected to network using cable and everything is fine, but when i unplug cable(and lose connection to net) application doesn't work. If I deploy some other applications that are developed for example using Spring MVC or Wicket... applications are behave normal. I get error for every RPC call.. IOW, set up Tomcat on your system, disconnect it from the net, adn see if you can still access the Tomcat web page via a web browser on your computer. this is working. On Sep 8, 6:06 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote: What OS are you running? Does it completely turn off TCP/IP when you don't have a net connection? IOW, set up Tomcat on your system, disconnect it from the net, adn see if you can still access the Tomcat web page via a web browser on your computer. If you can't see anything on Tomcat, the problem is your OS. If you just can't see your app, then the problem is with your app. Greg On Sep 8, 8:18 am, Vesin Dusko vesindu...@gmail.com wrote: Hi. For past 2 years i develop applications using GWT and recently I face with new problem to me. Application that i create is for demo purpose, so i want to have application on my laptop deployed on tomcat, and to access to it from web browser that is on that machine. So i access it with localhost. When i do that everything is fine until i have internet connection, but when my computer is offline(unplugged from network) i cant access to application... Do you have any clue what is happening? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RE: Translating already compiled Java?
You can automatically generate POJO classes from the same WSDL. Why are you doing this manually? In my GWT app I used SUN jax rpc for that http://java.sun.com/webservices/jaxrpc/overview.html Let me know if you need more info -Sergey -Original Message- From: google-web-toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Gary Madden Sent: Wednesday, September 08, 2010 5:56 AM To: Google Web Toolkit Subject: Translating already compiled Java? Hello, Sorry if this is a silly question but I was wondering whether it's possible to get the GWT compiler to translate already compiled Java code into JavaScript? I know that you can specify Java source code to translate using the source elements in the XML module file. The reason is, I have a JAR that is generated from a WSDL. My GWT web app makes SOAP requests using this JAR. There is a problem in that I have to write a lot of classes at the moment that basically replicate the POJOs in the JAR just so they can be used in GWT. This may lead to bugs where not all the fields are properly set from the SOAP objects. In fact, I've already found and fixed quite a few bugs relating to this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. /PREBRspan style='font-size:8.0pt;font-family:Arial,sans-serif;color:#003366' _BR This electronic message and any files transmitted with it containsBR information from iDirect, which may be privileged, proprietaryBR and/or confidential. It is intended solely for the use of the individualBR or entity to whom they are addressed. If you are not the originalBR recipient or the person responsible for delivering the email to theBR intended recipient, be advised that you have received this emailBR in error, and that any use, dissemination, forwarding, printing, orBR copying of this email is strictly prohibited. If you received this emailBR in error, please delete it and immediately notify the sender.BR _ /SPANPRE -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Variable UI
So you're suggesting, I should have every image ready for every possible resolution? It is just that I have a lot of images, it would be really nice to keep all the values in percentage inside of my app and scale whatever I need accordingly. At least I would consider that more elegant, it's a shame, that there is so much problem with that :- ( (Especially cause in one app I may as well have like 200-300 images each of ~100Kb, and it would be very desirable to have each of those one time, in a sufficient resolution, and scale, instead of having different resolution copies and by that getting over 1000 images...) If there is really no way to solve that with momentary technology (this app is a private project where I give a rat's ass if it's compatible with IE, Firefox is fine ;-) then I surely hope that browser's and html will soon do a step forward to be more application style compatible... Anyway, thanks for your reply though :-) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: UiBinder: ClientBundle with ImageResource ui:style. How?
Hi Marius, Thanks for your help again. ui:image resource={res.someImage} and x:SomeWidget resource={res.someImage} are very different. I'm still lost on this one, but thanks for chipping in :) On Thu, Sep 9, 2010 at 7:04 AM, marius.andreiana marius.andrei...@gmail.com wrote: On Sep 8, 5:17 pm, Andrew Hughes ahhug...@gmail.com wrote: But when MyView and MyResources are in different packages, resource={res.loading} never works. Is this expected and does it work for you? It does work here http://code.google.com/p/puzzlebazar/source/browse/src/com/puzzlebazar/client/core/view/SplitMainView.ui.xml (see m:ImageHyperlink resource='{resources.logo}' ) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Variable UI
Hmm, I guess I was stupid, I should just use a service to dynamically create images of the right size on the server-side and flush them to the client, then I have variable resizing and can use 100% size in the browser, right? (sorry, I'm not too experienced in programming web- apps) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Wave in a Box
Google will make a subset of Google Wave as Wave in a Box open source. Does anyone have seen any source code yet? Analyzing the current Wave code looks like Wave consists of a total own but not GWT core widget set. Does some one know more? Stefan Bachert http://gwtworld.de -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
LightweightMetrics - network transport measurement?
Hey all, I'm looking at what the LightweightMetrics can supply (opposed to hand- rolling your own), but it is not clear to me if it handles metrics on both the client and the server side to capture network latency issues (or, to be more general, network transport time) inbetween the client and the server. client request sent: 1234567890 --network latency:200ms server receive request: 1234568090 (+/- client/server time offsets) server sending response: 1234568140 (+/- client/server time offsets) --network latency:200ms client receive response: 1234568340 Is this something that I (more than likely) just do not understand about the current LightweightMetrics, or is this out of scope or something someone else may have solved with a different approach/ library? usecase: if you have optimized server and client code as much as possible, but someone is using dial-up or mobile network connection, want to be able to identify and record when that occurs. thanks! -D -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Any news on when super dev mode will be released?
Thanks, If I have time to build trunk I will give it a go. Will the profiling option be in the next milestone release of 2.1? On Sep 8, 6:21 pm, Chris Conroy con...@google.com wrote: P.S. that flag needs to get passed in the JVM arguments. Also note you'll need to enable local file access for SpeedTracer in the chrome://extensions page. On Wed, Sep 8, 2010 at 6:20 PM, Chris Conroy con...@google.com wrote: Paul, We're actively working on it. Note that 'super dev mode' isn't quite in existence yet, it's more of a goal than a concrete thing at the moment. Though there was a short lived branch with that name--most of those particular changes have already gone in. If you like, you can profile DevMode by running GWT from trunk and passing -Dgwt.speedtracerlog=/path/to/myproject-st.html which will cause DevMode to output a SpeedTracer log to that file. You can then use the Chrome Extension SpeedTracer to inspect the generated log to see where DevMode is spending time for your app. If you'd like to share, you can feel free to post screenshots of the SpeedTracer detail view for your Module Init. On Tue, Sep 7, 2010 at 5:26 PM, Paul Stockley pstockl...@gmail.comwrote: Speeding up reloads would very much be appreciated. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Chris Conroy Software Engineer Google, Atlanta -- Chris Conroy Software Engineer Google, Atlanta -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Any news on when super dev mode will be released?
Yes, the profiling will be in the next release. On Thu, Sep 9, 2010 at 12:06 PM, Paul Stockley pstockl...@gmail.com wrote: Thanks, If I have time to build trunk I will give it a go. Will the profiling option be in the next milestone release of 2.1? On Sep 8, 6:21 pm, Chris Conroy con...@google.com wrote: P.S. that flag needs to get passed in the JVM arguments. Also note you'll need to enable local file access for SpeedTracer in the chrome://extensions page. On Wed, Sep 8, 2010 at 6:20 PM, Chris Conroy con...@google.com wrote: Paul, We're actively working on it. Note that 'super dev mode' isn't quite in existence yet, it's more of a goal than a concrete thing at the moment. Though there was a short lived branch with that name--most of those particular changes have already gone in. If you like, you can profile DevMode by running GWT from trunk and passing -Dgwt.speedtracerlog=/path/to/myproject-st.html which will cause DevMode to output a SpeedTracer log to that file. You can then use the Chrome Extension SpeedTracer to inspect the generated log to see where DevMode is spending time for your app. If you'd like to share, you can feel free to post screenshots of the SpeedTracer detail view for your Module Init. On Tue, Sep 7, 2010 at 5:26 PM, Paul Stockley pstockl...@gmail.com wrote: Speeding up reloads would very much be appreciated. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Chris Conroy Software Engineer Google, Atlanta -- Chris Conroy Software Engineer Google, Atlanta -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Chris Conroy Software Engineer Google, Atlanta -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Any news on when super dev mode will be released?
On Sep 9, 6:06 pm, Paul Stockley pstockl...@gmail.com wrote: Thanks, If I have time to build trunk I will give it a go. Will the profiling option be in the next milestone release of 2.1? It's already working in 2.1M3, but it'll give you more info in the next milestone -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Wave in a Box
On Sep 9, 5:19 pm, Stefan Bachert stefanbach...@yahoo.de wrote: Google will make a subset of Google Wave as Wave in a Box open source. Does anyone have seen any source code yet? Analyzing the current Wave code looks like Wave consists of a total own but not GWT core widget set. Does some one know more? http://code.google.com/p/wave-protocol/ ? The blip editor is already there. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
UIBinder and event model
Hello, When using UIBinder to tie a piece of html to your widget or panel, the elements you get will not be connected to the event model right? So how could I achieve this? If i have a uibinder file looking something like this: ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' header form fieldset ui:field=fieldset legendSearch/legend input type=search placeholder=Search... / /fieldset /form /header /ui:UiBinder --- And i want to connect a keypressevent to the input tag there, how can I listen to this? Or force gwt compiler to add the event handling mechanisms to the Input tag? If not using UIBinder and extending a FocusWidget for instance it works just like I want it to when using the binder. Regards /David -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: gwt and nokia phones
I think the reason this is happening is that Nokia's browser is not supported in GWT. What's probably happening is the initial selector script which picks the appropriate md5sum.cache.js/html based on the user agent of the browser doesn't understand Nokia's user agent and therefore doesn't know which implementation to pull down. Furthermore, I'm pretty sure that the Nokia browser has very limited support for Javascript. -- Arthur Kalmenson On Sat, Sep 4, 2010 at 2:12 AM, ben fenster fenster@gmail.com wrote: ??? On 3 ספטמבר, 13:38, ben fenster fenster@gmail.com wrote: i wrote a gwt app and it runs on all major desktop browsers and even on the iphone but it wont run on any nokia phones in nokia phone i see a white empty screen -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: IE 7 bug? LayoutPanels cease resizing after first time displayed
When you navigate between the screens are you removing the prior panel? If so then you're probably encountering a bug that I found: http://code.google.com/p/google-web-toolkit/issues/detail?id=5245 You could workaround it by hiding the previous panel instead of removing it. Or you can call forcelayout recursively... On Sep 8, 3:42 pm, mjeffw mjeffwil...@gmail.com wrote: I have an application that contains two screens, both of which are using DockLayoutPanel as their outermost container. The app is using Standards mode, and I am adding the panels to the RootLayoutPanel with code that looks like this: // container is my RootLayoutPanel container.clear(); container.add(dockLayoutPanel); dockLayoutPanel is an instance of a Composite created via the UIBinder; it's topmost element is a DockLayoutPanel: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui g:DockLayoutPanel unit='EM' g:west size='20' ... (remainder elided) Both screens are defined in this same way, but with different contents. I am also using History to manage navigation between the two screens. When the user starts the app, the first screen appears and correctly resizes with the browser window. Then the user click a button that leads him to the second page. At this point, that screen is also resizing properly. Then the user goes back to the first screen using the browser back button. The screen comes up but no longer resizes with the browser window. If the user then navigates back to the second screen, it too is no longer resizing properly. To reproduce this error, I am using IE 7. If I use Safari or Chrome, it seems to work fine. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: dumb / dto domain model
Our model got all the rules for showing elements or not. So a ui element is observing these changes in the model. This is done so we can always validate our model (also on sever) to see if all the needed and calculated values are there. How to solve that in MVP? Will the model than put his changed values/ properties on the bus? I'm thinking in a way to make bindings between domain and view. These binding are than converting and syntax checking the values from the ui elements to the 'typed' data in the model. Is this a good way to go, or do you strongly advise to go another way? I don't want to program my business (showing/not showing fields etc) in the presenter for the ui logic and on the server for model validating. Twice. Regards, Jeroen Wolff On Aug 25, 10:46 pm, John Ivens john.wagner.iv...@gmail.com wrote: Won't the event bus and presenters solve this problem for you? The Model-View-Presenter paradigm? On Wed, Aug 25, 2010 at 11:51 AM, Jeroen Wolff jeroen.wo...@gmail.comwrote: Hi, where are in the middle of designing a big app with a lot off difficult forms. On these forms there will be a lot of questions and based on the results more questions. Also lot of field validation. The current app is a standalone app and the domain model is a big tree with the Observable patterns (property change) If a user is changing a field a lot of other data will than be trigger to change also. Now we want to port is to a web based application, and because with GWT we can write the same model and produce client side the same domain as in the old stand alone app. But.in Ray Ryan's talk about architecting GWT apps for production he said: When you are in a web app, we've encouraged you to make your model, you're so-called model a very simple object. We don't really think that JavaBeans with property change events and that kind of thing work terribly well. We encourage you instead to use more of a DTO for your model portion. The odds are that the object that embodies the things that the users are thinking about is a dumb little bag of properties. Can somebody explain to me why it is not done? Why only DTO's at the client side? The business model lives on the server only than? How can i know and where do i specify what the next step or question or validation is when the user change a value is a form? It would be great to get some help on this design issue. Regard, Jeroen -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
New Website with a huge database using GWT
Hi All, I am planning to start a new website where the consumer and the producer interact directly over the website. I am planning to use GWT for implementing this website. I will be making use of a significantly large MySQL database. Is GWT good enough for such kind of a website? And also what kind of hosting should I go in for if I am using tomcat as my application server? Can someone suggest some nice hosting websites where I can get sufficiently large / unlimited DB space at a very affordable price? Thanks, Rahul -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
how can make the GWT richtextarea auto scroll
i use the GWT richtextarea and i want it to auto scroll to the end every time i add some text or pic ,how can i make it? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Get regular update for long running servlet call.
Hello, We have a SmartGWT application, Few Servlet calls in the application can take around couple of minutes or some times even longer to complete. We need to show the client the progress that is geing made, this is not a progress tool bar but Information logging for e.g. Connection extablished Getting data for User Getting data for User Auth . . . Can some forward me to any article or send me any tips to implement this. In summary, This should allow my GWT to call the Servlet to do an action. This action will take long time. Then this servlet or another servlet must be called every 10 secs to get an update. Those updates must be displayed to the client using SmartGWT/GWT widget. Any help is appreciated. Jatin Bhadra -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to use non standard CSS selectors in a CSSResource
Hello, I am trying to use styles for the scrollbars in webkit. The CSS selectors are looking like this: ::-webkit-scrollbar-corner ::-webkit-scrollbar-track-piece:disabled and so on. When I use those in a ClientBundle as a CSSResource, the compiler is complaining about those selectors. This results in warnings during compile time, not errors. But those styles aren't being applied. I tried to escape the colons, dashes etc. without luck. The literal function doesn't apply here either as it is only used in combination with values, not selectors. I also used the @external annotation to avoid obfuscation of the selectors. Nothing seems to work. Has anyone an idea how to get those styles into my ClientBundle? Greetings, Matthias -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use external JS from GWT?
You are having a timing problem that is common for GWT. Consider how this would work in pure JavaScript. 1. The page loads 2. The external JavaScript files load 3. The page renders 4. Your JavaScript code is called and you make your field alphanumeric. With GWT the order of operations changes. This is because GWT has a bootstrap mechanism they use to load the correct GWT files based on your browser and language. In GWT the order looks like this: 1. The page loads 2. The external JavaScript files load 3. The page renders 4. Your JavaScript code is called 5. GWT JavaScript loads the new HTML page with your JavaScript code 6. GWT calls your onModuleLoad method 7. GWT add the HTML controls to the DOM In your example you are trying to access DOM elements in step six, but they aren't available until step seven. I had a similar problem when I wanted to use the JQuery date picker on a GWT text box. The solution is the onAttach method in com.google.gwt.user.client.ui.Widget. My class looks like this: public class DatePickerTextBox extends TextBox { public DatePickerTextBox(String id) { super(); getElement().setId(id); } public void onAttach() { super.onAttach(); addDatePickerJS(getElement().getId()); } private static native void addDatePickerJS(String id) /*-{ $wnd.$('#' + id).datepicker(); }-*/; } In this case I require the field to have an ID so I can use JQuery to find it. I then wait until the attach happens because I call my JQuery function. Now my order of operations looks like this: 6. GWT calls your onModuleLoad method 7. GWT add the HTML controls to the DOM 8. GWT calls the onAttach method and I call my JavaScript function It is also worth noting that this pattern creates a reusable widget that internalizes all of the JavaScript. Code using this widget has no idea that it is using JavaScript and I could easy replace the implementation without breaking the contract of the control. I hope this helps, Zack -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Newbie:: devmode (same origin policy) with PHP REST backend
Hi All, I am in process of exploring GWT as a potential candidate for my REST based API developed in PHP (served via nginx and php-fpm). The devmode startsup gwt server at port while I have my backend at port 8080. I am trying to use RequestBuilder but I dont want to use *jsonp* since I dont intend to open up my API as of now (fyi .. I tried with jsonp by having a callback argument in the url - didnt work, got a blank response). Obviously I am running into 'same origin policy'. I know once I deploy the GWT app in production I would not run into 'same origin policy' . Is there any robust solution for achieving this? Any help on this would be appreciated. Thanks, -Ketan. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No GWT support found for this system.
OS: MacOS 10.6.4 Eclipse: Eclipse IDE for SOA Developers Version: Helios Release Build id: 20100617-1415 GWT: 2.0.4 I get the following error when attempting to open with windowbuilder editor: No GWT Support found for this system The product can't find support for the OS, OS architecture or windowing system you're using. Please check the prerequisites and if your system matches it, try to re-install product. I've tried reinstallingany ideas? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
looking for GUI
Really hoping for a GWT GUI interface soon. Any ideas on timeline. Starting a big project, and would like to plan... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT and Spring - More Generation Options
In case you missed it, the replay of last week's MyEclipse for Spring 8.6: Generate GWT and Flex Apps in Minutes webinar is now available at http://bit.ly/avsZEj Thanks, Christiana On Aug 26, 3:03 pm, Christiana Thompson christiana.thomp...@gmail.com wrote: Formoreinformation on this topic, please join us for a free webinar on Tuesday, August 31, 2010 at 11:00 AM – 12:00 PM CDT This webinar deep dives into the new Google Web Toolkit (GWT) scaffoldingoptionsthat are available in MyEclipse for Spring 8.6. We’ll cover the following: -- How does it work? See how to quickly generate working GWT applications from existing DB tables, Java Beans and JPA entities in a matter of minutes. -- What gets generated? One of the biggest learning curves is understanding what gets generated – we’ll do a deep dive into the generated artifacts to help users understand what exactly comes out of MyEclipse for Spring. -- How does it compare to other GWT/Flex scaffolding technologies? Register athttps://www2.gotomeeting.com/register/691323002 Attend this webinar if you want to see how MyEclipse for Spring (ME4S) is delivering unprecedented Rich Internet Application scaffoldingoptionsto the Spring Community. For developers who are new to GWT, MyEclipse for Spring 8.6 allows them to quickly create their own contextual examples that they can then reference while getting up to speed on the new technology. Meanwhile, developers who are GWT experts can stop worrying about the boilerplate code, and let MyEclipse for Spring take care of all the mundane, repetitive tasks. All webinar registrants will receive a 30 percent discount off of MyEclipse for Spring – just for registering. Visithttps://www2.gotomeeting.com/register/691323002to register and get your coupon code today. On Aug 11, 1:56 pm, Jack jack.kenn...@gmail.com wrote: MyEclipse For Spring (ME4S) 8.6 is now generally available with support for GWT front endgenerationas well as Spring back endgeneration. We also posted an article on DZone here:http://java.dzone.com/articles/generating-enterprise-class You can download the software and getmoreinformation here:http://www.myeclipseide.com/me4s/ We are anxious to get feedback from the GWT community so please let us know what you think. Thanks, Jack On Jul 12, 3:38 pm, Jack jack.kenn...@gmail.com wrote: Hello Stefan, Thanks for the question. First let me say that I am a fan of the work that is being done by the Roo and GWT teams. Our goal in releasing additional generative tooling forSpringhas always been to give developers additional optionsand capabilities that largely complement the freeoptions available from SpringSource. We have a page that highlights some of the key differences in approach between Roo andMyEclipseforSpringhere:http://www.myeclipseide.com/me4s/faqs/faqs_tool_comparison.php Specific to GWT, the most important difference for developers to consider is the GWT version. ME4S supports GWT 2.0.x which is the current GA version and is based on the best practices presentation from Ray Ryan at Google I/O 2009. You can find that presentation here:http://www.youtube.com/watch?v=PDuhR18-EdM The Roo integration for GWT is targeted at GWT 2.1 which looks to be a great set of additions to GWT, however it is still a work in progress. Most of the low level variances in the code that is generated reflect the difference in GWT version supported. Another difference is that ME4S generates code that does not use separate aspect files or design time annotations . Our goal is to generate reusable software components from your existing technology assets like RDBMS tables, WSDL Documents, POJO's or Entities as quickly as possible giving youoptionsas to which project, source folder, and package you would like the generated code to go into. You can review videos of the GWT and other scaffoldingoptionsfrom ME4S in action here:http://www.youtube.com/user/myeclipseforspring Finally, we have an option to let you generate JUST the GWT front end and Service stub without requiring the use of any specific back end implementation includingSpring. ME4S can start from your existing Java code, WSDL, or RDBMS definition and generate reusable GWT front end components that are tied to your data model and which follow a strong MVP / Command pattern. These components can be mixed and matched together to buildmorecomplicated downstream applications that go beyond CRUD. The Remote Services are stubbed out to allow you to integrate with the server side technology of your choice, or you can accept the defaults and let ME4S build out a layered CRUD backend that includes JPA Entities, DAO’s, and Services all wired up usingSpring. I hope this helps, but let me know if you would like to havemore detail. Thanks Jack Kennedy Skyway Software On Jul
Re: GWT Newbie:: devmode (same origin policy) with PHP REST backend
Are you familiar with the -noserver option? Check it out http://code.google.com/webtoolkit/doc/latest/FAQ_DebuggingAndCompiling.html#How_do_I_use_my_own_server_in_hosted_mode_instead_of_GWT%27s On Thu, Sep 9, 2010 at 11:00 AM, Ketan Shah ketan.s...@gmail.com wrote: Hi All, I am in process of exploring GWT as a potential candidate for my REST based API developed in PHP (served via nginx and php-fpm). The devmode startsup gwt server at port while I have my backend at port 8080. I am trying to use RequestBuilder but I dont want to use *jsonp* since I dont intend to open up my API as of now (fyi .. I tried with jsonp by having a callback argument in the url - didnt work, got a blank response). Obviously I am running into 'same origin policy'. I know once I deploy the GWT app in production I would not run into 'same origin policy' . Is there any robust solution for achieving this? Any help on this would be appreciated. Thanks, -Ketan. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: IE 7 bug? LayoutPanels cease resizing after first time displayed
Indeed, I am doing a container.clear() then container.add(panel). I will try to hide and show instead. Thanks! On Sep 9, 1:53 pm, Paul Smith paulbsm...@gmail.com wrote: When you navigate between the screens are you removing the prior panel? If so then you're probably encountering a bug that I found:http://code.google.com/p/google-web-toolkit/issues/detail?id=5245 You could workaround it by hiding the previous panel instead of removing it. Or you can call forcelayout recursively... On Sep 8, 3:42 pm, mjeffw mjeffwil...@gmail.com wrote: I have an application that contains two screens, both of which are using DockLayoutPanel as their outermost container. The app is using Standards mode, and I am adding the panels to the RootLayoutPanel with code that looks like this: // container is my RootLayoutPanel container.clear(); container.add(dockLayoutPanel); dockLayoutPanel is an instance of a Composite created via the UIBinder; it's topmost element is a DockLayoutPanel: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui g:DockLayoutPanel unit='EM' g:west size='20' ... (remainder elided) Both screens are defined in this same way, but with different contents. I am also using History to manage navigation between the two screens. When the user starts the app, the first screen appears and correctly resizes with the browser window. Then the user click a button that leads him to the second page. At this point, that screen is also resizing properly. Then the user goes back to the first screen using the browser back button. The screen comes up but no longer resizes with the browser window. If the user then navigates back to the second screen, it too is no longer resizing properly. To reproduce this error, I am using IE 7. If I use Safari or Chrome, it seems to work fine. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: New Website with a huge database using GWT
I think that anything you can do in javascript, GWT can do it better... the alternative is server-side-only.. but we all like ajax 2010/9/9 Rahul Vijay rahul.vija...@gmail.com Hi All, I am planning to start a new website where the consumer and the producer interact directly over the website. I am planning to use GWT for implementing this website. I will be making use of a significantly large MySQL database. Is GWT good enough for such kind of a website? And also what kind of hosting should I go in for if I am using tomcat as my application server? Can someone suggest some nice hosting websites where I can get sufficiently large / unlimited DB space at a very affordable price? Thanks, Rahul -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use external JS from GWT?
Thanks Zack ;) In your example, where and how do you include the jQuery UI datepicker widget? (I tried in UiBinder .ui.xml files, but didn't work for me with script src=.. /) Marius On Sep 9, 2:53 pm, Zack Grossbart zgrossb...@gmail.com wrote: You are having a timing problem that is common for GWT. Consider how this would work in pure JavaScript. 1. The page loads 2. The external JavaScript files load 3. The page renders 4. Your JavaScript code is called and you make your field alphanumeric. With GWT the order of operations changes. This is because GWT has a bootstrap mechanism they use to load the correct GWT files based on your browser and language. In GWT the order looks like this: 1. The page loads 2. The external JavaScript files load 3. The page renders 4. Your JavaScript code is called 5. GWT JavaScript loads the new HTML page with your JavaScript code 6. GWT calls your onModuleLoad method 7. GWT add the HTML controls to the DOM In your example you are trying to access DOM elements in step six, but they aren't available until step seven. I had a similar problem when I wanted to use the JQuery date picker on a GWT text box. The solution is the onAttach method in com.google.gwt.user.client.ui.Widget. My class looks like this: public class DatePickerTextBox extends TextBox { public DatePickerTextBox(String id) { super(); getElement().setId(id); } public void onAttach() { super.onAttach(); addDatePickerJS(getElement().getId()); } private static native void addDatePickerJS(String id) /*-{ $wnd.$('#' + id).datepicker(); }-*/; } In this case I require the field to have an ID so I can use JQuery to find it. I then wait until the attach happens because I call my JQuery function. Now my order of operations looks like this: 6. GWT calls your onModuleLoad method 7. GWT add the HTML controls to the DOM 8. GWT calls the onAttach method and I call my JavaScript function It is also worth noting that this pattern creates a reusable widget that internalizes all of the JavaScript. Code using this widget has no idea that it is using JavaScript and I could easy replace the implementation without breaking the contract of the control. I hope this helps, Zack -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT RPC offline caching
Thanks for your hints, guys. Here is my solution: -- OfflineRequestCallback: used to get serialized response and handle it appropriately. public class OfflineRequestCallback implements RequestCallback { // This String we can save in localStorage. private static String serializedResponse; private RequestCallback callback; public OfflineRequestCallback(RequestCallback callback) { this.callback = callback; } @Override public void onResponseReceived(Request request, Response response) { if (response.getStatusCode() == 200) { serializedResponse = response.getText(); callback.onResponseReceived(request, response); } else { callback.onResponseReceived(request, getOldResponse()); } } @Override public void onError(Request request, Throwable exception) { callback.onResponseReceived(request, getOldResponse()); } private Response getOldResponse() { return new Response() { @Override public String getText() { return serializedResponse; } @Override public String getStatusText() { return null; } @Override public int getStatusCode() { return 200; } @Override public String getHeadersAsString() { return null; } @Override public Header[] getHeaders() { return null; } @Override public String getHeader(String header) { return null; } }; } } -- OfflineRequestBuilder: uses OfflineRequestCallback as a wrapper class. public class OfflineRequestBuilder extends RequestBuilder { public OfflineRequestBuilder(Method httpMethod, String url) { super(httpMethod, url); } @Override public Request send() throws RequestException { String requestData = super.getRequestData(); OfflineRequestCallback requestCallbackWrapper = new OfflineRequestCallback( super.getCallback()); return super.sendRequest(requestData, requestCallbackWrapper); } } -- Client code: ... private final TestServiceAsync testService = GWT.create(TestService.class); public void onModuleLoad() { ... RpcRequestBuilder builder = new RpcRequestBuilder() { @Override protected RequestBuilder doCreate(String serviceEntryPoint) { return new OfflineRequestBuilder(RequestBuilder.POST, ((ServiceDefTarget) testService).getServiceEntryPoint()); } }; ((ServiceDefTarget) testService).setRpcRequestBuilder(builder); ... // RPC call testService.serviceFunction(param, callback); } Regards, Alex -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to use an obfuscated css selector in a css file in a depending project
I've asked this on Stack Overflow, but noone seems to know: http://stackoverflow.com/questions/3612146/use-obfusticated-css-name-from-clientbundle-in-down-stream-css I've got a library with some CSS, and a depending project that expands on the CSS. I'm trying to move both of them to ClientBundle. Currently, library.css is: .smallWindow { min-width: 10px; outline: none; } And depProject.css is: .sectionA .smallWindow { color: blue; } I moved library.css and depProject.css into ClientBundles (LibraryBundle and DepProjectBundle) in their respective projects, but had to mark smallWindow as external in both. Is there a way to link smallWindow in depProject.css to smallWindow in library.css and still have smallWindow be obfusticated? I'm hoping that instead of marking @external .smallWindow I could leave it alone in library.css, and put something like @replaceWithObfusticated smallWindow DepProjectBundle.css.smallWindow at the top of depProject.css -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Development Mode UI - Not Updating Startup URL
Hi, I have created two GWT projects in Eclipse using the GWT Eclipse and m2eclipse plugins. For each I have a run configuration set up that does mvn clean compile gwt:run which starts up the GWT Development Mode UI. The Startup URL in the UI for both applications is the same, which happens to be for the first project I created. It appears the URL is being cached somewhere and I don't know how to clear it. Any thoughts? 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use external JS from GWT?
In your example, where and how do you include the jQuery UI datepicker widget? I defined them in the HTML file containing my GWT code. Just a simple JavaScript reference the same way I would in any other HTML page. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JSNI Reserved Word ?
Hello People, i trying to call the export Method from a library through JSNI like follow public final native String export(String type) -{ return this.export(type); }-;*/ but i m getting an error missing name after . operator. is the export word reserved in JSNI ? Greets E -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Variable UI
I think you are making thins too complicated. What are you doing with so many images? Browsers can do client-side scaling of images for you if you use the img tag (background image scaling is coming in CSS3). It seems like you are a thick client developer and don't have much experience with web development, am I correct. When doing textures and gradients for web development you usually make something that can be repeated. Also, if you can select a CSS3 compatible browser you can use gradients and rounded corners built in so you don't even need images for those. If you must do image generation real time some cool stuff has come out with SVG lately(http:// raphaeljs.com/). Dealing with an HTML UI is a much different mindset from thick clients. In thick clients you have to tell it exactly what to do, in HTML you describe what you want it to do and it will handle the layout and such real time. So I guess for more targeted help please describe what the purpose of the majority of your images are and why you believe you need to generate them real time on the server. On Sep 9, 9:13 am, pete bobobo...@hotmail.com wrote: Hmm, I guess I was stupid, I should just use a service to dynamically create images of the right size on the server-side and flush them to the client, then I have variable resizing and can use 100% size in the browser, right? (sorry, I'm not too experienced in programming web- apps) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Translating already compiled Java?
I have been battling this issue for a while and the solution really depends on your architecture. The question is are they truly POJOs or do they have JAXB annotations? If they have JAXB annotations GWT will blow up, if not you can trick the GWT compiler into letting you use an external library, but you will also need a jar with the source in the classpath of the GWT compile too. Lets assume the following package structure: POJOs: // you will need your ejb jar and a jar that contains the source, but the source is only needed for the ejb compilation(you might even be able to get away with just pointing to the src dir in the classpath of the compile) com.example.ejb.entity GWT: com.example.gwt EntryPointModule.gwt.xml // include com.example.ejb.PojoResourceModule com.example.ejb PojoResourceModule.gwt.xml // add this file to allow you to include the pojos as a module, this should have sourceentity/source On Sep 8, 3:56 am, Gary Madden garymad...@gmail.com wrote: Hello, Sorry if this is a silly question but I was wondering whether it's possible to get the GWT compiler to translate already compiled Java code into JavaScript? I know that you can specify Java source code to translate using the source elements in the XML module file. The reason is, I have a JAR that is generated from a WSDL. My GWT web app makes SOAP requests using this JAR. There is a problem in that I have to write a lot of classes at the moment that basically replicate the POJOs in the JAR just so they can be used in GWT. This may lead to bugs where not all the fields are properly set from the SOAP objects. In fact, I've already found and fixed quite a few bugs relating to this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to get HTTP Response headers?
Does the silence mean this is impossible? Or just very difficult? MG On Sep 8, 8:45 pm, ussuri michael.glas...@gmail.com wrote: Hello! I can't figure out how I can get HTTP Response header. In com.google.gwt.http.client.RequestCallback.onResponseReceived() method (a callback from RequestBuilder) there is a Response parameter that has getHeder() and getHeaders() methods, but these always return empty strings or nulls. FireBug shows that the headers are there, but I can't get them in GWT... THanks, MG -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Adding Event Handlers on the body element...
You can try something like this: Event.addNativePreviewHandler(new NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { int KEY_F8 = 119; if (keyup.equals(event.getNativeEvent().getType()) event.getNativeEvent().getKeyCode() == KEY_F8) { // do something onkeyup f8 } } }); On Aug 6, 8:45 pm, seth.ho...@gmail.com seth.ho...@gmail.com wrote: Hello, I'm using GWT for 2 years now and i did many great things with it. However, i'm still looking for how to implements KeyboardHandlers on the BodyElement. The only way i found is writing something like this in the HTML file : bodyonkeypress=return keyPress(event); onkeydown=returnkeyDown(event); onkeyup=return keyUp(event); And something like that in the EntryPoint public void onModuleLoad() { // publish();} private native final void publish() /*-{ $wnd[keyPress] = function(event) { @webapp.client.Application::keyPress(Lcom/google/gwt/dom/client/ NativeEvent;)(event); } $wnd[keyUp] = function(event) { @webapp.client.Application::keyUp(Lcom/google/gwt/dom/client/ NativeEvent;)(event); } $wnd[keyDown] = function(event) { @webapp.client.Application::keyDown(Lcom/google/gwt/dom/client/ NativeEvent;)(event); } }-*/; But i'm really not satisfied with that solution. Any ideas please ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Variable UI
This one app is a card game, with approx. some hundred cards when fully designed. So each card has a small image shown in the UI (dragable, if possible 2 rows a 5 small cards independent of the resolution) and on click shows a popup with the full image including card description. Furthermore 5 small views of stacks to the left on top of each other, which mainly consist of smaller versions of the same cards. The popups from the small stacks are the same images in different sizes once again... I created widgets for this card type, to take care of presenting the small image with possibility to display the full one, etc. Furthermore options to automatically scale the card to a certain height (by using the setHeight() , setWidth() methods). It all works, once the browser was refreshed. I also dynamically create the playfield, left an area for card stacks, right side a play field with drag and drop support. But even the play area is not proportioned correctly until refresh... (I set 1/5 percentage of Window.getClientWidth() for the card stack area) The caching of the images is right now to present each card image once on the screen, cause I only know that way to cache the images in the browser (since ImageBundle doesn't work for my case I guess...). So I have a timer running switching through every possible card with a certain speed low enough to show the cards on screen... So this all together is everything but satisfying... For the cards I either need different resolutions on the server, so I can adjust to the client window size, or I have to create them dynamically... I want this to run on the GAE for now, so the more work the client does, the better, right? (With respect to quotas) Anyway, I really appreciate your help :-) You're quite right that I don't have much experience in web development ;-) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to get HTTP Response headers?
Works fine for me: @Override public void onResponseReceived(Request request, Response response) { String toPop = ; for (Header header:response.getHeaders()) toPop += header.getName() + : + header.getValue() + \n; Window.alert(toPop); } pops up: X-Powered-By: Servlet/3.0 Server: GlassFish Server Open Source Edition 3.0.1 Content-Type: application/json Transfer-Encoding: chunked Date: Thu, 09 Sep 2010 23:46:05 GMT On Sep 9, 5:07 pm, ussuri michael.glas...@gmail.com wrote: Does the silence mean this is impossible? Or just very difficult? MG On Sep 8, 8:45 pm, ussuri michael.glas...@gmail.com wrote: Hello! I can't figure out how I can get HTTP Response header. In com.google.gwt.http.client.RequestCallback.onResponseReceived() method (a callback from RequestBuilder) there is a Response parameter that has getHeder() and getHeaders() methods, but these always return empty strings or nulls. FireBug shows that the headers are there, but I can't get them in GWT... THanks, MG -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Adding Event Handlers on the body element...
Similarly you should probably also check the type. and you could emulate the normal handler style of the rest of the GWT architecture. Event.addNativePreviewHandler(new NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { NativeEvent ne = event.getNativeEvent(); if (KeyDownEvent.getType().getName().equals(ne.getType())) System.out.println(Yipeee!); } }); On Sep 9, 5:11 pm, Carlos Aguayo carlos.agu...@gmail.com wrote: You can try something like this: Event.addNativePreviewHandler(new NativePreviewHandler() { @Override public void onPreviewNativeEvent(NativePreviewEvent event) { int KEY_F8 = 119; if (keyup.equals(event.getNativeEvent().getType()) event.getNativeEvent().getKeyCode() == KEY_F8) { // do something onkeyup f8 } } }); On Aug 6, 8:45 pm, seth.ho...@gmail.com seth.ho...@gmail.com wrote: Hello, I'm using GWT for 2 years now and i did many great things with it. However, i'm still looking for how to implements KeyboardHandlers on the BodyElement. The only way i found is writing something like this in the HTML file : bodyonkeypress=return keyPress(event); onkeydown=returnkeyDown(event); onkeyup=return keyUp(event); And something like that in the EntryPoint public void onModuleLoad() { // publish();} private native final void publish() /*-{ $wnd[keyPress] = function(event) { @webapp.client.Application::keyPress(Lcom/google/gwt/dom/client/ NativeEvent;)(event); } $wnd[keyUp] = function(event) { @webapp.client.Application::keyUp(Lcom/google/gwt/dom/client/ NativeEvent;)(event); } $wnd[keyDown] = function(event) { @webapp.client.Application::keyDown(Lcom/google/gwt/dom/client/ NativeEvent;)(event); } }-*/; But i'm really not satisfied with that solution. Any ideas please ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Variable UI
What you are describing is very similar to worldofsolitaire.com. I suggest that you play around with it for a bit and use firebug to inspect how he does things in html. I believe he is using just one image for each card and letting the browser scale it. This way you only need one image for each card and you just let the browser handle the sizing. He is also doing some stuff that I have had difficulty getting to work in the past, but is a necessity with such an application. You need to be able to sense both when the browser resizes(easy) or when the layout is changed on the screen(more difficult as this requires you to set up your own eventing for whenever the size of anything changes and therefore becomes very heavy). I do however believe you will be able to get away with just one set of cards letting the browser resize it for you. Like I said in order to do so you will need to use the img tag, therefore ImageBundle is not a good solution because it creates an image with the background therefore not allowing for client side resizing. Firebug is your friend with GWT development, so if you aren't sure what the Java code is producing inspect it with firebug and make sure it's what you want. On Sep 9, 5:46 pm, pete bobobo...@hotmail.com wrote: This one app is a card game, with approx. some hundred cards when fully designed. So each card has a small image shown in the UI (dragable, if possible 2 rows a 5 small cards independent of the resolution) and on click shows a popup with the full image including card description. Furthermore 5 small views of stacks to the left on top of each other, which mainly consist of smaller versions of the same cards. The popups from the small stacks are the same images in different sizes once again... I created widgets for this card type, to take care of presenting the small image with possibility to display the full one, etc. Furthermore options to automatically scale the card to a certain height (by using the setHeight() , setWidth() methods). It all works, once the browser was refreshed. I also dynamically create the playfield, left an area for card stacks, right side a play field with drag and drop support. But even the play area is not proportioned correctly until refresh... (I set 1/5 percentage of Window.getClientWidth() for the card stack area) The caching of the images is right now to present each card image once on the screen, cause I only know that way to cache the images in the browser (since ImageBundle doesn't work for my case I guess...). So I have a timer running switching through every possible card with a certain speed low enough to show the cards on screen... So this all together is everything but satisfying... For the cards I either need different resolutions on the server, so I can adjust to the client window size, or I have to create them dynamically... I want this to run on the GAE for now, so the more work the client does, the better, right? (With respect to quotas) Anyway, I really appreciate your help :-) You're quite right that I don't have much experience in web development ;-) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: New Website with a huge database using GWT
Hi gal, Thanks for that. Does anyone know some nice hosting service providers who would provide tomcat hosting? ~ Rahul On Fri, Sep 10, 2010 at 1:16 AM, Gal Dolber gal.dol...@gmail.com wrote: I think that anything you can do in javascript, GWT can do it better... the alternative is server-side-only.. but we all like ajax 2010/9/9 Rahul Vijay rahul.vija...@gmail.com Hi All, I am planning to start a new website where the consumer and the producer interact directly over the website. I am planning to use GWT for implementing this website. I will be making use of a significantly large MySQL database. Is GWT good enough for such kind of a website? And also what kind of hosting should I go in for if I am using tomcat as my application server? Can someone suggest some nice hosting websites where I can get sufficiently large / unlimited DB space at a very affordable price? Thanks, Rahul -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
The Compiler is Compiling Only One Permutation
I am trying to compile all 5 permutation for my GWT App. For some reason it is only compiling 1. I've tried with the following line in my .gwt.xml and without the line. set-property name=user.agent value=''ie6,gecko,gecko1_8,safari,opera / I'm using Eclipse Galileo with Eclipse Plugin 3.5 Thanks, Daniel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] [conference]
For info, I'll speak at JugSummerCamp http://www.jugsummercamp.org/ conference tomorrow on GWT 2. Long live GWT :D Nicolas -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] [conference]
Allez Nicolas! Le 9 septembre 2010 09:18, nicolas de loof nicolas.del...@gmail.com a écrit : For info, I'll speak at JugSummerCamp http://www.jugsummercamp.org/ conference tomorrow on GWT 2. Long live GWT :D Nicolas -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] incubator and compatability with gwt 2.1
There isn't one. Incubator is dead. On Thu, Sep 9, 2010 at 7:10 AM, Cameron Braid came...@braid.com.au wrote: What is the plan to bring incubator into compatability with gwt 2.1 ? Cheers Cameron -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8737 committed - Fix bug 2822942 Remove calls to System.currentTimeMillis in tests...
Revision: 8737 Author: zh...@google.com Date: Thu Sep 9 05:17:25 2010 Log: Fix bug 2822942 Remove calls to System.currentTimeMillis in tests Review at http://gwt-code-reviews.appspot.com/849801 http://code.google.com/p/google-web-toolkit/source/detail?r=8737 Modified: /trunk/user/test/com/google/gwt/emultest/java/sql/SqlDateTest.java /trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimeTest.java /trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java === --- /trunk/user/test/com/google/gwt/emultest/java/sql/SqlDateTest.java Tue Jun 23 16:19:42 2009 +++ /trunk/user/test/com/google/gwt/emultest/java/sql/SqlDateTest.java Thu Sep 9 05:17:25 2010 @@ -36,7 +36,7 @@ } public void testInternalPrecision() { -long millis = System.currentTimeMillis(); +long millis = 1283895273475L; Date now = new Date(millis); Date after = new Date(now.getTime() + 1); Date before = new Date(now.getTime() - 1); === --- /trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimeTest.java Tue Oct 28 11:27:54 2008 +++ /trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimeTest.java Thu Sep 9 05:17:25 2010 @@ -124,7 +124,7 @@ } public void testInternalPrecision() { -long millis = System.currentTimeMillis(); +long millis = 1283895273475L; Time today = new Time(millis); Time after = new Time(today.getTime() + 1); Time before = new Time(today.getTime() - 1); === --- /trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java Wed Jul 7 04:47:08 2010 +++ /trunk/user/test/com/google/gwt/emultest/java/sql/SqlTimestampTest.java Thu Sep 9 05:17:25 2010 @@ -41,36 +41,13 @@ * dates. */ public void testDateComparison() { -long now = System.currentTimeMillis(); -Date d = new Date(now); - -Timestamp t = new Timestamp(d.getTime()); -if (now % 1000 == 0) { - t.setNanos(101); -} else { - t.setNanos(1); -} - -// Timestamps are stored at second-level precision -Date d2 = new Date(t.getTime()); - -assertFalse(d.equals(t), d.equals(t)); -assertEquals(d2, t, d2, t); -assertEquals(hashcode, d2.hashCode(), t.hashCode()); -assertFalse(t.equals(d2), t.equals(d2)); - -// t is later then d2 by some number of nanoseconds -assertEquals(1, t.compareTo(d2)); - -Timestamp t2 = new Timestamp(d.getTime()); -t2.setNanos(t.getNanos() + 1); - -assertFalse(t.equals(t2), t.equals(t2)); -assertEquals(hashcode2, t.hashCode(), t2.hashCode()); +/* Consider two cases, whether or not the time is a multiple of 1000 */ +testDateComparisonOneValue(1283895274000L); +testDateComparisonOneValue(1283895273475L); } public void testNanosAffectTime() { -long now = System.currentTimeMillis(); +long now = 1283895273475L; int millis = (int) (now % 1000); Timestamp t = new Timestamp(now); @@ -85,7 +62,7 @@ } public void testNanosComparison() { -long now = System.currentTimeMillis(); +long now = 1283895273475L; Timestamp t = new Timestamp(now); t.setNanos(0); @@ -107,7 +84,7 @@ } public void testNanosRange() { -long now = System.currentTimeMillis(); +long now = 1283895273475L; Timestamp t = new Timestamp(now); assertEquals(now, t.getTime()); @@ -134,7 +111,7 @@ public void testTimeAffectsNanos() { // A value 5 millis past the current second -long now = (System.currentTimeMillis() / 1000) * 1000 + 5; +long now = 1283895273005L; // (1283895273475 / 1000) * 1000 + 5; Timestamp t = new Timestamp(now); assertEquals(500, t.getNanos()); @@ -202,4 +179,32 @@ expected = new Timestamp(2000 - 1900, 1 - 1, 1, 12, 34, 56, 123456780); actual = Timestamp.valueOf(2000-01-01 12:34:56.12345678); } -} + + private void testDateComparisonOneValue(long value) { +Date d = new Date(value); + +Timestamp t = new Timestamp(d.getTime()); +if (value % 1000 == 0) { + t.setNanos(101); +} else { + t.setNanos(1); +} + +// Timestamps are stored at second-level precision +Date d2 = new Date(t.getTime()); + +assertFalse(d.equals(t), d.equals(t)); +assertEquals(d2, t, d2, t); +assertEquals(hashcode, d2.hashCode(), t.hashCode()); +assertFalse(t.equals(d2), t.equals(d2)); + +// t is later then d2 by some number of nanoseconds +assertEquals(1, t.compareTo(d2)); + +Timestamp t2 = new Timestamp(d.getTime()); +t2.setNanos(t.getNanos() + 1); + +assertFalse(t.equals(t2), t.equals(t2)); +assertEquals(hashcode2, t.hashCode(), t2.hashCode()); + } +} -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adds dual key (type + source) handler binding to EventBus. (issue841804)
Reviewers: bobv, jlabanca, Description: Adds dual key (type + source) handler binding to EventBus. RequestFactory sets the class of a proxy type as the source for EntityProxyChange events, so that subscribers can still listen for events only of specific proxy types. It is no longer necessary for a RequestFactory user to define their own change event types. Renames EntityProxyChange event to better follow convention. Refactors HandlerManager.HandlerRegistry into a new public class, SimpleEventBus. MultiFire, default source stamping, and event recycling are left as features of HandlerManager. HandlerManager no longer implements EventBus interface, in the interest of less confusing API for EventBus users. The subscription mechanism for EntityProxyChange event is not type safe. I should probably add a general typed event mechanism to EventBus, but in the interest of time will probably instead follow up with a static register method on EntityProxyChange. Please review this at http://gwt-code-reviews.appspot.com/841804/show Affected files: M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/FavoritesManager.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java D samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/AddressProxyChanged.java D samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/PersonProxyChanged.java M samples/expenses/pom.xml M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseList.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/Expenses.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobile.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobileShell.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseDetails.java D samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeProxyChanged.java D samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseProxyChanged.java D samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportProxyChanged.java M user/src/com/google/gwt/app/place/StopperedEventBus.java M user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java A user/src/com/google/gwt/event/shared/AbstractEventBus.java M user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java M user/src/com/google/gwt/event/shared/EventBus.java M user/src/com/google/gwt/event/shared/HandlerManager.java M user/src/com/google/gwt/event/shared/HasHandlers.java A user/src/com/google/gwt/event/shared/SimpleEventBus.java M user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java M user/src/com/google/gwt/requestfactory/client/impl/ProxySchema.java M user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java M user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java A user/src/com/google/gwt/requestfactory/shared/EntityProxyChange.java D user/src/com/google/gwt/requestfactory/shared/EntityProxyChangedEvent.java D user/src/com/google/gwt/requestfactory/shared/UserInformationProxyChanged.java M user/test/com/google/gwt/app/place/AbstractPlaceHistoryHandlerTest.java M user/test/com/google/gwt/app/place/ActivityManagerTest.java M user/test/com/google/gwt/app/place/PlaceControllerTest.java M user/test/com/google/gwt/event/EventSuite.java M user/test/com/google/gwt/event/logical/shared/LogicalEventsTest.java A user/test/com/google/gwt/event/shared/CountingEventBus.java M user/test/com/google/gwt/event/shared/HandlerManagerTest.java A user/test/com/google/gwt/event/shared/SimpleEventBusTest.java M user/test/com/google/gwt/requestfactory/client/EditorTest.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java M user/test/com/google/gwt/requestfactory/client/impl/EntityProxyIdImplTest.java M user/test/com/google/gwt/requestfactory/client/impl/SimpleBazProxyImpl.java D user/test/com/google/gwt/requestfactory/shared/SimpleBarProxyChanged.java D user/test/com/google/gwt/requestfactory/shared/SimpleFooProxyChanged.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Uibinder parser api
On Sep 9, 1:45 pm, Konstantin.Scheglov konstantin.scheg...@gmail.com wrote: If anyone wants to submit a patch to make it possible to subclass UiBinderGenerator and tweak its parsers that way, s.t. you can provide an alternative replace-with rule for your custom subclass, I'd be in favor of that. Presuming Joel doesn't shoot me down. Hm... Replacing UiBinderGenerator means that at same time only one replacement can be used. So, for example if I use some widgets toolkit and it provides generator for its widgets, then I can not use generator of second toolkit. If you weren't dumbing down to Java 5, I'd suggest using java.util.ServiceLoader to simply load plugins from the classpath: http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html But sure it could be done with a new element in gwt.xml module descriptors. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Uibinder parser api
It's not about the lack of a plugin mechanism, it's about discomfort with an api that requires people to emit lines of java too much, and lack of time to clean it up. On Thu, Sep 9, 2010 at 9:22 AM, Thomas Broyer t.bro...@gmail.com wrote: On Sep 9, 1:45 pm, Konstantin.Scheglov konstantin.scheg...@gmail.com wrote: If anyone wants to submit a patch to make it possible to subclass UiBinderGenerator and tweak its parsers that way, s.t. you can provide an alternative replace-with rule for your custom subclass, I'd be in favor of that. Presuming Joel doesn't shoot me down. Hm... Replacing UiBinderGenerator means that at same time only one replacement can be used. So, for example if I use some widgets toolkit and it provides generator for its widgets, then I can not use generator of second toolkit. If you weren't dumbing down to Java 5, I'd suggest using java.util.ServiceLoader to simply load plugins from the classpath: http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html But sure it could be done with a new element in gwt.xml module descriptors. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adds a cheesey uncaught exception handler to DynaTableRF. (issue832802)
Reviewers: bobv, Description: Adds a cheesey uncaught exception handler to DynaTableRF. Please review this at http://gwt-code-reviews.appspot.com/832802/show Affected files: M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java Index: samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java === --- samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java (revision 8737) +++ samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java (working copy) @@ -17,6 +17,7 @@ import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.GWT.UncaughtExceptionHandler; import com.google.gwt.event.shared.EventBus; import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.sample.dynatablerf.client.widgets.DayFilterWidget; @@ -25,17 +26,21 @@ import com.google.gwt.sample.dynatablerf.shared.DynaTableRequestFactory; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.RootLayoutPanel; import com.google.gwt.user.client.ui.Widget; +import java.util.logging.Level; +import java.util.logging.Logger; /** * The entry point class which performs the initial loading of the DynaTableRf * application. */ public class DynaTableRf implements EntryPoint { - interface Binder extends UiBinderWidget, DynaTableRf { } + + private static final Logger log = Logger.getLogger(DynaTableRf.class.getName()); @UiField(provided = true) SummaryWidget calendar; @@ -49,6 +54,12 @@ DayFilterWidget filter; public void onModuleLoad() { +GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + public void onUncaughtException(Throwable e) { +Window.alert(Error: + e.getMessage()); +log.log(Level.SEVERE, e.getMessage(), e); + } +}); DynaTableRequestFactory requests = GWT.create(DynaTableRequestFactory.class); requests.init(eventBus); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adds a cheesey uncaught exception handler to DynaTableRF. (issue832802)
LGTM http://gwt-code-reviews.appspot.com/832802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Converts two new files from dos EOL format to unix EOL format. (issue854801)
Reviewers: kjin, Description: Converts two new files from dos EOL format to unix EOL format. Review by: k...@google.com Please review this at http://gwt-code-reviews.appspot.com/854801/show Affected files: M user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorGenerator.java M user/src/com/google/gwt/validation/rebind/ValidatorGenerator.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Converts two new files from dos EOL format to unix EOL format. (issue854801)
LGTM http://gwt-code-reviews.appspot.com/854801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adds dual key (type + source) handler binding to EventBus. (issue841804)
http://gwt-code-reviews.appspot.com/841804/diff/1/4 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/4#newcode185 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java:185: void onSelectionChange(@SuppressWarnings(unused) SelectionChangeEvent event) { Unnecessary warning. http://gwt-code-reviews.appspot.com/841804/diff/1/7 File samples/expenses/pom.xml (right): http://gwt-code-reviews.appspot.com/841804/diff/1/7#newcode10 samples/expenses/pom.xml:10: roo.version1.1.0.M4/roo.version Related? http://gwt-code-reviews.appspot.com/841804/diff/1/18 File user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/18#newcode106 user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java:106: @SuppressWarnings({unchecked, rawtypes}) My eclipse does not know about this warning, and therefore will display a warning. http://gwt-code-reviews.appspot.com/841804/diff/1/19 File user/src/com/google/gwt/event/shared/AbstractEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/19#newcode1 user/src/com/google/gwt/event/shared/AbstractEventBus.java:1: package com.google.gwt.event.shared; Copyright? http://gwt-code-reviews.appspot.com/841804/diff/1/19#newcode8 user/src/com/google/gwt/event/shared/AbstractEventBus.java:8: public abstract class AbstractEventBus implements EventBus { Declare unimplemented methods as abstsract so subclasses can use @Override in 1.5 language. http://gwt-code-reviews.appspot.com/841804/diff/1/21 File user/src/com/google/gwt/event/shared/EventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/21#newcode19 user/src/com/google/gwt/event/shared/EventBus.java:19: * Implemented by objects that dispatch {...@link GwtEvent}s. Add a comment about global nomenclature. It's not actually global between instances of an EventBus, is it? http://gwt-code-reviews.appspot.com/841804/diff/1/21#newcode40 user/src/com/google/gwt/event/shared/EventBus.java:40: * . Dangling period. http://gwt-code-reviews.appspot.com/841804/diff/1/21#newcode66 user/src/com/google/gwt/event/shared/EventBus.java:66: * source means that this is a global handler, which shouldreceive all events should receive http://gwt-code-reviews.appspot.com/841804/diff/1/25 File user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/25#newcode123 user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java:123: Extra whitespace. http://gwt-code-reviews.appspot.com/841804/diff/1/26 File user/src/com/google/gwt/requestfactory/client/impl/ProxySchema.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/26#newcode67 user/src/com/google/gwt/requestfactory/client/impl/ProxySchema.java:67: // Relying on generated code to call only with correct type Can you add an assertion to that effect? http://gwt-code-reviews.appspot.com/841804/diff/1/28 File user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/28#newcode308 user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java:308: method.getName(), interfaceType.getName())); Who isn't running their formatter? http://gwt-code-reviews.appspot.com/841804/diff/1/29 File user/src/com/google/gwt/requestfactory/shared/EntityProxyChange.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/29#newcode55 user/src/com/google/gwt/requestfactory/shared/EntityProxyChange.java:55: TYPE = new TypeEntityProxyChange.Handler?(); The rest of the events eagerly initialize the TYPE field so that the field reference will inline at the locations where the handlers are added. http://gwt-code-reviews.appspot.com/841804/diff/1/29#newcode69 user/src/com/google/gwt/requestfactory/shared/EntityProxyChange.java:69: @SuppressWarnings({unchecked, rawtypes}) rawtypes? http://gwt-code-reviews.appspot.com/841804/diff/1/29#newcode71 user/src/com/google/gwt/requestfactory/shared/EntityProxyChange.java:71: public com.google.gwt.event.shared.GwtEvent.TypeHandlerP getAssociatedType() { Use shorter type name here? http://gwt-code-reviews.appspot.com/841804/diff/1/29#newcode73 user/src/com/google/gwt/requestfactory/shared/EntityProxyChange.java:73: // field itself does not, so we have to do an unsafe cast here. block comment http://gwt-code-reviews.appspot.com/841804/diff/1/36 File user/test/com/google/gwt/event/logical/shared/LogicalEventsTest.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/36#newcode78 user/test/com/google/gwt/event/logical/shared/LogicalEventsTest.java:78: @SuppressWarnings(rawtypes) GwtEvent instance) { Where is this coming from? http://gwt-code-reviews.appspot.com/841804/diff/1/37 File user/test/com/google/gwt/event/shared/CountingEventBus.java (right):
[gwt-contrib] Re: Adds dual key (type + source) handler binding to EventBus. (issue841804)
Comments for SimpleEventBus. http://gwt-code-reviews.appspot.com/841804/diff/1/24 File user/src/com/google/gwt/event/shared/SimpleEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode36 user/src/com/google/gwt/event/shared/SimpleEventBus.java:36: // Add and remove operations received during dispatch. Javadoc comment? http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode45 user/src/com/google/gwt/event/shared/SimpleEventBus.java:45: SimpleEventBus(boolean fireInReverseOrder) { Document use? http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode52 user/src/com/google/gwt/event/shared/SimpleEventBus.java:52: assert handler != null : Cannot add a null handler; Assertions or IllegalArgumentExceptions for public APIs? http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode66 user/src/com/google/gwt/event/shared/SimpleEventBus.java:66: public H extends EventHandler void removeHandler( Why make this public? http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode109 user/src/com/google/gwt/event/shared/SimpleEventBus.java:109: event.setSource(source); firingDepth could become negative if this throws an NPE. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode120 user/src/com/google/gwt/event/shared/SimpleEventBus.java:120: for (int i = count - 1; i = 0; i--) { Replace the two for loops with a ListIterator? ListIterator it = isReverseOrder ? list.listIterator(it.size()) : list.listIterator(); while (isReverseOrder ? it.hasPrevious() : it.hasNext()) { H handler = isReverseOrder ? it.previous() : it.next(); } http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode160 user/src/com/google/gwt/event/shared/SimpleEventBus.java:160: + type; This makes it an error to attempt to remove a handler more than once, which can be done with the public removeHandler() method. http://gwt-code-reviews.appspot.com/841804/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Enum name obfuscation option. Addresses issue 2387369 (issue827802)
Reviewers: scottb, cromwellian, robertvawter, Description: Enum name obfuscation option. Addresses issue 2387369 Public: Enum name obfuscation. Added configuration property (compiler.enum.obfuscate.names) to optionally obfuscatate enum names from production output. Please review this at http://gwt-code-reviews.appspot.com/827802/show Affected files: A dev/core/src/com/google/gwt/dev/jjs/EnumNameObfuscator.java M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java M user/src/com/google/gwt/core/CompilerParameters.gwt.xml M user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java M user/src/com/google/gwt/requestfactory/shared/WriteOperation.java M user/src/com/google/gwt/rpc/client/ast/IdentityValueCommand.java M user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java M user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java M user/super/com/google/gwt/emul/java/lang/Enum.java M user/super/com/google/gwt/emul/java/math/MathContext.java M user/super/com/google/gwt/emul/java/math/RoundingMode.java A user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.gwt.xml A user/test/com/google/gwt/dev/jjs/EnumsWithNameObfuscationSuite.java A user/test/com/google/gwt/dev/jjs/test/EnumsWithNameObfuscationTest.java M user/test/com/google/gwt/emultest/EmulSuite.java A user/test/com/google/gwt/emultest/java/math/MathContextTest.java M user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ListEditor adapter implemented on top of a new CompositeEditor core (issue848801)
I think LGTM, but could you help me understand CompositeEditor and CompositeEditor.Chain first? http://gwt-code-reviews.appspot.com/848801/diff/1/2 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/AddressEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/2#newcode46 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/AddressEditor.java:46: final TakesValueEditorString streetEditor; Nice! http://gwt-code-reviews.appspot.com/848801/diff/1/5 File user/src/com/google/gwt/editor/client/CompositeEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/5#newcode20 user/src/com/google/gwt/editor/client/CompositeEditor.java:20: * some other type. Having trouble getting my head around this. Could you update doc give an example of base and component types? Or just describe the use case that lead you to create this? I'm lost. http://gwt-code-reviews.appspot.com/848801/diff/1/16 File user/src/com/google/gwt/editor/client/adapters/ListEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/16#newcode29 user/src/com/google/gwt/editor/client/adapters/ListEditor.java:29: * Manages to manage a list and some editors. Manages to manage :-) ? http://gwt-code-reviews.appspot.com/848801/diff/1/16#newcode34 user/src/com/google/gwt/editor/client/adapters/ListEditor.java:34: public class ListEditorT, E extends EditorT implements You need E as input to the code generator, right? http://gwt-code-reviews.appspot.com/848801/diff/1/26 File user/src/com/google/gwt/editor/client/testing/FakeEditorSource.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/26#newcode29 user/src/com/google/gwt/editor/client/testing/FakeEditorSource.java:29: public class FakeEditorSourceT extends EditorSourceFakeLeafValueEditorT { Should the fakes and mocks live in user/test? Or would that make them not available to third parties? http://gwt-code-reviews.appspot.com/848801/diff/1/37 File user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/37#newcode299 user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java:299: class StringSource extends EditorSourceSimpleEditorString { Will I always have to create a source to use a ListEditor? Could it be generated? http://gwt-code-reviews.appspot.com/848801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SafeHtml support to UI widgets (2) (issue847801)
http://gwt-code-reviews.appspot.com/847801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Update HistoryTest to ensure that non-safari browsers also: (issue855801)
Reviewers: scottb, Description: Update HistoryTest to ensure that non-safari browsers also: - run testHistory - verify the current hash value as part of testTokenEscaping and testTokenNonescaping Please review this at http://gwt-code-reviews.appspot.com/855801/show Affected files: M user/test/com/google/gwt/user/client/ui/HistoryTest.java Index: user/test/com/google/gwt/user/client/ui/HistoryTest.java === --- user/test/com/google/gwt/user/client/ui/HistoryTest.java(revision 8728) +++ user/test/com/google/gwt/user/client/ui/HistoryTest.java(working copy) @@ -47,11 +47,19 @@ }-*/; /* - * Copied from HistoryImplSafari. + * Copied from UserAgent.gwt.xml and HistoryImplSafari. */ private static native boolean isSafari2() /*-{ +var ua = navigator.userAgent; + +// copied from UserAgent.gwt.xml +if (ua.indexOf(webkit) == -1) { + return false; +} + +// copied from HistoryImplSafari var exp = / AppleWebKit\/([\d]+)/; -var result = exp.exec(navigator.userAgent); +var result = exp.exec(ua); if (result) { // The standard history implementation works fine on WebKit = 522 // (Safari 3 beta). @@ -62,7 +70,7 @@ // The standard history implementation works just fine on the iPhone, which // unfortunately reports itself as WebKit/420+. -if (navigator.userAgent.indexOf('iPhone') != -1) { +if (ua.indexOf('iPhone') != -1) { return false; } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Delay start of history token transitions in HistoryTest.testHistory() so that when tokens are lo... (issue850802)
Reviewers: kathrin, Description: Delay start of history token transitions in HistoryTest.testHistory() so that when tokens are lost during subsequent parts of the test, History.back() does not go back too far (i.e. before the web page containing the test module), which would cause subsequent tests to timeout and fail. This change doesn't actually fix the flaky test, but it does: - allow for other tests to proceed after this test fails - present a consistent failure message: Expecting token 'foo bar' after Hisotry.back(), but got: if-you-see-this-history-went-back-too-far rather than: A timeout expired after 5000ms elapsed Please review this at http://gwt-code-reviews.appspot.com/850802/show Affected files: M user/test/com/google/gwt/user/client/ui/HistoryTest.java Index: user/test/com/google/gwt/user/client/ui/HistoryTest.java === --- user/test/com/google/gwt/user/client/ui/HistoryTest.java(revision 8728) +++ user/test/com/google/gwt/user/client/ui/HistoryTest.java(working copy) @@ -151,7 +151,15 @@ // History.back() is broken on Safari2, so we skip this test. return; } -delayTestFinish(5000); + +/* + * Sentinel token which should only be seen if tokens are lost during the + * rest of the test. Without this, History.back() might send the browser too + * far back, i.e. back to before the web app containing our test module. + */ +History.newItem(if-you-see-this-history-went-back-too-far); + +delayTestFinish(1); addHistoryListenerImpl(new HistoryListener() { private int state = 0; @@ -179,7 +187,7 @@ case 2: { if (!historyToken.equals(foo bar)) { - fail(Expecting token 'foo bar' after back, but got: + historyToken); + fail(Expecting token 'foo bar' after History.back(), but got: + historyToken); } finishTest(); break; @@ -187,8 +195,17 @@ } } }); - -History.newItem(foo bar); + +/* + * Delay kicking off the history transitions, so safari has time to process + * the initial sentinel token + */ +new Timer() { + @Override + public void run() { +History.newItem(foo bar); + } +}.schedule(5000); } /** -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Delay start of history token transitions in HistoryTest.testHistory() so that when tokens are lo... (issue850802)
LGTM http://gwt-code-reviews.appspot.com/850802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Update HistoryTest to ensure that non-safari browsers also: (issue855801)
LGTM http://gwt-code-reviews.appspot.com/855801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ListEditor adapter implemented on top of a new CompositeEditor core (issue848801)
http://gwt-code-reviews.appspot.com/848801/diff/1/5 File user/src/com/google/gwt/editor/client/CompositeEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/5#newcode20 user/src/com/google/gwt/editor/client/CompositeEditor.java:20: * some other type. * An interface that indicates that a given Editor is composed of an unknown * number of sub-Editors all of the same type. * p * For example, the {...@link com.google.gwt.editor.client.adapters.ListEditor * ListEditor} type is a * codeCompositeEditorlt;Listlt;T, T, E extends Editorlt;T/code; that * is, ListEditor will accept a Listlt;T and will edit some unknown number of * codeT/code's using the Editor type codeE/code. Another example might * be: * * pre * class WorkgroupEditor implements CompositeEditorlt;Workgroup, Person, PersonSummaryEditor{ * public void setValue(Workgroup workgroup) { * // Assuming Workgroup implements Iterablelt;Person * for (Person p : workgroup) { * PersonSummaryEditor editor = new PersonSummaryEditor(); * // Attach editor to DOM * somePanel.add(editor); * // Let the generated code drive the sub-editor * editorChain.attach(p, editor); * } * } * } * /pre http://gwt-code-reviews.appspot.com/848801/diff/1/16 File user/src/com/google/gwt/editor/client/adapters/ListEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/16#newcode34 user/src/com/google/gwt/editor/client/adapters/ListEditor.java:34: public class ListEditorT, E extends EditorT implements On 2010/09/09 18:24:01, rjrjr wrote: You need E as input to the code generator, right? Yes, the EditorDriver generator needs to make sure that there is an EditorDelegate peer for the editor type that will display the list elements. http://gwt-code-reviews.appspot.com/848801/diff/1/26 File user/src/com/google/gwt/editor/client/testing/FakeEditorSource.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/26#newcode29 user/src/com/google/gwt/editor/client/testing/FakeEditorSource.java:29: public class FakeEditorSourceT extends EditorSourceFakeLeafValueEditorT { On 2010/09/09 18:24:01, rjrjr wrote: Should the fakes and mocks live in user/test? Or would that make them not available to third parties? The contents of user/test aren't packed into gwt-user.jar. http://gwt-code-reviews.appspot.com/848801/diff/1/37 File user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/37#newcode299 user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java:299: class StringSource extends EditorSourceSimpleEditorString { On 2010/09/09 18:24:01, rjrjr wrote: Will I always have to create a source to use a ListEditor? Could it be generated? I have this rough idea that you could write something like this in UiBinder: e:ListEditor path='person.aliases' e:container g:FlowPanel / /e:container e:subeditor g:FlowPanel g:TextBox e:path='name'John Doe/g:TextBox g:TextBox e:path='locale'East Nowhere/g:TextBox g:DateBox e:path='last_seen'9/9/2010/g:DateBox /g:FlowPanel e:subeditor /e:ListEditor UiBinder would generate an EditorChain that automatically creates instances of the widget described by the subeditor clause and manages their attachment to an InsertPanel described in the container clause. http://gwt-code-reviews.appspot.com/848801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Move the packages to include in the javadoc out of the build.xml file and into a properties file. (issue856801)
Reviewers: fabbott, Description: Move the packages to include in the javadoc out of the build.xml file and into a properties file. Patch by: bobv Review by: fabbott Please review this at http://gwt-code-reviews.appspot.com/856801/show Affected files: M doc/build.xml A doc/packages.properties Index: doc/build.xml === --- doc/build.xml (revision 8738) +++ doc/build.xml (working copy) @@ -9,15 +9,8 @@ !-- Platform shouldn't matter here, just picking one -- property.ensure name=gwt.dev.jar location=${gwt.build.lib}/gwt-dev.jar / - property name=USER_PKGS - value=com.google.gwt.animation.client;com.google.gwt.benchmarks.client;com.google.gwt.cell.client;com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.soyc;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.core.linker;com.google.gwt.debug.client;com.google.gwt.dom.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.http.client;com.google.gwt.i18n.client;com.google.gwt.i18n.shared;com.google.gwt.i18n.client.constants;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.logging.client;com.google.gwt.benchmarks.client;com.google.gwt.regexp.shared;com.google.gwt.resources.client;com.google.gwt.resources.ext;com.google.gwt.user.cellview.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.datepicker.client;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.uibinder.client;com.google.gwt.rpc.client;com.google.gwt.rpc.server;com.google.gwt.jsonp.client;com.google.gwt.view.client;com.google.gwt.app.client;com.google.gwt.app.place;com.google.gwt.app.util;com.google.gwt.requestfactory.server;com.google.gwt.requestfactory.shared;/ - property name=LANG_PKGS value=java.lang;java.lang.annotation;java.util;java.io;java.sql / - - !-- Individual classes to include when we don't want to -include an entire package. - -- - property name=USER_CLASSES - value=${gwt.root}/user/src/com/google/gwt/junit/tools/GWTTestSuite.java:${gwt.root}/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java:${gwt.root}/user/src/com/google/gwt/i18n/server/GwtLocaleFactoryImpl.java:${gwt.root}/user/src/com/google/gwt/i18n/server/GwtLocaleImpl.java / + !-- This file controls the contents of the javadoc -- + property file=packages.properties / !-- *** Note that if the USER_SOURCE_PATH paths are updated, Index: doc/packages.properties === --- doc/packages.properties (revision 0) +++ doc/packages.properties (revision 0) @@ -0,0 +1,63 @@ +# This file contains all of the user javadoc packages. +LANG_PKGS=\ +java.lang;\ +java.lang.annotation;\ +java.io;\ +java.sql;\ +java.util +# The last package should not have a trailing semicolon + +# Individual classes to include when we don't want to include an entire package. +USER_CLASSES=\ +${gwt.root}/user/src/com/google/gwt/junit/tools/GWTTestSuite.java:\ +${gwt.root}/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java:\ +${gwt.root}/user/src/com/google/gwt/i18n/server/GwtLocaleFactoryImpl.java:\ +${gwt.root}/user/src/com/google/gwt/i18n/server/GwtLocaleImpl.java + +USER_PKGS=\ +com.google.gwt.animation.client;\ +com.google.gwt.benchmarks.client;\ +com.google.gwt.cell.client;\ +com.google.gwt.core.client;\ +com.google.gwt.core.ext;\ +com.google.gwt.core.ext.soyc;\ +com.google.gwt.core.ext.linker;\ +com.google.gwt.core.ext.typeinfo;\ +com.google.gwt.core.linker;\ +com.google.gwt.debug.client;\ +com.google.gwt.dom.client;\ +com.google.gwt.editor.client;\ +com.google.gwt.editor.client.testing;\ +com.google.gwt.event.dom.client;\ +com.google.gwt.event.logical.shared;\ +com.google.gwt.event.shared;\ +com.google.gwt.http.client;\ +com.google.gwt.i18n.client;\ +com.google.gwt.i18n.shared;\ +com.google.gwt.i18n.client.constants;\ +com.google.gwt.i18n.rebind.format;\ +com.google.gwt.i18n.rebind.keygen;\ +com.google.gwt.json.client;\ +com.google.gwt.junit.client;\ +com.google.gwt.logging.client;\ +com.google.gwt.benchmarks.client;\ +com.google.gwt.regexp.shared;\ +com.google.gwt.resources.client;\ +com.google.gwt.resources.ext;\ +com.google.gwt.user.cellview.client;\ +com.google.gwt.user.client;\ +com.google.gwt.user.client.rpc;\ +com.google.gwt.user.client.ui;\ +com.google.gwt.user.datepicker.client;\ +com.google.gwt.user.server.rpc;\ +com.google.gwt.xml.client;\ +com.google.gwt.uibinder.client;\ +com.google.gwt.rpc.client;\ +com.google.gwt.rpc.server;\ +com.google.gwt.jsonp.client;\ +com.google.gwt.view.client;\ +com.google.gwt.app.client;\ +com.google.gwt.app.place;\ +com.google.gwt.requestfactory.server;\ +com.google.gwt.requestfactory.shared +# The last package should
[gwt-contrib] Re: Adds a -strict option to the GWT compiler. If this option is specified, (issue853801)
High-level comments: - CompilationState doesn't really need the extra API, because you can always just iterate through the returned collection looking for errors. Arguably, this would take a few extra cycles, but I've kinda been wanting to move the error reporting out CompilationState anyway and let the callers handle it, which would eliminate the extra cost since we'd have to loop through reporting errors anyhow. - On the test class, it might be easier to just check a Good and Bad module into dev/test instead of mucking around with temp dirs and class loaders. This is the pattern we use for TypeOracleTest.gwt.xml, and One.gwt.xml, for example. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Enum name obfuscation option. Addresses issue 2387369 (issue827802)
LGTM -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Enum name obfuscation option. Addresses issue 2387369 (issue827802)
http://gwt-code-reviews.appspot.com/827802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: TypeSerializerCreator generates pure Java code path for DevMode. (issue831801)
Fix for inaccessible types, and also fix a generics issue. http://gwt-code-reviews.appspot.com/831801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8739 committed - Allow Checkbox to accept null as valid....
Revision: 8739 Author: cromwell...@google.com Date: Thu Sep 9 10:59:13 2010 Log: Allow Checkbox to accept null as valid. Review at http://gwt-code-reviews.appspot.com/831803 Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8739 Modified: /trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java /trunk/user/src/com/google/gwt/user/client/ui/HasValue.java /trunk/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java === --- /trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java Tue Apr 20 03:28:08 2010 +++ /trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java Thu Sep 9 10:59:13 2010 @@ -289,14 +289,14 @@ * input element wrapped by this widget. For access to that property, see * {...@link #setFormValue(String)} * - * @param value true to check, false to uncheck; must not be null + * @param value true to check, false to uncheck; null value implies false * @param fireEvents If true, and value has changed, fire a * {...@link ValueChangeEvent} * @throws IllegalArgumentException if value is null */ public void setValue(Boolean value, boolean fireEvents) { if (value == null) { - throw new IllegalArgumentException(value must not be null); + value = Boolean.FALSE; } Boolean oldValue = getValue(); === --- /trunk/user/src/com/google/gwt/user/client/ui/HasValue.java Wed Sep 1 14:06:53 2010 +++ /trunk/user/src/com/google/gwt/user/client/ui/HasValue.java Thu Sep 9 10:59:13 2010 @@ -46,9 +46,10 @@ * It is acceptable to fail assertions or throw (documented) unchecked * exceptions in response to bad values. * p - * By convention, GWT widgets that can be cleared accept null for - * codevalue/code, but it is acceptable for widgets that cannot be cleared - * to throw an exception for null values. + * Widgets must accept null as a valid value. By convention, setting a widget to + * null clears value, calling getValue() on a cleared widget returns null. Widgets + * that can not be cleared (e.g. {...@link CheckBox}) must find another valid meaning + * for null input. * * @param value the object's new value */ === --- /trunk/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java Tue Apr 20 03:28:08 2010 +++ /trunk/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java Thu Sep 9 10:59:13 2010 @@ -82,6 +82,10 @@ cb.setValue(false); assertFalse(cb.getValue()); +// null implies false +cb.setValue(null); +assertFalse(cb.getValue()); + cb.setEnabled(false); assertFalse(cb.isEnabled()); cb.setEnabled(true); @@ -239,13 +243,6 @@ cb.setValue(true, true); assertTrue(h.received); - -try { - cb.setValue(null); - fail(Should throw IllegalArgumentException); -} catch (IllegalArgumentException e) { - /* pass */ -} // Note that we cannot test this with a simulated click, the way // we do for the click handlers. IE does not change the value of -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Enum name obfuscation option. Addresses issue 2387369 (issue827802)
Foodback from IM discussion. http://gwt-code-reviews.appspot.com/827802/diff/4001/5007 File user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java (right): http://gwt-code-reviews.appspot.com/827802/diff/4001/5007#newcode76 user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java:76: // ETypeSeedName~9~FieldName // ETypeSeedName~IOrdinal~ http://gwt-code-reviews.appspot.com/827802/diff/4001/5007#newcode80 user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java:80: accept(new IntValueCommand(x.getValue().ordinal())); Use appendTypedData here. The use of accept() is because Strings can be encoded as a backreference. http://gwt-code-reviews.appspot.com/827802/diff/4001/5008 File user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java (right): http://gwt-code-reviews.appspot.com/827802/diff/4001/5008#newcode201 user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java:201: // ETypeSeedName~9~FieldName // ETypeSeedName~IOrdinal~ http://gwt-code-reviews.appspot.com/827802/diff/4001/5008#newcode212 user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java:212: x.setValue(enumConstants[ordinal]); Please add a TODO here to the effect of: This is prone to subtle corruption or an ArrayIndexOutOfBoundsException if the client and server have drifted. http://gwt-code-reviews.appspot.com/827802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] JsArray enhancement
I wanted to provide a patch for JsArray* to support common methods like sort and reverse. I found the issue http://code.google.com/p/google-web-toolkit/issues/detail?id=2793 which is not completed and wants to provide all ECMA methods. I had a look at the existing patch and found code that I didn't understand and which indicates that I miss some knowledge before being able to write a proper patch. Why is the following code checking for script/binary mode and calling different methods? Best Regards Sebastian + public final native int push(T item) /*-{ +return this.push(items); + }-*/; + + public final int push(T... items) { +if (GWT.isScript()) { + return push0(items); +} else { + for (T item : items) { +push(item); + } + return length(); +} + }; + + private native int push0(T[] items) /*-{ +return this.push.apply(this, items); + }-*/; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix memory leaks in DevMode (issue766803)
For posterity, this issue was superceded by http://gwt-code-reviews.appspot.com/826802/show On 2010/08/23 20:29:44, conroy wrote: Discussed in person with jat and scottb: Tests are failing for this change because the ThreadLocal assumptions don't actually hold under JUnit. As a result, I'm going to be dropping this change in favor of more explicitly caching based on the generator context lifecycle. On 2010/08/20 20:46:05, jat wrote: LGTM, though your format settings still seem to be off. http://gwt-code-reviews.appspot.com/766803/diff/29001/30006 File user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java (right): http://gwt-code-reviews.appspot.com/766803/diff/29001/30006#newcode87 user/src/com/google/gwt/resources/rebind/context/AbstractResourceContext.java:87: getLogger().log(TreeLogger.ERROR, Unable to determine mime type of resource, e); Formatting changes still seem wrong here, as this now exceeds 80 columns. http://gwt-code-reviews.appspot.com/766803/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Improve locale handling for default scripts and languages where some (issue851802)
Reviewers: pdr, Description: Improve locale handling for default scripts and languages where some scripts are written RTL even if the language isn't RTL in general. Patch by: jat Review by: pdr Please review this at http://gwt-code-reviews.appspot.com/851802/show Affected files: A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_dv.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_ha_Arab.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_ku.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_ku_Latn.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_pa_Arab.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_syr.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_ug.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_uz_Arab.java A user/src/com/google/gwt/i18n/client/impl/cldr/CldrImpl_yi.java M user/src/com/google/gwt/i18n/server/DefaultLanguageScripts.java M user/src/com/google/gwt/i18n/server/GwtLocaleImpl.java M user/test/com/google/gwt/i18n/I18NSuite.java A user/test/com/google/gwt/i18n/I18NTest_pa_Arab.gwt.xml A user/test/com/google/gwt/i18n/I18NTest_pa_PK.gwt.xml A user/test/com/google/gwt/i18n/client/I18N_pa_Arab_Test.java A user/test/com/google/gwt/i18n/client/I18N_pa_PK_Test.java M user/test/com/google/gwt/i18n/server/GwtLocaleTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add ListEditor adapter implemented on top of a new CompositeEditor core (issue848801)
LGTM On Thu, Sep 9, 2010 at 12:04 PM, b...@google.com wrote: http://gwt-code-reviews.appspot.com/848801/diff/1/5 File user/src/com/google/gwt/editor/client/CompositeEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/5#newcode20 user/src/com/google/gwt/editor/client/CompositeEditor.java:20: * some other type. * An interface that indicates that a given Editor is composed of an unknown * number of sub-Editors all of the same type. * p * For example, the {...@link com.google.gwt.editor.client.adapters.ListEditor * ListEditor} type is a * codeCompositeEditorlt;Listlt;T, T, E extends Editorlt;T/code; that * is, ListEditor will accept a Listlt;T and will edit some unknown number of * codeT/code's using the Editor type codeE/code. Another example might * be: * * pre * class WorkgroupEditor implements CompositeEditorlt;Workgroup, Person, PersonSummaryEditor{ * public void setValue(Workgroup workgroup) { * // Assuming Workgroup implements Iterablelt;Person * for (Person p : workgroup) { * PersonSummaryEditor editor = new PersonSummaryEditor(); * // Attach editor to DOM * somePanel.add(editor); * // Let the generated code drive the sub-editor * editorChain.attach(p, editor); * } * } * } * /pre http://gwt-code-reviews.appspot.com/848801/diff/1/16 File user/src/com/google/gwt/editor/client/adapters/ListEditor.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/16#newcode34 user/src/com/google/gwt/editor/client/adapters/ListEditor.java:34: public class ListEditorT, E extends EditorT implements On 2010/09/09 18:24:01, rjrjr wrote: You need E as input to the code generator, right? Yes, the EditorDriver generator needs to make sure that there is an EditorDelegate peer for the editor type that will display the list elements. http://gwt-code-reviews.appspot.com/848801/diff/1/26 File user/src/com/google/gwt/editor/client/testing/FakeEditorSource.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/26#newcode29 user/src/com/google/gwt/editor/client/testing/FakeEditorSource.java:29: public class FakeEditorSourceT extends EditorSourceFakeLeafValueEditorT { On 2010/09/09 18:24:01, rjrjr wrote: Should the fakes and mocks live in user/test? Or would that make them not available to third parties? The contents of user/test aren't packed into gwt-user.jar. http://gwt-code-reviews.appspot.com/848801/diff/1/37 File user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java (right): http://gwt-code-reviews.appspot.com/848801/diff/1/37#newcode299 user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java:299: class StringSource extends EditorSourceSimpleEditorString { On 2010/09/09 18:24:01, rjrjr wrote: Will I always have to create a source to use a ListEditor? Could it be generated? I have this rough idea that you could write something like this in UiBinder: e:ListEditor path='person.aliases' e:container g:FlowPanel / /e:container e:subeditor g:FlowPanel g:TextBox e:path='name'John Doe/g:TextBox g:TextBox e:path='locale'East Nowhere/g:TextBox g:DateBox e:path='last_seen'9/9/2010/g:DateBox /g:FlowPanel e:subeditor /e:ListEditor UiBinder would generate an EditorChain that automatically creates instances of the widget described by the subeditor clause and manages their attachment to an InsertPanel described in the container clause. http://gwt-code-reviews.appspot.com/848801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8741 committed - Adds a cheesey uncaught exception handler to DynaTableRF....
Revision: 8741 Author: rj...@google.com Date: Thu Sep 9 13:25:50 2010 Log: Adds a cheesey uncaught exception handler to DynaTableRF. Review at http://gwt-code-reviews.appspot.com/832802 Review by: robertvaw...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8741 Modified: /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java === --- /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java Fri Aug 27 09:23:17 2010 +++ /trunk/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java Thu Sep 9 13:25:50 2010 @@ -17,6 +17,7 @@ import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.GWT.UncaughtExceptionHandler; import com.google.gwt.event.shared.EventBus; import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.sample.dynatablerf.client.widgets.DayFilterWidget; @@ -25,17 +26,22 @@ import com.google.gwt.sample.dynatablerf.shared.DynaTableRequestFactory; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; +import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.RootLayoutPanel; import com.google.gwt.user.client.ui.Widget; +import java.util.logging.Level; +import java.util.logging.Logger; + /** * The entry point class which performs the initial loading of the DynaTableRf * application. */ public class DynaTableRf implements EntryPoint { - interface Binder extends UiBinderWidget, DynaTableRf { } + + private static final Logger log = Logger.getLogger(DynaTableRf.class.getName()); @UiField(provided = true) SummaryWidget calendar; @@ -49,6 +55,12 @@ DayFilterWidget filter; public void onModuleLoad() { +GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + public void onUncaughtException(Throwable e) { +Window.alert(Error: + e.getMessage()); +log.log(Level.SEVERE, e.getMessage(), e); + } +}); DynaTableRequestFactory requests = GWT.create(DynaTableRequestFactory.class); requests.init(eventBus); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adds dual key (type + source) handler binding to EventBus. (issue841804)
I believe I've addressed what should be addressed. What say you? http://gwt-code-reviews.appspot.com/841804/diff/1/4 File samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/4#newcode185 samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java:185: void onSelectionChange(@SuppressWarnings(unused) SelectionChangeEvent event) { Untrue, this isn't actually a handler method. Removing the unused param, tweaking the method name. http://gwt-code-reviews.appspot.com/841804/diff/1/7 File samples/expenses/pom.xml (right): http://gwt-code-reviews.appspot.com/841804/diff/1/7#newcode10 samples/expenses/pom.xml:10: roo.version1.1.0.M4/roo.version Accidental, thanks. http://gwt-code-reviews.appspot.com/841804/diff/1/18 File user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/18#newcode106 user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java:106: @SuppressWarnings({unchecked, rawtypes}) Sounds like you should upgrade to 3.6? On 2010/09/09 17:45:48, bobv wrote: My eclipse does not know about this warning, and therefore will display a warning. http://gwt-code-reviews.appspot.com/841804/diff/1/19 File user/src/com/google/gwt/event/shared/AbstractEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/19#newcode1 user/src/com/google/gwt/event/shared/AbstractEventBus.java:1: package com.google.gwt.event.shared; On 2010/09/09 17:45:48, bobv wrote: Copyright? Done. http://gwt-code-reviews.appspot.com/841804/diff/1/19#newcode8 user/src/com/google/gwt/event/shared/AbstractEventBus.java:8: public abstract class AbstractEventBus implements EventBus { Not crazy about even more boilerplate. Should I even bother with the interface? On 2010/09/09 17:45:48, bobv wrote: Declare unimplemented methods as abstsract so subclasses can use @Override in 1.5 language. http://gwt-code-reviews.appspot.com/841804/diff/1/21 File user/src/com/google/gwt/event/shared/EventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/21#newcode40 user/src/com/google/gwt/event/shared/EventBus.java:40: * . On 2010/09/09 17:45:48, bobv wrote: Dangling period. Done. http://gwt-code-reviews.appspot.com/841804/diff/1/21#newcode66 user/src/com/google/gwt/event/shared/EventBus.java:66: * source means that this is a global handler, which shouldreceive all events On 2010/09/09 17:45:48, bobv wrote: should receive Done. http://gwt-code-reviews.appspot.com/841804/diff/1/24 File user/src/com/google/gwt/event/shared/SimpleEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode36 user/src/com/google/gwt/event/shared/SimpleEventBus.java:36: // Add and remove operations received during dispatch. On 2010/09/09 17:56:32, bobv wrote: Javadoc comment? Done. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode45 user/src/com/google/gwt/event/shared/SimpleEventBus.java:45: SimpleEventBus(boolean fireInReverseOrder) { On 2010/09/09 17:56:32, bobv wrote: Document use? Wrote small novel. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode52 user/src/com/google/gwt/event/shared/SimpleEventBus.java:52: assert handler != null : Cannot add a null handler; On 2010/09/09 17:56:32, bobv wrote: Assertions or IllegalArgumentExceptions for public APIs? Done. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode66 user/src/com/google/gwt/event/shared/SimpleEventBus.java:66: public H extends EventHandler void removeHandler( On 2010/09/09 17:56:32, bobv wrote: Why make this public? The registration object is basically impossible to use from within the handler it applies to. The community raised holy hell when we tried to remove it last time around, and John and I were unable to come up with a palatable work around. Short answer: Java still sucks. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode109 user/src/com/google/gwt/event/shared/SimpleEventBus.java:109: event.setSource(source); On 2010/09/09 17:56:32, bobv wrote: firingDepth could become negative if this throws an NPE. Done. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode120 user/src/com/google/gwt/event/shared/SimpleEventBus.java:120: for (int i = count - 1; i = 0; i--) { On 2010/09/09 17:56:32, bobv wrote: Replace the two for loops with a ListIterator? ListIterator it = isReverseOrder ? list.listIterator(it.size()) : list.listIterator(); while (isReverseOrder ? it.hasPrevious() : it.hasNext()) { H handler = isReverseOrder ? it.previous() : it.next(); } Thanks, couldn't remember where that lives. http://gwt-code-reviews.appspot.com/841804/diff/1/24#newcode160 user/src/com/google/gwt/event/shared/SimpleEventBus.java:160: + type; On 2010/09/09 17:56:32, bobv wrote: This makes it an error to attempt to remove a handler more than once, which can be done
[gwt-contrib] Re: Adds dual key (type + source) handler binding to EventBus. (issue841804)
LGTM http://gwt-code-reviews.appspot.com/841804/diff/1/19 File user/src/com/google/gwt/event/shared/AbstractEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/19#newcode8 user/src/com/google/gwt/event/shared/AbstractEventBus.java:8: public abstract class AbstractEventBus implements EventBus { Should I even bother with the interface? Make EventBus an abstract base class. http://gwt-code-reviews.appspot.com/841804/diff/1/37 File user/test/com/google/gwt/event/shared/CountingEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/1/37#newcode29 user/test/com/google/gwt/event/shared/CountingEventBus.java:29: * for tests. Done. Should you do the same w/editor mocks? They're already in editor.client.testing. http://gwt-code-reviews.appspot.com/841804/diff/11002/17023 File user/src/com/google/gwt/event/shared/SimpleEventBus.java (right): http://gwt-code-reviews.appspot.com/841804/diff/11002/17023#newcode55 user/src/com/google/gwt/event/shared/SimpleEventBus.java:55: * because fully supporting it (that is, not segrating filtered and unfiltered segregating http://gwt-code-reviews.appspot.com/841804/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Move the packages to include in the javadoc out of the build.xml file and into a properties file. (issue856801)
LGTM http://gwt-code-reviews.appspot.com/856801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Update HistoryTest to ensure that non-safari browsers also: (issue855801)
http://gwt-code-reviews.appspot.com/855801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Renamed getStableId() to stableId() (issue857801)
Reviewers: rjrjr, Description: Renamed getStableId() to stableId() Patch by: amitmanjhi Review (and suggested) by: rjrjr Review by: rj...@google.com Please review this at http://gwt-code-reviews.appspot.com/857801/show Affected files: M user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java M user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java M user/src/com/google/gwt/requestfactory/client/impl/ProxyJsoImpl.java M user/src/com/google/gwt/requestfactory/shared/EntityProxy.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Update HistoryTest to ensure that non-safari browsers also: (issue855801)
Still LGTM. May want to file a bug against HtmlUnit. http://gwt-code-reviews.appspot.com/855801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Renamed getStableId() to stableId() (issue857801)
LGTM On 2010/09/10 00:37:20, amitmanjhi wrote: http://gwt-code-reviews.appspot.com/857801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Enum name obfuscation option. Addresses issue 2387369 (issue827802)
http://gwt-code-reviews.appspot.com/827802/diff/4001/5007 File user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java (right): http://gwt-code-reviews.appspot.com/827802/diff/4001/5007#newcode76 user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java:76: // ETypeSeedName~9~FieldName On 2010/09/09 21:06:16, bobv wrote: // ETypeSeedName~IOrdinal~ Done. http://gwt-code-reviews.appspot.com/827802/diff/4001/5007#newcode80 user/src/com/google/gwt/rpc/client/impl/SimplePayloadSink.java:80: accept(new IntValueCommand(x.getValue().ordinal())); On 2010/09/09 21:06:16, bobv wrote: Use appendTypedData here. The use of accept() is because Strings can be encoded as a backreference. Done. http://gwt-code-reviews.appspot.com/827802/diff/4001/5008 File user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java (right): http://gwt-code-reviews.appspot.com/827802/diff/4001/5008#newcode201 user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java:201: // ETypeSeedName~9~FieldName On 2010/09/09 21:06:16, bobv wrote: // ETypeSeedName~IOrdinal~ Done. http://gwt-code-reviews.appspot.com/827802/diff/4001/5008#newcode212 user/src/com/google/gwt/rpc/server/SimplePayloadDecoder.java:212: x.setValue(enumConstants[ordinal]); On 2010/09/09 21:06:16, bobv wrote: Please add a TODO here to the effect of: This is prone to subtle corruption or an ArrayIndexOutOfBoundsException if the client and server have drifted. Done. http://gwt-code-reviews.appspot.com/827802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add SafeHtml support to UI widgets (2) (issue847801)
LGTM! http://gwt-code-reviews.appspot.com/847801/diff/8002/13005 File user/src/com/google/gwt/user/client/ui/Anchor.java (right): http://gwt-code-reviews.appspot.com/847801/diff/8002/13005#newcode117 user/src/com/google/gwt/user/client/ui/Anchor.java:117: this(html.asString(), true); This is dropping the href? this(html.asString(), true, href); http://gwt-code-reviews.appspot.com/847801/diff/8002/13026 File user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java (right): http://gwt-code-reviews.appspot.com/847801/diff/8002/13026#newcode436 user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java:436: public void setHeaderHTML(int index, SafeHtml html) { Since the setHeaderHtml(int, String) version casts the headerwidget to HasHtml an calls setHTML(String) on it, I wonder if it would make sense to mirror that here and cast to HasSafeHtml? Otoh, this would diverge from the usual pattern of delegating setHTML(SafeHtml) to setHTML(String). Not sure :) http://gwt-code-reviews.appspot.com/847801/diff/8002/13030 File user/src/com/google/gwt/user/client/ui/TabBar.java (right): http://gwt-code-reviews.appspot.com/847801/diff/8002/13030#newcode525 user/src/com/google/gwt/user/client/ui/TabBar.java:525: * {...@link #setTabText(int, String)} whenever possible. or {...@link #setTabText(int, SafeHtml)} http://gwt-code-reviews.appspot.com/847801/diff/8002/13034 File user/test/com/google/gwt/user/client/ui/AnchorTest.java (right): http://gwt-code-reviews.appspot.com/847801/diff/8002/13034#newcode48 user/test/com/google/gwt/user/client/ui/AnchorTest.java:48: static final String html = bhello/biworld/i; should this be private, and HTML? (here and elsewhere?) http://gwt-code-reviews.appspot.com/847801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8743 committed - Removed the incomplete check that slipped in the last commit....
Revision: 8743 Author: amitman...@google.com Date: Thu Sep 9 16:14:51 2010 Log: Removed the incomplete check that slipped in the last commit. Patch by: amitmanjhi Review by: cromwellian (tbr) http://code.google.com/p/google-web-toolkit/source/detail?r=8743 Modified: /trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java === --- /trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java Thu Sep 9 14:34:00 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java Thu Sep 9 16:14:51 2010 @@ -630,14 +630,7 @@ public Object invokeDomainMethod(Object domainObject, Method domainMethod, Object args[]) throws IllegalAccessException, InvocationTargetException { -Object returnValue = domainMethod.invoke(domainObject, args); -if (returnValue == null domainMethod.getReturnType() != Void.class) { - // is this the right thing to do? - throw new IllegalStateException(domainMethod + with arguments + args - + is returning null, even though its return type is - + domainMethod.getReturnType()); -} -return returnValue; +return domainMethod.invoke(domainObject, args); } public JSONObject processJsonRequest(String jsonRequestString) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8744 committed - Delay start of history token transitions in HistoryTest.testHistory() ...
Revision: 8744 Author: fre...@google.com Date: Thu Sep 9 17:05:41 2010 Log: Delay start of history token transitions in HistoryTest.testHistory() so that when tokens are lost during subsequent parts of the test, History.back() does not go back too far (i.e. before the web page containing the test module), which would cause subsequent tests to timeout and fail. This change doesn't actually fix the flaky test, but it does hopefully: - allow for other tests to proceed after this test fails - present a consistent failure message: Expecting token 'foo bar' after Hisotry.back(), but got: if-you-see-this-then-history-went-back-too-far rather than: A timeout expired after 5000ms elapsed Review by: kpro...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8744 Modified: /trunk/user/test/com/google/gwt/user/client/ui/HistoryTest.java === --- /trunk/user/test/com/google/gwt/user/client/ui/HistoryTest.java Thu Mar 25 10:46:07 2010 +++ /trunk/user/test/com/google/gwt/user/client/ui/HistoryTest.java Thu Sep 9 17:05:41 2010 @@ -151,7 +151,15 @@ // History.back() is broken on Safari2, so we skip this test. return; } -delayTestFinish(5000); + +/* + * Sentinel token which should only be seen if tokens are lost during the + * rest of the test. Without this, History.back() might send the browser too + * far back, i.e. back to before the web app containing our test module. + */ +History.newItem(if-you-see-this-then-history-went-back-too-far); + +delayTestFinish(1); addHistoryListenerImpl(new HistoryListener() { private int state = 0; @@ -179,7 +187,7 @@ case 2: { if (!historyToken.equals(foo bar)) { - fail(Expecting token 'foo bar' after back, but got: + historyToken); + fail(Expecting token 'foo bar' after History.back(), but got: + historyToken); } finishTest(); break; @@ -187,8 +195,17 @@ } } }); - -History.newItem(foo bar); + +/* + * Delay kicking off the history transitions, so the browser has time to process + * the initial sentinel token + */ +new Timer() { + @Override + public void run() { +History.newItem(foo bar); + } +}.schedule(5000); } /** -- http://groups.google.com/group/Google-Web-Toolkit-Contributors