Re: IE6.0 crashes with GWT 1.5.3
Not sure why this would be a GWT issue since it is the Java hotspot machine that is having the error and once you're in web mode you're using JavaScript so, unless I'm mistaken, no HotSpot use - are yo running some other Java (applet?) on your site? Still, if you try doing a web search you can dig up a few pointers on the hotspot access violation, i.e. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6349849 (which is running an applet on IE with Java 1.5) or look through the GWT issue log (http://code.google.com/p/google-web-toolkit/issues/ list), to see if you find similar, for example http://code.google.com/p/google-web-toolkit/issues/detail?id=1532can=1q=access%20violation%20IE, but again, that is hosted mode not web mode (and seems not reproducable). //Adam On 15 Feb, 08:46, GWTFan valavanur...@gmail.com wrote: We have developed a fairly large scale application using GWT 1.5.3. While the application works reasonably well in IE7.0, Firefox, and chrome, it crashes during some operations in IE6.0. The crash log is below. We are scheduled to go to production and most of our users use IE6.0. Need help! Regards, Mukund # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x7dcdc6f4, pid=5536, tid=2508 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [mshtml.dll+0xac6f4] # --- T H R E A D --- Current thread (0x00824290): JavaThread main [_thread_in_native, id=2508] siginfo: ExceptionCode=0xc005, reading address 0x Registers: EAX=0x2d36039a, EBX=0x0006a084, ECX=0x, EDX=0x0072 ESP=0x00069e64, EBP=0x00069f94, ESI=0x01a9, EDI=0x EIP=0x7dcdc6f4, EFLAGS=0x00010206 Top of Stack: (sp=0x00069e64) 0x00069e64: 0006f4d0 0006a084 00069e7c 0x00069e74: 7dcb53ba 0006a0fc 00069eb4 7dcab6b4 0x00069e84: 2cfe6e80 00069ea4 7dcaf232 00069ec8 0x00069e94: 7dcdf5ab 0006f458 2cfb2850 289a0778 0x00069ea4: 3bc6 3bc6 289a0750 0x00069eb4: 0006a148 00069ed4 7dcaf232 00069ef8 0x00069ec4: 00069f70 0x00069ed4: 00069ee8 7dcaed15 00069fa0 0006a148 Instructions: (pc=0x7dcdc6f4) 0x7dcdc6e4: 75 f4 8d 8d 0c ff ff ff e8 40 ce fd ff 8b 4d f8 0x7dcdc6f4: 8b 01 a8 08 0f 85 4c b0 07 00 a8 03 0f 85 43 fe Stack: [0x0003,0x0007), sp=0x00069e64, free space=231k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [mshtml.dll+0xac6f4] C [mshtml.dll+0xafdbe] C [mshtml.dll+0x21847e] C [mshtml.dll+0xacb91] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xbcd44] C [mshtml.dll+0x124f03] C [mshtml.dll+0xaded7] C [mshtml.dll+0xadcc7] C [mshtml.dll+0x83080] C [mshtml.dll+0x83024] C [mshtml.dll+0x68a9a] C [USER32.dll+0x8724] C [USER32.dll+0x8806] C [USER32.dll+0xb4b0] C [USER32.dll+0xb4fc] C [ntdll.dll+0xeae3] C [USER32.dll+0x8a00] C [swt-win32-3235.dll+0x2273] j org.eclipse.swt.internal.win32.OS.DispatchMessageW(Lorg/eclipse/swt/ internal/win32/MSG;)I+0 j org.eclipse.swt.internal.win32.OS.DispatchMessage(Lorg/eclipse/swt/ internal/win32/MSG;)I+7 j org.eclipse.swt.widgets.Display.readAndDispatch()Z+50 j com.google.gwt.dev.GWTShell.pumpEventLoop()V+16 j com.google.gwt.dev.GWTShell.run()V+23 j com.google.gwt.dev.GWTShell.main([Ljava/lang/String;)V+20 v ~StubRoutines::call_stub V [jvm.dll+0x845a9] V [jvm.dll+0xd9317] V [jvm.dll+0x8447a] V [jvm.dll+0x8b44a] C [javaw.exe+0x14c5] C [javaw.exe+0x3151] C [kernel32.dll+0x16fd7] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.win32.OS.DispatchMessageW(Lorg/eclipse/swt/ internal/win32/MSG;)I+0 j org.eclipse.swt.internal.win32.OS.DispatchMessage(Lorg/eclipse/swt/ internal/win32/MSG;)I+7 j org.eclipse.swt.widgets.Display.readAndDispatch()Z+50 j com.google.gwt.dev.GWTShell.pumpEventLoop()V+16 j com.google.gwt.dev.GWTShell.run()V+23 j com.google.gwt.dev.GWTShell.main([Ljava/lang/String;)V+20 v ~StubRoutines::call_stub --- P R O C E S S --- Java Threads: ( = current thread ) 0x2b177a10 JavaThread Java2D
Re: Closable Tab- Changing Tab text
Then I suggest you just keep a Label for the text on the tab bar, keep it when done with adding it to the tab bar. So you can change the label's text on the user's actions. Hope it helps. On Sat, Feb 14, 2009 at 9:27 PM, GWTFan valavanur...@gmail.com wrote: Yes that is what I do. I use TabPanel.add(widget, widget). My tab text is a horizontal panel with text and an icon for close. But in our application after the tab is displayed, based on user action the tab text should change. My tab text is a widget. How do I change the widget. I could not find a method in the tabbar for it. Thanks, Mukund On Feb 14, 5:32 am, Behrooz Nobakht behrooz.noba...@gmail.com wrote: I believe you should use the TabPanel.addWidget(panelWidget, tabWidget) method of TabPanel. On Sat, Feb 14, 2009 at 8:58 AM, GWTFan valavanur...@gmail.com wrote: We need closable tab panel. I'm using TabPanel's add(widget, widget) method to add tabs. I'm using an horizontalpanel as tab heading, with a text and an icon with clicklistener for closing. This Works well. However, based on user action on the widget within the tab, I need to change the tab text. While adding the tab, I could pass a widget for the tab text with closable option. But TabBar.setTabText() does not allow widgets. How do I get the widget in the tabheader and change the text? Any suggestions. Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Design Question Regarding GWT
2009/2/14 avivg avi...@gmail.com Hello, I'm a GWT newbie. I've read the GWT docs and played with the samples, but still i have some basic questions about how to design and use GWT in a web app: 1) GWT communicates asynchronously with a server. When a GWT application loads, i would like to be able to display some initial data without going back to the server (after all, we've just been there:). How/where can i pass some initial data and what method do i use to feed it to GWT? (instead of making a (redundant) asynchronous call for the data immediately when the app first loads) You can pass data into your gwt app as js variables, form,maybe hidden variables, url parameters, and so on. 2) I would like to use GWT with a JSON capable server (php, django etc). My question is, what is the best way to use GWT? Should i use GWT to code the entire website? Should i use a single GWT app to deal with the entire site or do i break small pieces of functionality to small GWTapps? Or the other extreme: just use GWT to implement tiny JS widgets combined with a traditional template rendering oriented website (eg php). What is the common usage model? It as a matter of tasta, and advance in gwt, and the borders of your application:) At firs try to make same finctional widgets, and go on. 3) WRT #2: How would you recommend implementing user login and registration functionality using GWT+JSON? a) Using GWT as an AJAX widget to spice up a php/django form b) Implement a GWT app specific to registering / login users, leaving other website functionality to other GWT apps c) Implement user functionality using GWT into a single app containing the entire website functionality. I think (a.) will good for you, and will be fun. -- Best Regards Tóth Imre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: IE6.0 crashes with GWT 1.5.3
Thanks for your reply. The issue happens in IE 6.0 as well as hosted mode (my IE version is 6.0 and I guess the hosted mode uses that). I pasted the log of the crash from hosted mode. I don't have a crash log from IE. I thought the log from the hosted mode would give some pointers. Regards On Feb 15, 1:10 am, Adam T adam.t...@gmail.com wrote: Not sure why this would be a GWT issue since it is the Java hotspot machine that is having the error and once you're in web mode you're using JavaScript so, unless I'm mistaken, no HotSpot use - are yo running some other Java (applet?) on your site? Still, if you try doing a web search you can dig up a few pointers on the hotspot access violation, i.e.http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6349849 (which is running an applet on IE with Java 1.5) or look through the GWT issue log (http://code.google.com/p/google-web-toolkit/issues/ list), to see if you find similar, for examplehttp://code.google.com/p/google-web-toolkit/issues/detail?id=1532can..., but again, that is hosted mode not web mode (and seems not reproducable). //Adam On 15 Feb, 08:46, GWTFan valavanur...@gmail.com wrote: We have developed a fairly large scale application using GWT 1.5.3. While the application works reasonably well in IE7.0, Firefox, and chrome, it crashes during some operations in IE6.0. The crash log is below. We are scheduled to go to production and most of our users use IE6.0. Need help! Regards, Mukund # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x7dcdc6f4, pid=5536, tid=2508 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) # Problematic frame: # C [mshtml.dll+0xac6f4] # --- T H R E A D --- Current thread (0x00824290): JavaThread main [_thread_in_native, id=2508] siginfo: ExceptionCode=0xc005, reading address 0x Registers: EAX=0x2d36039a, EBX=0x0006a084, ECX=0x, EDX=0x0072 ESP=0x00069e64, EBP=0x00069f94, ESI=0x01a9, EDI=0x EIP=0x7dcdc6f4, EFLAGS=0x00010206 Top of Stack: (sp=0x00069e64) 0x00069e64: 0006f4d0 0006a084 00069e7c 0x00069e74: 7dcb53ba 0006a0fc 00069eb4 7dcab6b4 0x00069e84: 2cfe6e80 00069ea4 7dcaf232 00069ec8 0x00069e94: 7dcdf5ab 0006f458 2cfb2850 289a0778 0x00069ea4: 3bc6 3bc6 289a0750 0x00069eb4: 0006a148 00069ed4 7dcaf232 00069ef8 0x00069ec4: 00069f70 0x00069ed4: 00069ee8 7dcaed15 00069fa0 0006a148 Instructions: (pc=0x7dcdc6f4) 0x7dcdc6e4: 75 f4 8d 8d 0c ff ff ff e8 40 ce fd ff 8b 4d f8 0x7dcdc6f4: 8b 01 a8 08 0f 85 4c b0 07 00 a8 03 0f 85 43 fe Stack: [0x0003,0x0007), sp=0x00069e64, free space=231k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [mshtml.dll+0xac6f4] C [mshtml.dll+0xafdbe] C [mshtml.dll+0x21847e] C [mshtml.dll+0xacb91] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xaeb7c] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xad7d8] C [mshtml.dll+0xacffc] C [mshtml.dll+0xad8a4] C [mshtml.dll+0xbcd44] C [mshtml.dll+0x124f03] C [mshtml.dll+0xaded7] C [mshtml.dll+0xadcc7] C [mshtml.dll+0x83080] C [mshtml.dll+0x83024] C [mshtml.dll+0x68a9a] C [USER32.dll+0x8724] C [USER32.dll+0x8806] C [USER32.dll+0xb4b0] C [USER32.dll+0xb4fc] C [ntdll.dll+0xeae3] C [USER32.dll+0x8a00] C [swt-win32-3235.dll+0x2273] j org.eclipse.swt.internal.win32.OS.DispatchMessageW(Lorg/eclipse/swt/ internal/win32/MSG;)I+0 j org.eclipse.swt.internal.win32.OS.DispatchMessage(Lorg/eclipse/swt/ internal/win32/MSG;)I+7 j org.eclipse.swt.widgets.Display.readAndDispatch()Z+50 j com.google.gwt.dev.GWTShell.pumpEventLoop()V+16 j com.google.gwt.dev.GWTShell.run()V+23 j com.google.gwt.dev.GWTShell.main([Ljava/lang/String;)V+20 v ~StubRoutines::call_stub V [jvm.dll+0x845a9] V [jvm.dll+0xd9317] V [jvm.dll+0x8447a] V [jvm.dll+0x8b44a] C [javaw.exe+0x14c5] C [javaw.exe+0x3151] C [kernel32.dll+0x16fd7] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.win32.OS.DispatchMessageW(Lorg/eclipse/swt/ internal/win32/MSG;)I+0 j
Re: GWT and Tapestry 5 integration
Great sample project and instructions. I was able to get up and running using Eclipse and Jetty. On Feb 13, 7:48 am, Casey j.casey.one...@gmail.com wrote: Thanks for putting this up. I'm going to take a look it at now. On Jan 6, 1:51 pm, Daniel Jue teamp...@gmail.com wrote: Hi, I'm relatively new to GWT, but I've been working with Apache Tapestry 5 for a while now. I've written a tutorial (with source code as an Eclipse project) on the Tapestry Wiki. It's based on some older tutorials that are out there (thanks Pär Dahlberg). It includes cases for using multiple instantiations of an entrypoint on one page, each acting independently. The source includes a single Tapestry page that runs two simple dialog boxes, and two independant stock watchers. ( In other examples online, there was no example for mixing in an RPC entrypoint.) http://wiki.apache.org/tapestry/Tapestry5GWTIntegration This setup has Tapestry as the parent web app framework, which handles multiple pages and components (and nested components). The tutorial outlines a way to embed your GWT application as a component on a page. (either the component template or the page template supplies the html you were using in your .html files with GWT development) I am not using Hosted Mode in this tutorial. I got the Stock Watcher app up and running in another project, and then copied the Java source over. The tutorial uses Maven to build your entrypoints and feeds the JS output back into the web app source. RPC Service class files end up in the target dir with the Tapestry class files. If you are interested, please let me know what improvements I can make. Regards, Daniel Jue --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT and Tapestry 5 integration
Were you able to get this to work in GWT hosted mode? On Feb 15, 11:10 am, Casey j.casey.one...@gmail.com wrote: Great sample project and instructions. I was able to get up and running using Eclipse and Jetty. On Feb 13, 7:48 am, Casey j.casey.one...@gmail.com wrote: Thanks for putting this up. I'm going to take a look it at now. On Jan 6, 1:51 pm, Daniel Jue teamp...@gmail.com wrote: Hi, I'm relatively new to GWT, but I've been working with Apache Tapestry 5 for a while now. I've written a tutorial (with source code as an Eclipse project) on the Tapestry Wiki. It's based on some older tutorials that are out there (thanks Pär Dahlberg). It includes cases for using multiple instantiations of an entrypoint on one page, each acting independently. The source includes a single Tapestry page that runs two simple dialog boxes, and two independant stock watchers. ( In other examples online, there was no example for mixing in an RPC entrypoint.) http://wiki.apache.org/tapestry/Tapestry5GWTIntegration This setup has Tapestry as the parent web app framework, which handles multiple pages and components (and nested components). The tutorial outlines a way to embed your GWT application as a component on a page. (either the component template or the page template supplies the html you were using in your .html files with GWT development) I am not using Hosted Mode in this tutorial. I got the Stock Watcher app up and running in another project, and then copied the Java source over. The tutorial uses Maven to build your entrypoints and feeds the JS output back into the web app source. RPC Service class files end up in the target dir with the Tapestry class files. If you are interested, please let me know what improvements I can make. Regards, Daniel Jue --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
cannot run applicationCreator under MS Vista - IE
Hi, I downloaded GWT dev package and trying to run applicationCreater and sample scripts. It appears none of them work at all. Could this be blocked by the IE or anti-virus program? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT 1.6 works on 64 bits?
Hi. We all want to know, GWT 1.6 works on 64 bits? Thank you. Best Regards; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Tweaking HorizontalSplitPanel
Hi guys, For quite some time I have been hesitant to invest some time into GWT as a result of my aversion for the rigid nature of the Java language. Recently I could no longer resist since the toolkit simply looks too impressive. One very basic issue I ran into fairly quickly: I applied the HorizontalSplitPanel and I noticed that the left pane did not have a minimum width. I wanted it to have a minimum width in order to prevent users from accidentally making the pane disappear. So I thought the solution should be simple: extend the HorizontalSplitPanel and override one of its methods that deal with splitter movement. Turned out that HorizontalSplitPanel is a final class and cannot be extended. Grmbhh... I felt some old Java anger boiling up already, but I decided to suppress that emotion and ask for some advice here instead. How to deal with this problem (and UI detail issues in general)? Regards, Tim Molendijk --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT 1.6 works on 64 bits?
As far as i know gwt, and js is bit independent:) If you have a browser on a 64 bit machine that supports a js engine and gwt supports that:) it will work, so bravely i can say that the current gwt support it aswell. 2009/2/15 anderson...@gmail.com anderson...@hotmail.com Hi. We all want to know, GWT 1.6 works on 64 bits? Thank you. Best Regards; -- Best Regards Tóth Imre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT and Tapestry 5 integration
Hi, Thanks for trying out the tutorial. I hope this list doesn't mind the cross traffic. Glad you were able to get it working with Jetty. My projects have so many Tomcat dependencies that I tend to develop with it exclusively, and haven't had much time to play with Jetty. I didn't really try getting it to work in hosted mode. I don't think hosted mode would handle loading the Tapestry servlet filter, but I may be wrong. I'm still not very experienced in GWT project setups, beyond the standard archetype. I feel that if your entrypoint is self-reliant, you can have an HTML file in your public directory, allowing you to do some rapid development on a single entrypoint at a time. The HTML file in the public directory is not being used by the application in the tutorial, but could be used in development with some tweaking. --That is, the public HTML files could be used as a development aids, but ultimately the Tapestry templates will be hosting the entrypoints. Tapestry uses templates with it's own DTD, but the syntax is so close to HTML as to be editable by artsy web designers. It's not like a JSP that gets turned inside out. The goal was to keep artsy designers from messing up code, and keep the coders from trying to be artsy. ;-) The person who wrote an older tutorial said he had his GWT entrypoints as a separate project (with all the standard GWT project settings), and then the source was combined into the main Tapestry application later. On Sun, Feb 15, 2009 at 11:27 AM, Casey j.casey.one...@gmail.com wrote: Were you able to get this to work in GWT hosted mode? On Feb 15, 11:10 am, Casey j.casey.one...@gmail.com wrote: Great sample project and instructions. I was able to get up and running using Eclipse and Jetty. On Feb 13, 7:48 am, Casey j.casey.one...@gmail.com wrote: Thanks for putting this up. I'm going to take a look it at now. On Jan 6, 1:51 pm, Daniel Jue teamp...@gmail.com wrote: Hi, I'm relatively new to GWT, but I've been working with Apache Tapestry 5 for a while now. I've written a tutorial (with source code as an Eclipse project) on the Tapestry Wiki. It's based on some older tutorials that are out there (thanks Pär Dahlberg). It includes cases for using multiple instantiations of an entrypoint on one page, each acting independently. The source includes a single Tapestry page that runs two simple dialog boxes, and two independant stock watchers. ( In other examples online, there was no example for mixing in an RPC entrypoint.) http://wiki.apache.org/tapestry/Tapestry5GWTIntegration This setup has Tapestry as the parent web app framework, which handles multiple pages and components (and nested components). The tutorial outlines a way to embed your GWT application as a component on a page. (either the component template or the page template supplies the html you were using in your .html files with GWT development) I am not using Hosted Mode in this tutorial. I got the Stock Watcher app up and running in another project, and then copied the Java source over. The tutorial uses Maven to build your entrypoints and feeds the JS output back into the web app source. RPC Service class files end up in the target dir with the Tapestry class files. If you are interested, please let me know what improvements I can make. Regards, Daniel Jue --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Code refactoring to minimize listeners decoupling actions from view class
Well the purpose of separating out the action related methods from the view is code reusability and testability without actually using the GWT container. Thus we thought that it would be a good idea if we follow supervising controller pattern. And we would also like to minimize the number of listeners in our app to enhance performance. On Feb 14, 5:15 pm, gregor greg.power...@googlemail.com wrote: Hi dodo, Currently in my app all the services and action related methods are there inside the view class itself. How can Irefactormy code to decouple action related methods in a different controller/supervisor class? Why would you want to do that? GWT follows (roughly) Swing/SWT programing model which is sometimes known as Model Delegate, a derivative of Model View Controller in which the Controllers and Views are merged: http://c2.com/cgi/wiki?ModelDelegate Therefore the current situation as you describe is typical. There are specific situations where it is a good idea to abstract action related code to separate controllers, and various ways to do it, but It is use case dependent. Another aspect of my problem is that, I have created composite widgets of my own, thus when a event is generated by an inner widget I should get the reference of sender and since I need to perform action on some other inner widget thus I need reference of that also. How can I achieve this without actually taking a direct reference of each inner widget of my composite? Again, this is a standard pattern with a Composite and makes for simpler more readable code. If (and only if) the widgets contained in the composite are invisible to the outside world (private , no public getters) then it is simplest and cleanest to have them call each other directly as necessary. For example if you have a row of tool buttons then a single ClickListener can handle their clicks and the main Composite can control behaviour most simply e.g. : public void onClick(Widget sender) { if (sender==button1) {doX();} if (sender==button2 {doY();} // where doX() and doY() are private methods of the composite } Where an event fired from such private widgets does need to be propagated to the outside world, it is common to to delegate the task to the Composite itself, for example: public void onClick(Widget sender) { if (sender==button1) { this.listeners.fireChange(this); // i.e. not the button } So the Composite provides a single view to the outside world, and the internals can talk to each other freely in the knowledge no outside class has any knowledge of them (i.e. they are fully encapsulated, and outside client classes register listeners with the Composite itself only.). There are specific classes in GWT to assist with this idea, for example DelegatingClickListenerCollection etc. I think this may be the origin of the Model Delegate pattern name. Basically it makes coding many common UI situations simpler and more readable than full MVC decomposition with no nasty side effects in most cases. Some situations benefit from full MVC decomposition. One example is a bulk data grid renderer, especially where the user can sort by column etc. Having a controller that manages and coordinates the paging/ sorting with the server data source separately from the view is probably worth it. Another is where you have several views in the UI that show different aspects of the same data model. For example a work flow process might have several views, and a step might be ticked off in any of them, but that might require an update of all the other views as well. That implies a single shared model which in turn argues for a single controller with which the views interact and listen to. regards gregor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: importing two type of window classes
Hi, I don't see any problem with them co-existing. I use them. just specify the fully qualified class names (at leat for one) com.gwtext.client.widgets.Window window = new com.gwtext.client.widgets.Window(); window.setSize(com.gwtext.client.widgets.Window.getClientWidth(), com.gwtext.client.widgets.Window.getClientHeight()); On Feb 14, 10:47 pm, ytbryan ytbr...@gmail.com wrote: can someone give me a clue on this matter? thank you! On Feb 13, 9:52 am, ytbryan ytbr...@gmail.com wrote: hi all, if i want a feature from gwt Window that is not found in gwtext Window, what should i do? Since, com.google.gwt.user.client.Window and com.gwtext.client.widgets.Window cannot co-exist. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Problems adding listeners to a user-defined textarea
I want to add listeners to some user-supplied HTML that has been added to the DOM. If I create a new TextArea it works but none of the user's properties or attributes carry over. If I create a FocusWidget or TextAreaBase with the user's Element all works well only in IE7. (No indication that events are triggered in FF3, Safari, Opera, or Chrome). I can use getProperty and setProperty to transfer properties to the new TextArea but how do I iterate over the properties (and attributes) of an Element? Thanks in advance. -ken kahn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT and Tapestry 5 integration
To me, GWT and Tapestry seem like the perfect mix so I was very excited when I found your tutrial. I think it will be great to use tapestry to do basic things like authentication and then use GWT to enhance the UI. I have four years of experience with tapestry 3. 0 and about a year with GWT 1.4. Unfortunately that has been followed by about 9 months off but I'm trying to get back to it. Anyway, in my previous GWT 1.4 project, I developed in Eclipse and I was able to have Jetty host the back end while using a Java application launcher to run the GWT hosted browser in no server mode. Unfortunately I haven't had any such luck trying to get the your GWT components running either in full hosted mode or no server mode. I've targeted the StockWatcher module since it's the only one with an html file in the public directory but when it launches I get the following error: [ERROR] Unable to find type 'se.pmdit.tutorial.t5gwt.gwt.client.StockWatcher' [ERROR] Hint: Check that the type name 'se.pmdit.tutorial.t5gwt.gwt.client.StockWatcher' is really what you meant [ERROR] Hint: Check that your classpath includes all required source roots I've specifically added the src directory to the Java app but still no luck. With your sample project, are you able to launch hosted mode for a single (or multiple) module? Like you said, I really want to shoot for a rapid development environment where you could develop tapestry and GWT and the same time. On Feb 15, 11:52 am, Daniel Jue teamp...@gmail.com wrote: Hi, Thanks for trying out the tutorial. I hope this list doesn't mind the cross traffic. Glad you were able to get it working with Jetty. My projects have so many Tomcat dependencies that I tend to develop with it exclusively, and haven't had much time to play with Jetty. I didn't really try getting it to work in hosted mode. I don't think hosted mode would handle loading the Tapestry servlet filter, but I may be wrong. I'm still not very experienced in GWT project setups, beyond the standard archetype. I feel that if your entrypoint is self-reliant, you can have an HTML file in your public directory, allowing you to do some rapid development on a single entrypoint at a time. The HTML file in the public directory is not being used by the application in the tutorial, but could be used in development with some tweaking. --That is, the public HTML files could be used as a development aids, but ultimately the Tapestry templates will be hosting the entrypoints. Tapestry uses templates with it's own DTD, but the syntax is so close to HTML as to be editable by artsy web designers. It's not like a JSP that gets turned inside out. The goal was to keep artsy designers from messing up code, and keep the coders from trying to be artsy. ;-) The person who wrote an older tutorial said he had his GWT entrypoints as a separate project (with all the standard GWT project settings), and then the source was combined into the main Tapestry application later. On Sun, Feb 15, 2009 at 11:27 AM, Casey j.casey.one...@gmail.com wrote: Were you able to get this to work in GWT hosted mode? On Feb 15, 11:10 am, Casey j.casey.one...@gmail.com wrote: Great sample project and instructions. I was able to get up and running using Eclipse and Jetty. On Feb 13, 7:48 am, Casey j.casey.one...@gmail.com wrote: Thanks for putting this up. I'm going to take a look it at now. On Jan 6, 1:51 pm, Daniel Jue teamp...@gmail.com wrote: Hi, I'm relatively new to GWT, but I've been working with Apache Tapestry 5 for a while now. I've written a tutorial (with source code as an Eclipse project) on the Tapestry Wiki. It's based on some older tutorials that are out there (thanks Pär Dahlberg). It includes cases for using multiple instantiations of an entrypoint on one page, each acting independently. The source includes a single Tapestry page that runs two simple dialog boxes, and two independant stock watchers. ( In other examples online, there was no example for mixing in an RPC entrypoint.) http://wiki.apache.org/tapestry/Tapestry5GWTIntegration This setup has Tapestry as the parent web app framework, which handles multiple pages and components (and nested components). The tutorial outlines a way to embed your GWT application as a component on a page. (either the component template or the page template supplies the html you were using in your .html files with GWT development) I am not using Hosted Mode in this tutorial. I got the Stock Watcher app up and running in another project, and then copied the Java source over. The tutorial uses Maven to build your entrypoints and feeds the JS output back into the web app source. RPC Service class files end up in the target dir with the Tapestry class files. If you are interested, please let me know what improvements I can make. Regards, Daniel Jue
GWT AJAX JSON on firefox not well form error.how to solve?
load a local json text file on firefox by ajax would get not well form error msg. to solve this problem on javascript is comment out this command: xmlHttpObject.overrideMimeType('text/xml'); but GWT bundle all code in RequestBuilder, developers can't changed js code directly if they don't like to recompile GWT. is any other way to solve 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Third party libraries for GWT
The two major UI libraries right now for GWT are Ext GWT and Smart GWT. There are some similarities and some differences. I've used both and they both allow for a look and feel on your GWT app that would take a lot of custom development to achieve. They both have some very nice widgets in both functionality and look. Ext GWT is a commercial, paid for library, Smart GWT is free and open source. I think that Ext GWT is a bit more stable, but neither is particularly unstable. The Smart GWT guys are also working on some interesting server side linkage to the UI components. Both have features that neither have. Being very attractive modern UI components, neither is light weight as they require a bunch of javascript and some nifty DOM manipulation (like all of the other Javascript UI libraries mind you!). So if your prospective client machines are a bunch of old Pentium III's running IE6 (my current burden!) then neither is particularily a good choice. In the end, I would score them as a tie. If your organization won't pay for their libraries, then Smart GWT is the only way to go. If your organization can't or won't use open source type of stuff, then Ext GWT is the way. Both require a lot of diligence and effort, as any good UI library does. But after a little learning curve, you'll be able to produce web UI's that are in a class equal to the richest heavy client. Good luck. Later, Shaffer On Feb 14, 10:53 pm, Shawn Brown big.coffee.lo...@gmail.com wrote: I came across GWT EXT, EXT GWT, SmartGwt, and a ton of other third party libraries. 1. Which third-party libraries would you recommend in general and why. 2. Which third-party libraries would you want to stay away from and why. Well anyone can correct me if I am wrong but I think GWT EXT development has stopped since it's basically a wrapper around ext JS (same makers of EXT GWT) which switched it's license to gpl3. this means GWT EXT only works with an older version of EXT JS that may not have bug fixes or security fixes. GWT EXT recommends switching over to SmartGwt ... seehttp://gwt-ext.com/forum/viewtopic.php?f=13t=3465 Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT and Tapestry 5 integration
Got it! Apparently under the lanucher classpath entries, pointing the src directory was not enough. I had to place an entry to src/main/ java. I am now able to edit tapestry pages and GWT components in the hosted mode browser without the need to refresh any directories. All changes are live! I could possibly be missing something but so far I've editied the GWT java files and the Tapestry Start.html, both are in the source directory, and both changes show up in the browser without the need for a restart. Here is what I did: Back End., I like to you the JettyLanucher Eclipse plugin so I created a new Jetty Launch dialog and pointed it to my jetty.xml file.My VM arguments are as follow -Djetty.home=/Users/casey/Projects/opt/jetty-5.1.11RC0 -Dorg.apache.tapestry.disable-caching=true -DignoreDuplicateModuleError=true -Xmx512m -Xms128m -XX:PermSize=256M Now that I have the back end up and running like a regular tapestry project, I want to run GWT in hosted mode so that I can make like changes to GWT components without having to run the maven GWT compile command and then refreshing the src/main/webapp directory in eclipse. 1. Go to the debug menu and create a new Java Application Launcher 2. On the main tab set the following: a. Project to myapp b. Set the main class to com.google.gwt.dev.GWTShell 3. On the arguments tab: a. Set the program arguments to: -noserver -out www -whitelist localhost[:]8080 -port 8080 b. Set the VM arguments to: -XstartOnFirstThread -Xmx512M 4. On the Classpath tab, select the user entries click the Advanced button and choose add folder. Then select the src/main/java folder. This must be the java folder and not the src folder. I have the java folder ahead of the myapp entry but I'm not sure if it makes a difference. 5. Everything else stays the same so just click the Debug button. At this point you clicked the Debug button for both your Jetty entry and the Java application entry. Both need to be running at the same time. 6. When the GWT Hosted Browser pops up, click the Hosted Browser button. At that point, you should be able to make changes to tapestry and GWT. Let me know if you have any problems. On Feb 15, 1:31 pm, Casey j.casey.one...@gmail.com wrote: To me, GWT and Tapestry seem like the perfect mix so I was very excited when I found your tutrial. I think it will be great to use tapestry to do basic things like authentication and then use GWT to enhance the UI. I have four years of experience with tapestry 3. 0 and about a year with GWT 1.4. Unfortunately that has been followed by about 9 months off but I'm trying to get back to it. Anyway, in my previous GWT 1.4 project, I developed in Eclipse and I was able to have Jetty host the back end while using a Java application launcher to run the GWT hosted browser in no server mode. Unfortunately I haven't had any such luck trying to get the your GWT components running either in full hosted mode or no server mode. I've targeted the StockWatcher module since it's the only one with an html file in the public directory but when it launches I get the following error: [ERROR] Unable to find type 'se.pmdit.tutorial.t5gwt.gwt.client.StockWatcher' [ERROR] Hint: Check that the type name 'se.pmdit.tutorial.t5gwt.gwt.client.StockWatcher' is really what you meant [ERROR] Hint: Check that your classpath includes all required source roots I've specifically added the src directory to the Java app but still no luck. With your sample project, are you able to launch hosted mode for a single (or multiple) module? Like you said, I really want to shoot for a rapid development environment where you could develop tapestry and GWT and the same time. On Feb 15, 11:52 am, Daniel Jue teamp...@gmail.com wrote: Hi, Thanks for trying out the tutorial. I hope this list doesn't mind the cross traffic. Glad you were able to get it working with Jetty. My projects have so many Tomcat dependencies that I tend to develop with it exclusively, and haven't had much time to play with Jetty. I didn't really try getting it to work in hosted mode. I don't think hosted mode would handle loading the Tapestry servlet filter, but I may be wrong. I'm still not very experienced in GWT project setups, beyond the standard archetype. I feel that if your entrypoint is self-reliant, you can have an HTML file in your public directory, allowing you to do some rapid development on a single entrypoint at a time. The HTML file in the public directory is not being used by the application in the tutorial, but could be used in development with some tweaking. --That is, the public HTML files could be used as a development aids, but ultimately the Tapestry templates will be hosting the entrypoints. Tapestry uses templates with it's own DTD, but the syntax is so close to HTML as to be editable by artsy web designers. It's not like a JSP that gets turned inside out. The goal was to
Re: ServiceImpl and existing java app
Thanks for the reply Shaffer. The problem is my app needs to run completely independently from the client. As is; the application will be launched once a web client makes an RPC request. Let me try to clarify as I may have been misunderstood. I am developing a GUI based java application which will have a web server embedded in it - Jetty in this case. Once I launch the application, it will act as a web server and therefore web browsers will be able to connect to it and get the GWT app and execute it. The GWT app needs to make RPC to the java app to retrieve information. Now, the ServiceImpl is instantiated once the first RPC call is made (is this wrong?) it needs to somehow refer to the already running app and call a method from it without re-instantiating a new version. Basically I'm trying to connect my webapp to an already executing java app. There has got to be a way to do this, right? Thanks. On Feb 14, 5:24 pm, mikedshaf...@gmail.com mikedshaf...@gmail.com wrote: If I'm understanding what you're attempting correctly, that's the easiest way to do it. Your ServiceImpl is still running in pure Java, and that's where an existing Java app can live. Your client will be compiled out into Javascript, so if you wanted your existing Java classes to be available on the client, the will be subject to the GWT compilation process. An amazing and powerful process, but it might yield references to Java libraries that are not compatible with the GWT Java/Javascript library. Good luck! Later, Shaffer On Feb 14, 9:21 am, hermis ermis.h...@gmail.com wrote: Hello all, I am developing a Java application which will eventually embed a HTTP server and then act as the server for my GWT application. I need help with getting the GWT app to access a method in the Java app :) Until now, just for the sake of developing I have been instantiating my java app in the ServiceImpl and calling the required method from there. What is the proper way of doing this? How do I connect the ServiceImpl to my app? 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Where does word wrap occurs?
Hello, I have a text of unknown length and content and put this text in Label. Label has fixed width, thus word wrapping occurs (possibly several times). And questions is if it possible to find at what letters/words wrappings have happened. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Code refactoring to minimize listeners decoupling actions from view class
I take it you mean: http://martinfowler.com/eaaDev/SupervisingPresenter.html I confess to having done nothing like as much as I probably should have with regard to testing GWT UI components. But I'm working on a bigger app now, so I have been thinking about it. A couple of points occurred to me: A GWT component is not a Java class, it is a javascript program manipulating the browser DOM. Much UI logic involves CSS, for example switching styles, etc so it would be hard to create a Test Double in the manner Fowler describes. In fact the GWT dev shell already *is* a test double in many ways. For this reason I am not sure that Supervising Controller affords the same advantages for testing in GWT as it might in Swing for example. So I am looking at a model something like this: Put components (or batches of closely related components) into separate modules (there is no overhead in either dev or production for this AFAIK). Make a test Entrypoint class in a separate module (e.g.MyComponent_test.gwt.xml) for each of these component modules so they can be individually test driven. Use the GWTTestCase Junit extension to drive the component tests via this Entrypoint. Use of Observer pattern is important to enable this, i.e. it is important that no component has any upwards dependencies or this becomes more difficult, e.g. you start to need mock versions of things. On the listeners issue: a) yes, this is why using a single listener as per I described above is efficient. b) There is definitely an overhead associated with listeners, so at a certain level of application complexity you need to worry about it. See Google's own doc: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=FAQ_UIUseOneListener c) In relation to another discussion about listeners I did a quick test to see how GWT generates javascript for them. You may find it interesting, it's towards the bottom of this thread: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1fa4af5d2728c5ab/d693b9ac6256fde1?lnk=gstq=gregor+clicklistener#d693b9ac6256fde1 d) I think the issue is mainly the total number of listeners of a each type (i.e. the compiled javascript has a list of ClickListeners, another list of ChangeListeners etc which need to be checked in response browser events). I think if you have, say, 10 or 20 click listeners, that's no real problem, but if you have 100 then there may be an issue with this and you may need to look at ways to get the count down. Sharing a listener between multiple widgets within a Composite is a simple way to do that which does not break encapsulation. On Feb 15, 4:55 pm, dodo rajd...@gmail.com wrote: Well the purpose of separating out the action related methods from the view is code reusability and testability without actually using the GWT container. Thus we thought that it would be a good idea if we follow supervising controller pattern. And we would also like to minimize the number of listeners in our app to enhance performance. On Feb 14, 5:15 pm, gregor greg.power...@googlemail.com wrote: Hi dodo, Currently in my app all the services and action related methods are there inside the view class itself. How can Irefactormy code to decouple action related methods in a different controller/supervisor class? Why would you want to do that? GWT follows (roughly) Swing/SWT programing model which is sometimes known as Model Delegate, a derivative of Model View Controller in which the Controllers and Views are merged: http://c2.com/cgi/wiki?ModelDelegate Therefore the current situation as you describe is typical. There are specific situations where it is a good idea to abstract action related code to separate controllers, and various ways to do it, but It is use case dependent. Another aspect of my problem is that, I have created composite widgets of my own, thus when a event is generated by an inner widget I should get the reference of sender and since I need to perform action on some other inner widget thus I need reference of that also. How can I achieve this without actually taking a direct reference of each inner widget of my composite? Again, this is a standard pattern with a Composite and makes for simpler more readable code. If (and only if) the widgets contained in the composite are invisible to the outside world (private , no public getters) then it is simplest and cleanest to have them call each other directly as necessary. For example if you have a row of tool buttons then a single ClickListener can handle their clicks and the main Composite can control behaviour most simply e.g. : public void onClick(Widget sender) { if (sender==button1) {doX();} if (sender==button2 {doY();} // where doX() and doY() are private methods of the composite } Where an event fired from such private widgets does need to be propagated to the outside world, it is
Re: GWT Serialization issue with detachable JDO class
Unfortunately, the GWT serialization process is not really neither documented nor extensible :-( I opened a RFE about it (http://code.google.com/p/google-web-toolkit/ issues/detail?id=1291can=1), but it is still marked as new an no one seems to care about it. That's why the solution implemented on Gilead seems to me the only one compatible without modifying GWT source code. Note that BlazeDS (the serialization library for Flex framework) has been *thought* to be extensible and provides extensions points with adapters and factory concept. I would really hope that GWT developers will be inspired by it when they will refactor the RPC serialization process. Regards Bruno On 15 fév, 01:37, Prempena pascal.rempena...@gmail.com wrote: Yes, I've read in detail all the Gilead documentation and also tried the examples. Good job indeed! But it is a pity to have to duplicate an object already available to be used at the client side, just because of serialization issues. We should be able to customize the GWT serialization process in order to have a completely opened data transfer between the server and the client. Do you know if there is some detailed documentation about the GWT serialization? On 14 fév, 21:07, noon bruno.marches...@gmail.com wrote: Hi, It really looks like similar issues with Hibernate entities (failure on GWT serialization). The solution I implemented on Gilead library (http:// gilead.sourceforge.net) is based on beanlib, that clones your entities to make them acceptable to GWT serializer. Hope this helps Bruno On 14 fév, 13:18, Prempena pascal.rempena...@gmail.com wrote: Hi, I would like to be able to use JDO objects, persisted by Datanucleus, directly in the GWT client, after the class has been serialized from the server to the client via the GWT serialization mechanism. It works fine when working with transient JDO objects. I'm able to move the object back and forth between the client and the server without any issue. Unfortunately, when the class is tagged as detachable (with the goal to allow the update of the object in the datastore when coming back to the server), the GWT Serialization doesn't work, due to some objects added by the enhancement process: Object[] jdoDetachedState. Of course, I would like to avoid JDO Object copy to a POJO serializable by GWT: it is waste of time and painful to do. Any Idea to help me to find a solution or a workaround to solve this issue? Thanks in advance,- Masquer le texte des messages précédents - - Afficher le texte des messages précédents - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
undefined error
I got an error in which the server side finishes processing but the information does not load into the front end. In Safari, I turned on the Developer menu and looked at the Console. It shows an error on that page that says undefined on line 866 of http://my.domain.com/***/some-big-number.cache.html. When I click on that error from the console, it brings me to that line which looks like the following: ** snip function jI(e,d,c,h){hI();var a,b,f,g;if(e===null){throw eI(new dI (),'Unable to parse null');}b=oJ(e);f=b0iJ(e,0)==45?1:0;for (a=f;ab;a++){if(dG(iJ(e,a),d)==(-1)){throw eI(new dI(),'Could not parse '+e+' in radix '+d);}}g=kI(e,d);if(iI(g)){throw eI(new dI (),'Unable to parse '+e);}else if(gc||gh){throw eI(new dI(),'The string '+e+' exceeds the range for the requested data type');}return g;} * snip It's pretty cryptic generated code from GWT. I imagine it means there's an undefined variable or function. Any idea how to track that down or better yet, any idea what I might have done to cause it? We're using GWT 1.4.something --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to debug/resolve RPC call problem?
Hi, When you deploy it in the server do you have a separate web.xml? In the web.xml, Do you have the GWT shell servlet as the mapped to /* url? Are you using any security filters, mapped to the service urls? Is there any other services working in your app or do you see the same issue with all the remote services? Is the server started in debug mode?... if so try putting break points in the RemoteServiceServlet.doPost(...) and RemoteServiceServlet.processCall(...) methods. On Feb 14, 7:22 pm, BobM bmar...@bcscomputers.com wrote: Yes. It certainly seems to be a glasfish message, but it is hosted mode. I am using netbeans 6.5 and glassfish v3 prelude. When I click Debug main project in NB, it deploys to glassfish but brings up the hosted mode shel and runs the app in a sub shell. On Feb 14, 5:28 pm, gregor greg.power...@googlemail.com wrote: That looks like a glassfish message? Are we talking about hosted mode here or web mode? On Feb 14, 8:07 pm, BobM bmar...@bcscomputers.com wrote: This is how the service is called: selectionSearchService.findAllLikeThis(serviceProvider, selectionSearchCallBack); How the service is setup in the module xml file: servlet path=/selectionSearchService class=org.bcs.server.SelectionSearchServiceImpl / this is the report from caught.getMessage(): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;htmlheadtitleGlassFish/v3 - Error report/titlestyle type=text/css!--H1 {font- family:Tahoma,Arial,sans-serif;color:white;background- color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans- serif;color:white;background-color:#525D76;font-size:16px;} H3 {font- family:Tahoma,Arial,sans-serif;color:white;background- color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans- serif;color:black;background-color:white;} B {font- family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans- serif;background:white;color:black;font-size:12px;}A {color : black;} HR {color : #525D76;}--/style /headbodyh1HTTP Status 404 - / h1hr/pbtype/b Status report/ppbmessage/b/ ppbdescription/bThe requested resource () is not available./ phr/h3GlassFish/v3/h3/body/html There are no log entries showing on the hosted mode shell window; it is clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ServiceImpl and existing java app
I m not sure I completely understand. But can you store the instance in the servlet context and retrieve it for subsequent requests. On Feb 15, 2:29 pm, hermis ermis.h...@gmail.com wrote: Thanks for the reply Shaffer. The problem is my app needs to run completely independently from the client. As is; the application will be launched once a web client makes an RPC request. Let me try to clarify as I may have been misunderstood. I am developing a GUI based java application which will have a web server embedded in it - Jetty in this case. Once I launch the application, it will act as a web server and therefore web browsers will be able to connect to it and get the GWT app and execute it. The GWT app needs to make RPC to the java app to retrieve information. Now, the ServiceImpl is instantiated once the first RPC call is made (is this wrong?) it needs to somehow refer to the already running app and call a method from it without re-instantiating a new version. Basically I'm trying to connect my webapp to an already executing java app. There has got to be a way to do this, right? Thanks. On Feb 14, 5:24 pm, mikedshaf...@gmail.com mikedshaf...@gmail.com wrote: If I'm understanding what you're attempting correctly, that's the easiest way to do it. Your ServiceImpl is still running in pure Java, and that's where an existing Java app can live. Your client will be compiled out into Javascript, so if you wanted your existing Java classes to be available on the client, the will be subject to the GWT compilation process. An amazing and powerful process, but it might yield references to Java libraries that are not compatible with the GWT Java/Javascript library. Good luck! Later, Shaffer On Feb 14, 9:21 am, hermis ermis.h...@gmail.com wrote: Hello all, I am developing a Java application which will eventually embed a HTTP server and then act as the server for my GWT application. I need help with getting the GWT app to access a method in the Java app :) Until now, just for the sake of developing I have been instantiating my java app in the ServiceImpl and calling the required method from there. What is the proper way of doing this? How do I connect the ServiceImpl to my app? 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Timer / Progress bar on a form to show countdown.
Will the Timer in GWT help? On Feb 14, 12:13 pm, Vish visheshs...@gmail.com wrote: Hi All, I'm trying to show a countdown timer on a form which displays the time left for a discussion on some topic mentioned on that form. I'm not able to decide or figure out the best way to do it, also I couldn't find any earlier post discussing this. If someone can help me suggesting this it will be really helpful and I would be very thankful. Regard Vish. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to debug/resolve RPC call problem?
It looks like NB might be setting things up to run GWT hosted mode with -noserver option deploying to glassfish. In that case you have to make sure everything is set up properly for deployment to glassfish (i.e. as external server), including web.xml etc. Normally one would not recommend running -noserver option unless you had to, for example if you are using EJB's or a non-java back end. It may be NB does this because it is easier to debug hosted mode server code using glassfish + -noserver. Probably simplest thing is to consult NB forums for clues on how to stop NB doing this, i.e. get it to run hosted mode normally using embedded Tomcat server. There should be a script somewhere you can edit, or a way to install your own. The script you are looking for should have com.google.gwt.dev.GWTShell in it after a long classpath statement and one of the switches following should be -noserver as well as -style and -out etc if this theory is correct. What IDE's do is simply write versions of standard GWT start up scripts for you inserting their own choice of parameters, hiding the details. They are trying to be helpful, but often it just causes problems.The trick is to find out how to edit these scripts and take control of them. Same is true of deploying your app in web mode to production/test server IMO. It is much easier in the long run if you write your own ant script to build a WAR rather than let your IDE do it for you. This is especially true in team situation where different IDE settings can cause all sorts of problems otherwise. On Feb 15, 12:51 am, BobM bmar...@bcscomputers.com wrote: When I run in web mode, NB starts Firefox. Both hosted mode and web mode run against localhost:8080/GWTwHibernate, so I think both are running using the application deployed to glassfish. . On Feb 14, 6:22 pm, BobM bmar...@bcscomputers.com wrote: Yes. It certainly seems to be a glasfish message, but it is hosted mode. I am using netbeans 6.5 and glassfish v3 prelude. When I click Debug main project in NB, it deploys to glassfish but brings up the hosted mode shel and runs the app in a sub shell. On Feb 14, 5:28 pm, gregor greg.power...@googlemail.com wrote: That looks like a glassfish message? Are we talking about hosted mode here or web mode? On Feb 14, 8:07 pm, BobM bmar...@bcscomputers.com wrote: This is how the service is called: selectionSearchService.findAllLikeThis(serviceProvider, selectionSearchCallBack); How the service is setup in the module xml file: servlet path=/selectionSearchService class=org.bcs.server.SelectionSearchServiceImpl / this is the report from caught.getMessage(): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;htmlheadtitleGlassFish/v3 - Error report/titlestyle type=text/css!--H1 {font- family:Tahoma,Arial,sans-serif;color:white;background- color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans- serif;color:white;background-color:#525D76;font-size:16px;} H3 {font- family:Tahoma,Arial,sans-serif;color:white;background- color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans- serif;color:black;background-color:white;} B {font- family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans- serif;background:white;color:black;font-size:12px;}A {color : black;} HR {color : #525D76;}--/style /headbodyh1HTTP Status 404 - / h1hr/pbtype/b Status report/ppbmessage/b/ ppbdescription/bThe requested resource () is not available./ phr/h3GlassFish/v3/h3/body/html There are no log entries showing on the hosted mode shell window; it is clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
howto? return types in jsni methods
Hello everyone, I am struggling with return types in methods implementing native javascript interfaces. Returning strings is no problem, but calling a method that returns a map public native MapLong, GwtStock getMap() /*-{ return $wnd.parent.__getMap(); }-*/; works only in hosted mode (!) and either throws a classcast exception or returns null. Could anyone shed light on that issue. I remember reading a note somewhere that jsni methods cannot return complex types but did not really get the way around and alerted by absolutely intended behavior in hosted mode. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: howto? return types in jsni methods
Hi Denis, Unfortunately, a JavaScript Map does not equal a Java Map object. You can look at the GWT 1.5 source in some of the wrapper helper classes such as com.google.gwt.core.client.JsArray, JsArrayString, ... for some models on how to wrap a primitive Java type. -Eric. On Sun, Feb 15, 2009 at 7:38 PM, denis56 denis.ergashb...@gmail.com wrote: Hello everyone, I am struggling with return types in methods implementing native javascript interfaces. Returning strings is no problem, but calling a method that returns a map public native MapLong, GwtStock getMap() /*-{ return $wnd.parent.__getMap(); }-*/; works only in hosted mode (!) and either throws a classcast exception or returns null. Could anyone shed light on that issue. I remember reading a note somewhere that jsni methods cannot return complex types but did not really get the way around and alerted by absolutely intended behavior in hosted mode. Thanks -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: howto? return types in jsni methods
On Sun, Feb 15, 2009 at 8:09 PM, Eric Ayers zun...@google.com wrote: Hi Denis, Unfortunately, a JavaScript Map does not equal a Java Map object. You can look at the GWT 1.5 source in some of the wrapper helper classes such as com.google.gwt.core.client.JsArray, JsArrayString, ... for some models on how to wrap a primitive Java type. I meant to say a complex type... -Eric. On Sun, Feb 15, 2009 at 7:38 PM, denis56 denis.ergashb...@gmail.com wrote: Hello everyone, I am struggling with return types in methods implementing native javascript interfaces. Returning strings is no problem, but calling a method that returns a map public native MapLong, GwtStock getMap() /*-{ return $wnd.parent.__getMap(); }-*/; works only in hosted mode (!) and either throws a classcast exception or returns null. Could anyone shed light on that issue. I remember reading a note somewhere that jsni methods cannot return complex types but did not really get the way around and alerted by absolutely intended behavior in hosted mode. Thanks -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to debug/resolve RPC call problem?
Thank you, Gregor. This is good counsel. I have found there is a - noserver arg in the nbproject/build-gwt.xml file, in target debug- connect-gwt-shell. There is also a target debug-connect-gwt-shell- hosted which seems not to include this arg, but I cannot figure out how to run that target either from within NB nor from the command line. I will peel off to go over to the gwt4nb forums to get into discussions there about this issue. Before I do, can you now assure me that my code seems correct to you for implementing a standard GWT RPC setup and call? Thanks very much for your time and good counsel. I will come back to this topic later to report - hopefully - a successful conclusion. On Feb 15, 5:16 pm, gregor greg.power...@googlemail.com wrote: It looks like NB might be setting things up to run GWT hosted mode with -noserver option deploying to glassfish. In that case you have to make sure everything is set up properly for deployment to glassfish (i.e. as external server), including web.xml etc. Normally one would not recommend running -noserver option unless you had to, for example if you are using EJB's or a non-java back end. It may be NB does this because it is easier to debug hosted mode server code using glassfish + -noserver. Probably simplest thing is to consult NB forums for clues on how to stop NB doing this, i.e. get it to run hosted mode normally using embedded Tomcat server. There should be a script somewhere you can edit, or a way to install your own. The script you are looking for should have com.google.gwt.dev.GWTShell in it after a long classpath statement and one of the switches following should be -noserver as well as -style and -out etc if this theory is correct. What IDE's do is simply write versions of standard GWT start up scripts for you inserting their own choice of parameters, hiding the details. They are trying to be helpful, but often it just causes problems.The trick is to find out how to edit these scripts and take control of them. Same is true of deploying your app in web mode to production/test server IMO. It is much easier in the long run if you write your own ant script to build a WAR rather than let your IDE do it for you. This is especially true in team situation where different IDE settings can cause all sorts of problems otherwise. On Feb 15, 12:51 am, BobM bmar...@bcscomputers.com wrote: When I run in web mode, NB starts Firefox. Both hosted mode and web mode run against localhost:8080/GWTwHibernate, so I think both are running using the application deployed to glassfish. . On Feb 14, 6:22 pm, BobM bmar...@bcscomputers.com wrote: Yes. It certainly seems to be a glasfish message, but it is hosted mode. I am using netbeans 6.5 and glassfish v3 prelude. When I click Debug main project in NB, it deploys to glassfish but brings up the hosted mode shel and runs the app in a sub shell. On Feb 14, 5:28 pm, gregor greg.power...@googlemail.com wrote: That looks like a glassfish message? Are we talking about hosted mode here or web mode? On Feb 14, 8:07 pm, BobM bmar...@bcscomputers.com wrote: This is how the service is called: selectionSearchService.findAllLikeThis(serviceProvider, selectionSearchCallBack); How the service is setup in the module xml file: servlet path=/selectionSearchService class=org.bcs.server.SelectionSearchServiceImpl / this is the report from caught.getMessage(): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;htmlheadtitleGlassFish/v3 - Error report/titlestyle type=text/css!--H1 {font- family:Tahoma,Arial,sans-serif;color:white;background- color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans- serif;color:white;background-color:#525D76;font-size:16px;} H3 {font- family:Tahoma,Arial,sans-serif;color:white;background- color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans- serif;color:black;background-color:white;} B {font- family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans- serif;background:white;color:black;font-size:12px;}A {color : black;} HR {color : #525D76;}--/style /headbodyh1HTTP Status 404 - / h1hr/pbtype/b Status report/ppbmessage/b/ ppbdescription/bThe requested resource () is not available./ phr/h3GlassFish/v3/h3/body/html There are no log entries showing on the hosted mode shell window; it is clear. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at
Re: Third party libraries for GWT
Hello, Ext GWT is a commercial, paid for library, Smart GWT is free and open source. This is currently inaccurate. EXT GWT is GPL v3. It is dual licensed actually so if you do need a commercial license... http://www.extjs.com/products/license-faq.php If your organization won't pay for their libraries, then Smart GWT is the only way to go. If your organization can't or won't use open source type of stuff, then Ext GWT is the way. The Smart GWT guys are also working on some interesting server side linkage to the UI components. I just use the reverse AJAX feature in DWR and push data out from the server to GWT. DWR has a pretty good reputation in terms of security so that solution is fine for me. Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Problem with Generics and Serialization of Primitive Type Array Fields
This is all a bit tricky. Just thinking laterally for a second. Have you thought about using Collections instead of arrays? On Feb 10, 11:32 am, jsegal jason.se...@issinc.com wrote: Unfortunately, this won't work due to the bug I referenced earlier (sorry, I must have cut it out of the quoted section). This will compile, but will throw a ClassCastException due to a known bug (http://code.google.com/p/google-web-toolkit/issues/detail? id=1822): new MySerializableObjectInteger[](new Integer[] {1}) As suggested in the issue comments, it's possible to work around this by creating another class, which is a reasonable way to solve the problem for arrays of most types: class MySerializableArrayObjectT extends Serializable extends MySerializableObjectT[] { private Serializable serializableArrayField[]; void MySerializableObject(T[] value) { serializableArrayField= value; } T[] getField() { return serializableArrayField; } } The class above makes this work (for Integer, or any other non- primitive type): new MySerializableArrayObjectInteger(new Integer[] {1}); . . .But won't fix the problem for primitive types, since it is not possible to type the array version of the object for use with primitives: new MySerializableArrayObjectint(new int[] {1}); //This won't compile, of course new MySerializableArrayObjectInteger(new int[] {1}); //Nor will this, since int[] can't be autoboxed to Integer[] If you're suggesting that I can replace all uses of int[] with Integer [] in the existing code (at least the parts that need to interact with this class), you are technically correct. This will, however, leave a significant maintenance hazard for anyone else working on the app. I can document the problem, but given the context in which these classes are used, it would be tough to do so in enough places that anyone wanting to use primitive arrays would notice it. That's why I'm looking for a better work-around. I'm currently planning to make variations on MySerializableArrayObject to specifically handle each type of primitive array. I don't think this will cover some edge-cases, such as multidimensional arrays, but it looks like it may be the best solution available for now. If someone can suggest a better one, I'm still very interested. On Feb 9, 3:53 pm, Dan Ox danoxs...@gmail.com wrote: Have you tried: new MySerializableObjectInteger[](new Integer[] {1}); ? On Feb 10, 4:13 am, jsegal jason.se...@issinc.com wrote: You're correct that primitives themselves will not work, but they can be autoboxed using their Object versions. My problem is with *arrays* of primitive types, which *can* be used as parameters for for generic classes, and should (according to everything I've found on the subject) be serializable. You're right that this will not compile: new MySerializableObjectint(1); This will compile, however: new MySerializableObjectint[](new int[]{1}); As will this (due to autoboxing): new MySerializableObjectInteger(1); On the other hand, arrays cannot be autoboxed, so this will not compile: new MySerializableObjectInteger[](new int[]{1}); On Feb 6, 6:10 pm, Ben Tilford bentilf...@gmail.com wrote: Primitives do not extend Object and cannot implement Serializable. You should use the Object versions of primitives (i.e. use Integer instead of int) I don't think the code would even compile if you tried to use a primitive with generics. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Connecting to site 127.0.0.1
This one has been bugging me for a while now, and I haven't seen anything around like this one. I have a Eclipse+Cypal Studio project that has grown to a reasonable size, and while testing I still use the GWT hosted mode to run. My machine doesn't have anything else running on port , but occasionally when I start the project, the hosted browser's status bar just says Connecting to site at 127.0.0.1 but nothing happens (browser window is blank). I'd have to close GWT and restart it for it to work (sometimes 5 or 6 times before it works). I have no clue what would be causing this or even where to start to look to try and fix it. This project uses Hibernate and GWT-Ext, if that helps at all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to recognize hibernate exception on the client side
Yupp...I would suggest the same too On Feb 15, 5:22 am, jhulford jhulf...@gmail.com wrote: You can catch it in your RPC service implementation (server-side) and then rethrow it to the client as your own Exception type that's declared as part of your RPC method's signature. If I remember right, you can inspect the hibernate exception types to determine what sort of failure occurred. On Feb 13, 7:32 am, Dessorry niccolo.gianner...@gmail.com wrote: Hi my app has a service that write record in a database, how can i recognize hibernate exception such as record already wrote on the db or not-null field with null value.. If i watch the throwable arg of onfailure methpod of async callback i see that different hibernate exception have the sam exeption number: 500... thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
How to deploy GWT App?
Hi I can't find this anywhere, but have found numerous vague references. Can someone tell me What files to copy where to deploy a GWT project? My project/app compiles great, runs great. It runs great when I do the compile/browse. I see several files under projects/projectname/www/ com.blah.blah.blah.blah including a number of .cache.html, a nocache.js file, etc. But no xml file. I have tomcat running fine, and have a webapps directory, from which I'm able to browse to jsp-examples and see everything running and etc. SO, WHAT do I copy WHERE to make this work? What other files if any do I move or tweak too? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Third party libraries for GWT
Thanks for the point of clarification on Ext GWT...my bad. Our organization doesn't do the whole open source gig (long story) so I've kind of checked out of all the variations. Yes, they are GPL v3 Haven't actually looked at the connection between DWR and GWT. Worth a look! On Feb 15, 6:22 pm, Shawn Brown big.coffee.lo...@gmail.com wrote: Hello, Ext GWT is a commercial, paid for library, Smart GWT is free and open source. This is currently inaccurate. EXT GWT is GPL v3. It is dual licensed actually so if you do need a commercial license... http://www.extjs.com/products/license-faq.php If your organization won't pay for their libraries, then Smart GWT is the only way to go. If your organization can't or won't use open source type of stuff, then Ext GWT is the way. The Smart GWT guys are also working on some interesting server side linkage to the UI components. I just use the reverse AJAX feature in DWR and push data out from the server to GWT. DWR has a pretty good reputation in terms of security so that solution is fine for me. Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: cannot run applicationCreator under MS Vista - IE
How is it not working? How are you trying to run them? They are for use in the command prompt, so you will need to use that. Also be sure that you either specify the full location of applicationCreator (example: C:\gwt\applicationCreator) when running the command, or place it in your PATHS location. If you open command prompt and run applicationCreator and it says the file cannot be found or anything along those lines, then you are not accessing it properly. It shouldn't be blocked by other programs. I haven't used Vista all too much, but from my brief experience it may prompt you after you enter the command and you will have to tell it to let the program run. On Feb 15, 9:56 am, muhphn muh...@gmail.com wrote: Hi, I downloaded GWT dev package and trying to run applicationCreater and sample scripts. It appears none of them work at all. Could this be blocked by the IE or anti-virus program? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Working with RPC - How To Organize Classes To Interact With Server
I'm working on my first GWT project, which also happens to be somewhat substantial (at least for me). The project essentially is used for creating weekly, monthly, midterm, yearly, etc. reports for students. The application seems fairly simple as it only seems to consists of two main things - UI with a bunch of forms and storing / retrieving that information from a database on the server. At first I considered using something as simple as FormPanel, which would easily allow me to submit information to the server. However, it needs to be a little more interactive than FormPanel could offer, in that it needs to be able to pre-populate some data based on what is currently in the database (thus gathering that data before displaying the form is needed). So I've read up on RPC, and while the process seems easy enough (a lot to wrap your head around at once, but it's all easy to do individually I think), it seems a LOT of classes and interfaces must be written. We need a synchronous and asynchronous interfaces, implementations of the interface on the server, serializable data objects to pass between client and server, among others (for example, creating a class with Facade pattern to make generating and using that RPC proxy easier) - for each service that we interact with. In all, it seems like we are looking at around 5 classes / interfaces minimum for each service no matter how small or what it does. In my case, I do the same thing over and over again (either pull some info from database table, or add to database table), but just using different data (weekly data, monthly data, midterm data, yearly data, etc). Does anyone know a better way for me to do this than end up with tons of small files? For example, would it make sense to toss all this into one or two 'services' thus reducing the amount of files needed for server interaction? Or, is it standard to go ahead and go through all of these steps for every single one? Most texts I have read thus far that explain RPC provide good examples, but they are all separate, individual examples rather than part of a group of RPC calls. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4738 - wiki
Author: j...@google.com Date: Sun Feb 15 06:16:50 2009 New Revision: 4738 Added: wiki/NewParenthesisRemovalOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/NewParenthesisRemovalOptimization.wiki == --- (empty file) +++ wiki/NewParenthesisRemovalOptimization.wiki Sun Feb 15 06:16:50 2009 @@ -0,0 +1,8 @@ + += Introduction = + +This is a very simple optimization. It turns out that in Javascript, `new foo()` can simply be written `new foo` (as in C++). + += Performance Impact = + +None. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4736 - wiki
Author: j...@google.com Date: Sun Feb 15 06:15:02 2009 New Revision: 4736 Added: wiki/NullOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/NullOptimization.wiki == --- (empty file) +++ wiki/NullOptimization.wiki Sun Feb 15 06:15:02 2009 @@ -0,0 +1,19 @@ +#summary Removal of certain null assignments and comparisons. + += Introduction = + +As of GWT 1.5, it became possible to treat null and undefined as equivalent values. Because of this, it is no longer necessary to initialize reference types to null, nor is it necessary to explicitly compare reference types against null. This comes up in several different contexts: + +`var a = null;` = `var a;` +`_.a = null;` = [nothing] (this comes up frequently in class initialization) +`(a == null)` = `(a)` +`(a != null)` = `(!a)` +`return null` = `return` (or nothing at all, if it's at the end of a function) + += Caveats = + +This won't work with String types, because of Javascript's tendency to implicitly convert things like `` and `0` to `false` in a boolean context. + += Performance Impact = + +We've not measured this yet, but it seems very likely to only benefit performance, as there are fewer tokens, and some statements can be eliminated entirely. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4737 - wiki
Author: j...@google.com Date: Sun Feb 15 06:15:40 2009 New Revision: 4737 Modified: wiki/NullOptimization.wiki Log: Edited wiki page through web user interface. Modified: wiki/NullOptimization.wiki == --- wiki/NullOptimization.wiki (original) +++ wiki/NullOptimization.wiki Sun Feb 15 06:15:40 2009 @@ -2,7 +2,7 @@ = Introduction = -As of GWT 1.5, it became possible to treat null and undefined as equivalent values. Because of this, it is no longer necessary to initialize reference types to null, nor is it necessary to explicitly compare reference types against null. This comes up in several different contexts: +As of GWT 1.5, it became possible to treat null and undefined as equivalent values (c.f. NullIsUndefined). Because of this, it is no longer necessary to initialize reference types to null, nor is it necessary to explicitly compare reference types against null. This comes up in several different contexts: `var a = null;` = `var a;` `_.a = null;` = [nothing] (this comes up frequently in class initialization) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4740 - wiki
Author: j...@google.com Date: Sun Feb 15 06:22:23 2009 New Revision: 4740 Added: wiki/VariableDeclarationListOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/VariableDeclarationListOptimization.wiki == --- (empty file) +++ wiki/VariableDeclarationListOptimization.wiki Sun Feb 15 06:22:23 2009 @@ -0,0 +1,13 @@ +#summary Removal of unnecessary var statements. + += Introduction = + +The GWT compiler often emits variable declaration statements of the form `var a,b,c; b=...`. These can be elided slightly into simply `var a, b=..., c`. + +Variables and fields can also be initialized slightly more efficiently when they are of the same type. For example: + +`a=null; b=0; c=null` = `a=c=null; b=0` + += Performance Impact = + +None. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4739 - wiki
Author: j...@google.com Date: Sun Feb 15 06:17:36 2009 New Revision: 4739 Modified: wiki/NewParenthesisRemovalOptimization.wiki Log: Edited wiki page through web user interface. Modified: wiki/NewParenthesisRemovalOptimization.wiki == --- wiki/NewParenthesisRemovalOptimization.wiki (original) +++ wiki/NewParenthesisRemovalOptimization.wiki Sun Feb 15 06:17:36 2009 @@ -1,3 +1,4 @@ +#summary Removal of empty parentheses in new expressions. = Introduction = --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4741 - wiki
Author: j...@google.com Date: Sun Feb 15 06:32:42 2009 New Revision: 4741 Modified: wiki/VariableDeclarationListOptimization.wiki Log: Edited wiki page through web user interface. Modified: wiki/VariableDeclarationListOptimization.wiki == --- wiki/VariableDeclarationListOptimization.wiki (original) +++ wiki/VariableDeclarationListOptimization.wiki Sun Feb 15 06:32:42 2009 @@ -6,7 +6,7 @@ Variables and fields can also be initialized slightly more efficiently when they are of the same type. For example: -`a=null; b=0; c=null` = `a=c=null; b=0` +`a=null; b=0; c=null;` = `a=c=null; b=0;` = Performance Impact = --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4742 - wiki
Author: j...@google.com Date: Sun Feb 15 06:39:45 2009 New Revision: 4742 Added: wiki/ClassSetupAndInstantiationOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/ClassSetupAndInstantiationOptimization.wiki == --- (empty file) +++ wiki/ClassSetupAndInstantiationOptimization.wikiSun Feb 15 06:39:45 2009 @@ -0,0 +1,12 @@ +#summary Optimize class setup by combining Javascript and Java ctors. + += Introduction = + +Currently, the compiler generates a separate Javascript constructor function of the form `function ctor() {}`, followed by the Java constructors. This has the effect of often adding one extra empty function per class type, and complicating the instantiation of these types (because a Java `new` statement must often be translated to `javactor(new jsctor())`. + +This is somewhat complicated by the fact that Java allows multiple overloaded constructors per class, whereas Javascript can only have one. But because the compiled output doesn't depend upon the Javascript constructor for class identity (which is normally conferred by the single Javascript constructor), there's nothing stopping the compiler from simply emitting multiple Javascript constructors for a given class and assigning them the same Java type id. This would remove many extra functions and simplify object instantiation code throughout. + + += Performance Impact = + +We need to measure this, but expect the effect to be positive. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4744 - wiki
Author: j...@google.com Date: Sun Feb 15 07:25:06 2009 New Revision: 4744 Added: wiki/InlineVirtualMethodOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/InlineVirtualMethodOptimization.wiki == --- (empty file) +++ wiki/InlineVirtualMethodOptimization.wiki Sun Feb 15 07:25:06 2009 @@ -0,0 +1,30 @@ +#summary Declare certain virtual methods directly within a class' prototype initialization. + += Introduction = + +Virtual methods are added to a class' prototype using a structure like this: + +{{{ +function $method0() { ... } +function $method1() { ... } + +_ = MyClass.prototype = new SuperClass(); +_.method0 = $method0; +_.method1 = $method1; +// etc. +}}} + +There are some cases where a method's implementation is only used by a single class. In these cases, it's not necessary to declare it as a separate top-level function. In this example, if `$method1` is only used by `MyClass`, it could simply be initialized as follows: + +{{{ +function $method0() { ... } + +_ = MyClass.prototype = new SuperClass(); +_.method0 = $method0; +_.method1 = function() { ... } +// etc. +}}} + += Performance Impact = + +Likely none. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4745 - wiki
Author: j...@google.com Date: Sun Feb 15 07:35:44 2009 New Revision: 4745 Added: wiki/ClinitOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/ClinitOptimization.wiki == --- (empty file) +++ wiki/ClinitOptimization.wikiSun Feb 15 07:35:44 2009 @@ -0,0 +1,19 @@ +#summary Removal of effectively-empty clinit() functions. + += Introduction = + +The GWT compiler currently produces some clinit functions that have no effect other than to ensure that another clinit function is called. For example: + +{{{ +function $clinit_1(){ + $clinit_1 = nullMethod; + $clinit_2(); +} +}}} + +In this case, a call to $clinit_1() could simply be replaced by a call to $clinit_2(), and the $clinit_1() itself removed altogether. + + += Performance Impact = + +None, or positive. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4743 - wiki
Author: j...@google.com Date: Sun Feb 15 07:16:50 2009 New Revision: 4743 Added: wiki/IdentifierAllocationOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/IdentifierAllocationOptimization.wiki == --- (empty file) +++ wiki/IdentifierAllocationOptimization.wiki Sun Feb 15 07:16:50 2009 @@ -0,0 +1,26 @@ +#summary Reduce the size of compiled output by more carefully allocating obfuscated identifiers. + += Introduction = + +We still need to look into this, but it appears that the allocation of obfuscated identifier names is sub-optimal. There are two places this appears to happen: + +The first is a very simple case in JsObfuscateNamer, which allocates names using a simple base64 encoder. But in order to avoid using illegal leading characters, it switches to base32 for the first character. This excludes 22 valid characters (only numeric characters are illegal in this context). + +The second still requires some research, but it appears from a cursory examination of the compiled output that fields and global identifiers are allocated from the same namespace (as opposed to locals, which are not). Fixing this could lead to significantly more efficient name allocation. + += Other Notes = + +Are there other characters that are valid in Javascript identifiers, that we're not currently using? The following is the current set: + +{{{ + private static final char[] sBase64Chars = new char[] { + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '$', '_'}; +}}} + += Performance Impact = + +At best, positive. At worst, zero. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4747 - wiki
Author: j...@google.com Date: Sun Feb 15 07:40:40 2009 New Revision: 4747 Modified: wiki/CompilerOptimizations.wiki Log: Edited wiki page through web user interface. Modified: wiki/CompilerOptimizations.wiki == --- wiki/CompilerOptimizations.wiki (original) +++ wiki/CompilerOptimizations.wiki Sun Feb 15 07:40:40 2009 @@ -14,4 +14,6 @@ * IdentifierAllocationOptimization * InlineVirtualMethodOptimization * ClinitOptimization - * AggressiveClinitOptimization \ No newline at end of file + * AggressiveClinitOptimization + * NoCastCheckingOptimization + * NoClassMetadataOptimization \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4748 - wiki
Author: j...@google.com Date: Sun Feb 15 08:35:58 2009 New Revision: 4748 Added: wiki/AggressiveClinitOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/AggressiveClinitOptimization.wiki == --- (empty file) +++ wiki/AggressiveClinitOptimization.wiki Sun Feb 15 08:35:58 2009 @@ -0,0 +1,19 @@ +#summary Aggressively call clinit functions at startup. + += Introduction = + +The GWT compiler currently mimics the standard Java behavior when calling class initializers. This leads to a number of expressions like this: + +{{{ +($clinit_8() , new ClickEvent()) +}}} + +However, if we loosened this contract to allow static initializers to be called aggressively on startup, most such expressions could be eliminated. Only those clinit functions involved in circular relationships (i.e., those where two clinit functions call each other) would need to be deferred. We could also inline aggressive clinits into a single initializer, eliminating them as separate top-level functions. + += Caveats = + +Because this technically violates the Java spec, it would probably be appropriate to make this an optional optimization. + += Performance Impact = + +This optimization can only improve performance. One caveat to consider is that, because the work performed in clinits is normally amortized over the life of the application, it could slow down startup time for some apps. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4749 - wiki
Author: j...@google.com Date: Sun Feb 15 08:53:51 2009 New Revision: 4749 Added: wiki/NoCastCheckingOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/NoCastCheckingOptimization.wiki == --- (empty file) +++ wiki/NoCastCheckingOptimization.wikiSun Feb 15 08:53:51 2009 @@ -0,0 +1,15 @@ +#summary Optionally remove class cast checking. + += Introduction = + +Typecasts in Java are required to throw a ClassCastException when the cast is incorrect. In GWT compiled code, this results in expressions like `dynamicCast(..., 42)`. + +Practically speaking, however, very few applications are written such that an invalid cast is a real possibility. And even when they are, even fewer applications actually *catch* this exception. Allowing cast-checking to be turned off in production code could result in a significant performance improvement. + += Caveats = + +This is technically incorrect behavior. If the developer is unaware of this optimization, it could turn into a real minefield. It thus *must* be an optional optimization. + += Performance Impact = + +This can have a significant positive impact on performance, as many checks can be eliminated. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by br...@google.com: I really don't believe that eagerly running clinits violates the spec, technically. [http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#19075 This description] says unambiguously that certain invocations can trigger initializers to run, including certain uses of reflection. Imagine that a GWT module is a special kind of container that eagerly finds every class on the classpath and loads it using [http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#forName(java.lang.String,%20boolean,%20java.lang.ClassLoader) class.forName] to force the class to be initialized. Then it runs the entry points as normal using reflection. Granted, this behavior might violate people's assumptions about when initialization happens, but it's too harsh to say that it violates the spec. In other words, we needn't feel guilty about persuing this if it helps size and speed. For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by cromwellian: Couldn't blindly hoisting everything muck up codesplitting though by pulling in referenced code before the split point? For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4752 - wiki
Author: j...@google.com Date: Sun Feb 15 11:11:53 2009 New Revision: 4752 Modified: wiki/CompilerOptimizations.wiki Log: Edited wiki page through web user interface. Modified: wiki/CompilerOptimizations.wiki == --- wiki/CompilerOptimizations.wiki (original) +++ wiki/CompilerOptimizations.wiki Sun Feb 15 11:11:53 2009 @@ -16,4 +16,5 @@ * ClinitOptimization * AggressiveClinitOptimization * NoCastCheckingOptimization - * NoClassMetadataOptimization \ No newline at end of file + * NoClassMetadataOptimization + * PrototypeChainingOptimization \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4751 - wiki
Author: j...@google.com Date: Sun Feb 15 11:08:23 2009 New Revision: 4751 Modified: wiki/CompilerOptimizations.wiki Log: Edited wiki page through web user interface. Modified: wiki/CompilerOptimizations.wiki == --- wiki/CompilerOptimizations.wiki (original) +++ wiki/CompilerOptimizations.wiki Sun Feb 15 11:08:23 2009 @@ -1,6 +1,6 @@ #summary Starting-point for new GWT compiler optimizations. -This page serves as a starting point for a host of peephole optimizations that we are considering adding to the compiler. +This page serves as a starting point for optimizations that we are considering implementing in the GWT compiler. * ArrayAndObjectLiteralOptimization * BooleanIfExpressionOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4755 - wiki
Author: j...@google.com Date: Sun Feb 15 11:47:18 2009 New Revision: 4755 Added: wiki/LibraryOptimizations.wiki Log: Created wiki page through web user interface. Added: wiki/LibraryOptimizations.wiki == --- (empty file) +++ wiki/LibraryOptimizations.wiki Sun Feb 15 11:47:18 2009 @@ -0,0 +1,6 @@ +#summary Starting point for GWT core library optimizations. + += Introduction = + + += Details = --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by br...@google.com: Blindly doing so definitely could muck up splitting, so the splitter and clinit-runner would both have to be smart. And it's funny you should mention that; we're starting to suspect that there are other optimizations that we already do -- including type tightening and concomitant inlining, etc. -- that actually work against code splitting by introducing static dependencies across split points where they didn't exist prior to optimization. So various optimizations passes probably need to be more careful to not smear references across split points in certain ways. For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4756 - wiki
Author: j...@google.com Date: Sun Feb 15 11:51:12 2009 New Revision: 4756 Modified: wiki/LibraryOptimizations.wiki Log: Edited wiki page through web user interface. Modified: wiki/LibraryOptimizations.wiki == --- wiki/LibraryOptimizations.wiki (original) +++ wiki/LibraryOptimizations.wiki Sun Feb 15 11:51:12 2009 @@ -1,6 +1,6 @@ #summary Starting point for GWT core library optimizations. -= Introduction = +This page serves as a starting point for proposed optimizations to GWT core libraries. This includes the JRE implementation, the Core module, and certain commonly-used classes such as Timer, DeferredCommand, and so forth. - -= Details = + * HashMapOptimization + * DeferredCommandOptimization \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4757 - wiki
Author: j...@google.com Date: Sun Feb 15 11:57:23 2009 New Revision: 4757 Added: wiki/DeferredCommandOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/DeferredCommandOptimization.wiki == --- (empty file) +++ wiki/DeferredCommandOptimization.wiki Sun Feb 15 11:57:23 2009 @@ -0,0 +1,9 @@ +#summary Proposed optimizations to DeferredCommand. + += Introduction = + +DeferredCommand is a very simple utility class for executing code after the current event has finished executing. It is equivalent to the common Javascript idiom of running code in a window.setTimeout(0). It is used by almost every application either directly or indirectly. + += Details = + +Very little code is required to implement DeferredCommand, but when we added CommandExecutor, we decided to re-implement DeferredCommand in terms of the more complex class. This made sense from an engineering perspective, but had the undesirable effect of generating much more code for simpler applications. If we were to simply re-implement the simpler form of DeferredCommand, it would benefit smaller apps by reducing their transitive dependencies significantly. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4754 - wiki
Author: j...@google.com Date: Sun Feb 15 11:46:06 2009 New Revision: 4754 Added: wiki/Optimizations.wiki Log: Created wiki page through web user interface. Added: wiki/Optimizations.wiki == --- (empty file) +++ wiki/Optimizations.wiki Sun Feb 15 11:46:06 2009 @@ -0,0 +1,5 @@ +#summary Overview of proposed compiler and library optimizations. + +The following page details proposed [CompilerOptimizations compiler optimizations]. + +Another details proposed [LibraryOptimizations library optimizations]. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4758 - wiki
Author: j...@google.com Date: Sun Feb 15 12:13:05 2009 New Revision: 4758 Added: wiki/HashMapOptimization.wiki Log: Created wiki page through web user interface. Added: wiki/HashMapOptimization.wiki == --- (empty file) +++ wiki/HashMapOptimization.wiki Sun Feb 15 12:13:05 2009 @@ -0,0 +1,22 @@ +#summary Proposed optimizations to the JRE HashMap implementation. + += Introduction = + +The JRE HashMap (and HashSet) class is a fundamental building-block of many applications. Unfortunately its semantics are significantly more complex than the built-in Javascript object's string-value map. The GWT HashMap implementation is thus rather involved, leading to code bloat (especially in smaller applications where a single large class is quite noticeable). + += Details = + +There are several reasons that the underlying Javascript object type is insufficient for implementing HashMap. + * It's just a String-value map, not an Object-Object map. + * There is no provision for overriding the equality behavior for hash keys (unlike Java). + * There are also certain key values that are off-limits in Javascript objects, making them insufficient even for simple String-Object maps. + +To make matters worse, the inability to use objects as keys makes it impossible to create a Set type (unless you just want a set of Strings). + += Options = + +For simple String-Object maps, the simplest option is to create a simple map implementation on top of a Javascript object. This can be accomplished easily using JSNI (though you still need to prefix your keys with a special character to avoid stepping on certain Javascript keywords), but is insufficient for many use-cases. + +The second option is to optimize GWT's JRE HashMap implementation. No coherent proposal for doing so exists as yet, but ideas are very much welcome. Please do have a look at AbstractHashMap.java in GWT's JRE to get an idea of the problems that need to be solved. + +Finally, while it would be preferable to optimize the JRE HashMap, it might also be possible to create a replacement Map type with simpler semantics (perhaps something closer to IdentityHashMap with only get(), put(), and iterator() methods). \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by j...@google.com: What Bruce said. I was thinking specifically that it would make the most sense to generate a separate static initializer block for each fragment. We'd probably need to ask Lex whether it would make sense for *parts* of static initializers to be moved among fragments, but that would seem to make sense on its face. For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by cromwellian: Bruce, As a side note, I though I had commented on this once before, but I couldn't find it in the archives or via Google, however a while back ago I found a thread on either the Kaffe mailing list, or some other VM mailing list discussing eager clinits, and some Sun guys said that although the spec was vague, eager initialization should not be done. I've seen other threads stating that Class.forName() is not to run static initializers, it only loads the class. The clinit is still deferred until newInstance(), field, or method references. However, leaving aside whether or not the JLS allows this, I think the question for GWT isn't matching the JLS spec (it doesn't have exact semantics in a number of areas, didn't even have long primitives in the first version, and removing setCheck/dynamicCast later will only make the divergence larger). The real question should be, will this optimization break any existing GWT programs, or lead to a regression on some other metric we worry about. You can always document this behavior, and write best practices for static initializers, to make sure people aren't relying on any semantics that GWT doesn't support. So, I'd say, press on full speed with this optimization. For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by j...@google.com: When we discussed it before, Toby raised a strong objection (IIRC) that people typically write code with the assumption that clinits are not eagerly evaluated, and if there is expensive code there it could impair the performance of their app, especially startup performance. I think it is ok to make the default eager initialization, but allow the developer to put an annotation on a class to require it be lazily initialized. Maybe for the first release we do this we can have the compiler heuristically issue a warning if the clinit looks complicated -- not sure exactly what that would look like but we should be able to do something about it. The warning could be supressed by adding the annotation to either force or disallow eager clinit. Something like: {{{ @GwtEagerClinit(false) public class MyExpensiveClinit { ... } @GwtEagerClinit(true) public class MyAppearsToBeExpensiveClinit { ... } // defaults to eager initialization, but may warn if it looks expensive public class UnknownClinit { ... } }}} (subject to bikeshedding on the name of course). If we are really worried about it, we could make the default false for the first release with it, and people that want to take advantage of it could do so. For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RR: logging script size for programs with code splitting
On Fri, Feb 13, 2009 at 6:04 AM, John Tamplin j...@google.com wrote: Also, I have been using the largest permutation rather than an average -- I know it compliations the computation a bit, but would it be reasonable to give the largest maximum download for all split points? I just read this again, and I misunderstood what you were asking for. Yes, it would be easy to report the worst-case download size per permutation. I misread it as reporting the worst-case permutation, which is hard to do in the compiler, but easy to do with any script that is scraping the build logs. The way it could be computed is to add up fragments 0-m, and then calculate the adjustment that would be applied depending on which split point is reached first. The adjustment for split point i would be the base and leftovers for i minus the exclusive for i. To get the worst case, add the largest adjustment. To get the best case, add the smallest adjustment. Which ones should we report? Would anyone object to it only reporting the max? Keep in mind that ultimately someone who wants something very specialized is going to have to do their own calculation, anyway. -Lex --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Announcing GWT 1.6 Milestone 1
Scott, Your mentioned solution of copying gwt-servlet.jar into WEB-INF/lib did work for the webAppCreator project, however my existing large project still has the ClassNotFoundException for org.apache.xerces.jaxp.SAXParserFactoryImpl. I am still at a loss of ideas, as gwt-user.jar, gwt-dev-windows.jar, and gwt-servlet.jar are the same with both projects. Could it be possible another server-side lib is causing a conflict? The complete stack trace is below: 2009-02-15 23:01:30.086::WARN: failed com.google.gwt.dev.shell.jetty.JettyLauncher $webappcontextwithrel...@c8ba50{/,E:\project_src\ProjGWT\war} javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found at javax.xml.parsers.SAXParserFactory.newInstance (SAXParserFactory.java:134) at org.mortbay.xml.XmlParser.setValidating(XmlParser.java:92) at org.mortbay.xml.XmlParser.init(XmlParser.java:84) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:199) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1217) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at com.google.gwt.dev.shell.jetty.JettyLauncher $WebAppContextWithReload.doStart(JettyLauncher.java:236) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start (JettyLauncher.java:283) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:368) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:587) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:394) at com.google.gwt.dev.HostedMode.main(HostedMode.java:231) 2009-02-15 23:01:30.086::WARN: Nested in javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found: java.lang.ClassNotFoundException at com.google.gwt.dev.shell.jetty.JettyLauncher $WebAppContextWithReload$1.findClass(JettyLauncher.java:217) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass (WebAppClassLoader.java:375) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass (WebAppClassLoader.java:337) at javax.xml.parsers.FactoryFinder.getProviderClass (FactoryFinder.java:111) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java: 146) at javax.xml.parsers.FactoryFinder.findJarServiceProvider (FactoryFinder.java:298) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223) at javax.xml.parsers.SAXParserFactory.newInstance (SAXParserFactory.java:128) at org.mortbay.xml.XmlParser.setValidating(XmlParser.java:92) at org.mortbay.xml.XmlParser.init(XmlParser.java:84) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:199) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1217) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at com.google.gwt.dev.shell.jetty.JettyLauncher $WebAppContextWithReload.doStart(JettyLauncher.java:236) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start (JettyLauncher.java:283) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:368) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:587) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:394) at com.google.gwt.dev.HostedMode.main(HostedMode.java:231) 2009-02-15 23:01:30.086::WARN: Error starting handlers javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found at javax.xml.parsers.SAXParserFactory.newInstance (SAXParserFactory.java:134) at org.mortbay.xml.XmlParser.setValidating(XmlParser.java:92) at org.mortbay.xml.XmlParser.init(XmlParser.java:84) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:199) at org.mortbay.jetty.webapp.WebAppContext.startContext
[gwt-contrib] Re: Announcing GWT 1.6 Milestone 1
Update: I've fixed the issue by simply including xercesImpl.jar from GWT Tools in WEB-INF/lib. Still not exactly sure why it is needed now and not previously, but it is working right now in hosted mode so all is good. Thanks, Jeff On Feb 15, 11:13 pm, Jeff J. jsjenkins...@gmail.com wrote: Scott, Your mentioned solution of copying gwt-servlet.jar into WEB-INF/lib did work for the webAppCreator project, however my existing large project still has the ClassNotFoundException for org.apache.xerces.jaxp.SAXParserFactoryImpl. I am still at a loss of ideas, as gwt-user.jar, gwt-dev-windows.jar, and gwt-servlet.jar are the same with both projects. Could it be possible another server-side lib is causing a conflict? The complete stack trace is below: 2009-02-15 23:01:30.086::WARN: failed com.google.gwt.dev.shell.jetty.JettyLauncher $webappcontextwithrel...@c8ba50{/,E:\project_src\ProjGWT\war} javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found at javax.xml.parsers.SAXParserFactory.newInstance (SAXParserFactory.java:134) at org.mortbay.xml.XmlParser.setValidating(XmlParser.java:92) at org.mortbay.xml.XmlParser.init(XmlParser.java:84) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:199) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1217) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at com.google.gwt.dev.shell.jetty.JettyLauncher $WebAppContextWithReload.doStart(JettyLauncher.java:236) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start (JettyLauncher.java:283) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:368) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:587) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:394) at com.google.gwt.dev.HostedMode.main(HostedMode.java:231) 2009-02-15 23:01:30.086::WARN: Nested in javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found: java.lang.ClassNotFoundException at com.google.gwt.dev.shell.jetty.JettyLauncher $WebAppContextWithReload$1.findClass(JettyLauncher.java:217) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass (WebAppClassLoader.java:375) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass (WebAppClassLoader.java:337) at javax.xml.parsers.FactoryFinder.getProviderClass (FactoryFinder.java:111) at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java: 146) at javax.xml.parsers.FactoryFinder.findJarServiceProvider (FactoryFinder.java:298) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223) at javax.xml.parsers.SAXParserFactory.newInstance (SAXParserFactory.java:128) at org.mortbay.xml.XmlParser.setValidating(XmlParser.java:92) at org.mortbay.xml.XmlParser.init(XmlParser.java:84) at org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp (TagLibConfiguration.java:199) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1217) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at com.google.gwt.dev.shell.jetty.JettyLauncher $WebAppContextWithReload.doStart(JettyLauncher.java:236) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start (JettyLauncher.java:283) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:368) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:587) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:394) at com.google.gwt.dev.HostedMode.main(HostedMode.java:231) 2009-02-15 23:01:30.086::WARN: Error starting handlers javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
[gwt-contrib] Comment on AggressiveClinitOptimization in google-web-toolkit
Comment by cromwellian: While in practice, I agree with the above, I think a global compiler switch would be in order as well as using annotations as per-class pragmas, just so developers can switch it off without having to track down where to sprinkle the pragmas. Although, I must admit, there's something about using annotations to change control flow or optimizations that makes me somewhat uneasy, since annotations usually aren't supposed to affect code semantics. John's proposal I think is the biggest bang for the buck, given the simplicity of implementing it. However, IMHO, the long term correct way of doing this is building a control-flow graph for GWT, and using techniques like computing dominator trees so that most duplicate clinits can be pruned or hoisted without manual annotations or potentially unsafe optimizations. Unfortunately, building a CFG for GWT to do optimizations will probably have to wait until a future time when there is another intermediate representation between the AST. The dominator approach would, I think, mesh very well with code-splitting however, since you'd have precise information as to when and where the first invocation of a clinit is in the control flow. -Ray For more information: http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOptimization --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---