Re: DeckPanel causes Widget to disappear
Arrgh. I thought I was using DeckPanel yesterday and was using StackPanel. The easiest way to debug it will be using firebug. Check to see it's structue after loading - i.e. is the widget a child? Sorry about that! Joe On Mar 4, 8:30 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Joe- What API are you looking at? I only see one DeckPanel.add() method: void add(Widget w) Adds the specified widget to the deck. I've checked both 1.5.2 and 1.5.3. There's an inherited add() method, but it still doesn't match your signature. Are you thinking of TabPanel? On Tue, Mar 3, 2009 at 11:20 PM, Joe Cole profilercorporat...@gmail.com wrote: I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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: EntryPoint onModuleLoad called multiple times over course of application lifetime
Is it possible that as a result of the RPC call the javascript loads another page or reloads the current one? On Wed, Mar 4, 2009 at 2:30 AM, Brian Ferris bdfer...@gmail.com wrote: I have a relatively complex GWT application composed of my main application EntryPoint and a number of library modules. I had some printlns in the EntryPoint for my application and the libraries and I noticed that they are called multiple times over the course of the application lifetime in hosted mode. This is not the standard I just hit the reload button case where you expect to hit your module EntryPoint, but more of the case where a user has just hit a button to initiate an RPC call that then updates the UI. Is this expected behavior? Something I should be worried about? I apologize for not posting any code samples, but I'm hoping there is something simple I'm missing before I go through the work of trying to reproduce the behavior with a simpler code fragment. --~--~-~--~~~---~--~~ 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: No source code is available for type java.io.File; did you forget to inherit a required module?
Hi Raghu, The GWT compiler complains because it doesn't support the full range of Java classes present in your run of the mill JRE. The reason for this can be found in asking the question; What does the GWT compiler produce as output?. Answering this question yields a far more pertinent question; Where does the resulting JavaScript execute?. The answer of course is the client's browser. Knowing this, it's fairly safe to assume that if we can achieve the same thing using pure JavaScript in the browser (i.e. we could port our Java code to JavaScript) then it's possible with GWT. Given that a browser has no native mechanism that supports file IO (besides perhaps the file input tag) then it makes sense that there would be no File class in GWT. The GWT developers know this and to this extent they've exposed a great deal of base Java classes (primarily the java.lang package) as native peers. This is relatively straight-forward for things like String which can easily be wrapped with a Java class that provides the expected API yet are manipulated underneath the covers using standard JS string functions. If you're ever unsure as to whether or not a native Java class is supported in GWT you can always refer back to the JRE emulation reference here: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=RefJreEmulation Regards, Dave On Mar 4, 4:07 am, Lothar Kimmeringer j...@kimmeringer.de wrote: raghu prashanth k b schrieb: Hi...I am new to GWT and i'm trying to develop a small application...but here i need to open a directory and count the no.of files in it...I'm doing it as follows: File dir = new File(file); String[] pages = dir.list(); int count = pages.length; If you do that on the client-side of your application, you should ask yourself, how you would do that with Javascript. If you can come up with an answer (you can't without the use of signed applets or other tweaks), the compiler can't either. This is a question that has been answered so many times already that searching for the error-message, in this group should bring up a lot of results, including ways how to solve your problem (that is dependent if you really want to have a file-list of the files residing on the client-side or if you want ot list files residing on the server-side). Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Deploying to a Shared TOMCAT
Hey Guys, I want to thank you for your help. I still have had no luck, but I'm starting to think it's on the Tomcat side. I even tried downloading a complete exmaple of a .jsp servlet and it's not working. Even when I link straight to the jsp which should kick off the Tomcat server to handle it, it just comes up as text. Something isn't right here. I'm going to contact their support. Thanks for all your help! On Mar 3, 10:29 am, John Ivens john.wagner.iv...@gmail.com wrote: This is my web.xml file... this might help you out. See if you can map your call to like parameters in my call... ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 servlet servlet-nameObservationService/servlet-name servlet-classedu.noao.tuc.odigui.server.ObservationServiceImpl/servlet-class /servlet servlet-mapping servlet-nameObservationService/servlet-name url-pattern/edu.noao.tuc.odigui.OdiGui/observation/url-pattern /servlet-mapping /web-app On Mon, Mar 2, 2009 at 4:40 PM, Sean slough...@gmail.com wrote: I do have that code, I even added in the null check just to be doubley sure and still no go. It works in hosted mode, just with this web.xml (and I tried removing the com.ll.server from teh Servlet-class) and I get the same error message. From my gwt.xml : servlet path=/Foo class=com.ll.server.RPCTestImpl/ That works fine, but: ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; !-- Standard Action Servlet Configuration -- servlet servlet-nameFoo/servlet-name servlet-classRPCTestImpl/servlet-class /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameFoo/servlet-name url-pattern/Foo/url-pattern /servlet-mapping /web-app doesn't. I've tried restarting my Tomcat to no avail. This is mind boggling! On Mar 2, 10:36 am, John Ivens john.wagner.iv...@gmail.com wrote: I'll bet dollars to donuts that you are having the same problem that I had. The sample code works in embedded tomcat but not in external tomcat. You need to add code something like this: if (observationSvc == null) { observationSvc = (ObservationServiceAsync) GWT.create(ObservationService. class); } String observationServiceURL = GWT.getModuleBaseURL() + /observation; ((ServiceDefTarget) observationSvc ).setServiceEntryPoint(observationServiceURL); Where ObservationService is your service class. ObservationServiceAsync is your asynchronous call. /observation is probably /Foo in your case. This is in your GUI before you actually call the function you have defined on the server side. If you don't do this, the application WILL NOT FIND YOUR URL. On Mon, Mar 2, 2009 at 5:26 AM, Sean slough...@gmail.com wrote: I did restart Tomcat still no go. #1 The latest I tried putting all the google files and Web-INF directory in my base http directory. So I am just calling: http://www.celticlock.com/Foo.html I'm on a shared Tomcat server and the documentation says I can only have one Web-INF directory there with one web.xml. So I'm trying to get everything on an even footing. #2 I added the com.ll.server to the servlet class after I saw it in an example. I've tried a dozen different configurations at this point. This is the state it's left in after I threw my hands up in the air and decided to see if hte groups can point me in the right direction. I think I might possibly be confused by, the Url-pattern and what exactly is the url-pattern supposed to represent. This is where I dislike Google's example and naming everything Foo. and I called my Mom and she said I am spelling Sean correctly! ;-P On Mar 1, 7:13 pm, Shawn Brown big.coffee.lo...@gmail.com wrote: Hi, It looks to me like you have 2 problems. #1 The requested URL /Foo was not found on this server Did you restart the tomcat or restart your app? What url are you using to access it. What is your app called? Are you using something like serverurl/app_name/foo? And this is the web.xml I am using: ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; !-- Standard Action Servlet
Google Analytics and GWT
This may be simple (or not) but has anyone integrated Google Analytics into a GWT app? Are there any tips or issues I should be aware of? --~--~-~--~~~---~--~~ 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 do you remove a handler?
Ah! Thanks very much for that. Ian http://examples.roughian.com 2009/3/4 Jason Morris lem...@gmail.com Hi Ian All of the add*Handler methods return a HandlerRegistration object, you keep a reference to it, and then invoke HandlerRegistration.removeHandler() when you want to remove it. I wasn't to sure of whether I liked it or not at first, but it does make automated removal of Handlers on auto-generated structures (populated from some external source) a lot easier, since you can just store all the HandlerRegistrations. Cheers, Jason. --~--~-~--~~~---~--~~ 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 in running JUnit testcases in GWT
Something is wrong with your classpath somewhere. Are you using JUnitCreator? If so what does the script look like. Did you compile your code (not GWT compile, just regular javac). See some of the other many threads here in this forum for examples (the end of this one has a working script, for example): http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/580d1a8f7c220a3b/. On Mar 3, 6:07 am, Ajay Garg ajaygargn...@gmail.com wrote: Hi all. I am wanting to write testcases for code, that is purely client side (i.e. the code is converted into javascript, and there are no RPC calls), using JUnit. I have visited the link http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=goog... and am stuck at the last point. When running the cmd-script for hosted mode, I get the stack trace : java.lang.NoSuchMethodError:org.apache.catalina.startup.Embedded.setDebug(I)V at com.google.gwt.dev.shell.tomcat.EmbeddedTomcatServer.init (EmbeddedTomcatServer.java:197) at com.google.gwt.dev.shell.tomcat.EmbeddedTomcatServer.start (EmbeddedTomcatServer.java:69) at com.google.gwt.dev.GWTShell.startUp(GWTShell.java:778) at com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java: 215) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:150) at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java: 219) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:120) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:132) at junit.framework.TestSuite.runTest(TestSuite.java:228) at junit.framework.TestSuite.run(TestSuite.java:223) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run (JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run (TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:196) This comes, irrespective of using -noserver, or else. I will be greatly thankful if I get some light in this dark tunnel.. Looking forward to some enlightenment. Ajay --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
i am wondering can gwt do the following?
http://labs.digg.com/stack/ can someone point me to where i can do something like this? or it is not possible for gwt to accomplish this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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: which tools you have used for development of GWT?
Eclipse, Maven, emacs, bash. Sort of a vague question though ;). On Mar 4, 12:05 am, shiren1118 shiren1...@126.com wrote: which tools you have used for development of GWT? I'm puzzled --~--~-~--~~~---~--~~ 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 can I use gwt for my project
Though you can do one entry point per page, that is sort of missing the point. If your project is completed, then don't try to just use GWT to make it more beautiful. GWT is about a different approach, about Ajax so that you really have a single *page* that can handle the entire web based application and updates the views as needed - it's Ajax (it's more than that of course, it's Ajax from statically compiled Java, that generates the JavaScript for you, and gives you all the tooling and testing that brings, but I digress). You can also just sprinkle in widgets here and there, one on a page, that is possible, so don't get me wrong, but that is still not the real focus of GWT. There are actually other Ajax toolkits that may be better suited to just making things more beautiful on an existing site by plugging in a widget here or there. On Mar 3, 8:24 pm, seawave eve8...@gmail.com wrote: My project has completed a few days ago,but I don't satisfied about the web pages.So I want to use gwt to let the pages more beautiful.But I find I just can use in one page,GWT just have one Entry-point.I hava a lot of pages,I want to let every page have one Entry-point,what should I do? 我最近做的一个项目已经基本完工了,我对我的页面展示效果不太满意,所以我决定采用gwt来改善我的页面外观,但是我发现Main.gwt.xml文件 只能对应一个Entry-point,这意味着我只能用一个页面,我这里有好多个页面,每个页面的内容是不同的,我想问下,这是不是需要多个处理类的多 个onModuel()方法呢? --~--~-~--~~~---~--~~ 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 with JPA not working in hosted mode
That doesn't really make sense to me either. We use JPA annotated beans on the client side all the time and all of them have CascadeType. We don't use either Gilead or GXT, so it might have something to do with those libraries. Can you try to create small sample project without those libraries and see if hosted mode launches with the JPA annotations? Then add the Gilead library, see if it works, then add the GXT library and see if it works. -- Arthur Kalmenson On Tue, Mar 3, 2009 at 5:57 PM, grishag grigori.gold...@gmail.com wrote: It's strange but I'm not running with the embedded Tomcat. I used the noserver option and deployed my code to a standalone server (Tomcat 6.0.18). So according to your last comment it should be working. Could you please post a link to the Gilead forum you've mentioned? I just tried to find it with no luck. I don't see why this would work in the web mode anyway because it still goes through the process of trying to compile the annotated code. I actually had a look at the offending line CompilingClassLoader line 579 and sure enough if the package starts with java or javax it throws this exception. Why gwt emulation not working when running in hosted mode but works during compiling beats me. Thanks for your help. On Mar 4, 5:19 am, noon bruno.marches...@gmail.com wrote: Some more precisions, since this is a recurrent issue related in Gilead forum : - The offending annotation is *always* CascadeType. The code source is the same as regular JPA annotation. - Not a classpath issue : I repoduced the issue with the JAR on classpath, and no way to tell Hosted Mode to take it into account - Only the embedded hosted mode fails, web mode is ok. Regards Bruno On 3 mar, 15:38, Arthur Kalmenson arthur.k...@gmail.com wrote: Hmm, have you checked the classpath you use for your GWTCompile and hosted mode launching in Ant? Make sure they're the same. Hosted mode works fine with JPA annotations here (although we do use Maven). It looks like it might be a classpath issue. -- Arthur Kalmenson On Mon, Mar 2, 2009 at 9:48 PM, grishag grigori.gold...@gmail.com wrote: Hi, I have a problem running GWT in hosted mode using JPA annotated domain classes. I can compile my project to JavaScript, package it up in a war and run it on a server no problem but I can't do the same in hosted mode. Really annoying, without hosted mode development is really slow. Here is what I have done: 1. I have one module that defines my domain classes (sitting under the GWT client package) and DAO classes (under GWT server pacakge). The following is the gwt.xml file for this module: module inherits name='net.sf.gilead.Adapter4Gwt15'/ inherits name='net.sf.gilead.emul.java5.ejb3.Ejb3'/ /module 2. The second module implements the client UI and the RPC service that uses the domain objects from the first module: module inherits name=com.google.gwt.user.User/ inherits name=com.extjs.gxt.ui.GXT/ inherits name=com.extjs.gxt.themes.Themes / inherits name='au.gov.vic.dpi.mpd.geodatavic2.module.domain.DomainModel' / stylesheet src=css/ext-all.css / entry-point class='au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.StratigraphicLegends'/ /module Like I said I can compile this using GWTCompiler and run it all on a standalone server but not in hosted mode (I'm using the noserver option). I've been through my classpath multiple times and everything looks fine but I'm still getting this error no matter what I do. If anyone has any idea why this is happening and most importantly how to fix this it would be greatly appreciated. I've been battling with this thing for a day and a half and I'm out of ideas. Thank you. Buildfile: U:\projects\GeoDataVic2alt\build.xml gwt.run: [java] java.lang.NoClassDefFoundError: javax/persistence/ CascadeType [java] at java.lang.Class.getDeclaredMethods0(Native Method) [java] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) [java] at java.lang.Class.getDeclaredMethods(Unknown Source) [java] at com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembersUsingReflectionHelper (DispatchClassInfo.java:184) [java] at com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembers (DispatchClassInfo.java:146) [java] at com.google.gwt.dev.shell.DispatchClassInfo.getMemberId (DispatchClassInfo.java:55) [java] at com.google.gwt.dev.shell.CompilingClassLoader $DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:130) [java] at com.google.gwt.dev.shell.CompilingClassLoader.getDispId (CompilingClassLoader.java:531) [java] at com.google.gwt.dev.shell.ie.IDispatchProxy.getIDsOfNames (IDispatchProxy.java:124) [java]
Re: How to retrieve data as byte[] in GWT from getImageData
On 4 mar, 06:10, Kevin Tarn kevn.t...@gmail.com wrote: Unfortunately, using JsArrayInteger is very slow: public byte[] getBitmap() { // String str = getImageData(0, 0, width, height); // byte[] ar = new byte[str.length()]; // for (int i=0; iar.length; i++) // ar[i] = (byte)((int)str.charAt(i) 0xff); // return ar; JsArrayInteger ja = getImageRawData(0, 0, width, height); int len = ja.length(); byte[] ar = new byte[len]; for (int i=0; ilen; i++) ar[i] = (byte)(ja.get(i) 0xff); return ar; } The loop above copying element to a byte array is 10 times above than the commented codes. Anything doing wrong? If you're comparing runs in hosted mode, it doesn't really surprise me, as JsArrayInteger will go back and forth from Java to JavaScript. But once compiled into JS it should run (almost) at the same speed. Now, it also depends how getImageRawData has been changed to return a JsArrayInteger instead of a String... --~--~-~--~~~---~--~~ 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: Dealing with session timeout and container managed security
Hhhmm, the community being quiet can mean a lot of things...none are really positive. Was I talking about some dark GWT corners where no stable/proper solutions exist? Or is there simply no right way to solve my problem, but rather many potential solutions that all have their flaws? On Feb 28, 8:26 am, marcelstoer mar...@frightanic.com wrote: Is there some consensus or best practice in the GWT community as for how to deal with session timeout and container managed security? There are some pointers if you search for this subject, but some of the ideas are wild... In my case I use the Servlet container's built in security features for authentication as described in the Servlet specification. Hence, in my web.xm I protect access to the GWT application like so: security-constraint web-resource-collection web-resource-namemy app/web-resource-name url-pattern/app/*/url-pattern http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/public/login.jsp/form-login-page form-error-page/public/login.jsp?retry=true/form-error-page /form-login-config /login-config security-role role-name*/role-name /security-role So, the application (host/bootstrap page, RPC Servlet, etc.) is in the app folder and the login form (login.jsp) is in the public folder. This works flawlessly except for the session timeout use case. The application sends an RPC request to /app/AppServlet, the Servlet container requires authentication because the session had timed out and dutifully *forwards* to the login page. Hence, the result of the request is not some RPC/JSON/XML object as expected by the client but the login page HTML structure. The client simply isn't prepared for that and freezes i.e. doesn't do anything. I believe that on the server side everything is set up correctly. If the session timed out the requests don't even reach the RPC Servlet because it's intercepted by the container, fine. But how do you deal with this in the client? Should one write some custom AsyncCallback class that handles the reponse sent by the container? Thanks for your feedback. Marcel --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Window.confirm in timer.run()
Hello! I am using a timer to ask the user after xy minutes to save his changes to database. In the run() method of timer I ask the user wheather he want to save the changes. If the user clicks OK I'll save othwerwise I'll do nothing. I shedule the timer repeatly after xy minutes. When does the timer reruns? After handling the run() method? I recognized that the timer reruns while the confirm message is shown. Is this an issue or correct? Should the timer rerun while its run() method is not finished? I occurs in Firefox, in IE it works like I am thinking how it should work. Example for Error: - Rerunning timer every 1 minute - Confirmation is shown after 1 minute, user does *not* click *OK* or * Cancel* - After two or more minutes I'll click OK or Cancel and the confirm window closes. But the confirm window of the second timer run is shown. - The window is maximal shown two times (e.g. when I am waiting three or more minutes) It should be not very difficult to use a workaround, but I want to understand the correct working of the GWT timer. Thank you! -Danny --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Checked Exception handling - specialized onFailure not being picked up?
Hi all, I have a question about handling custom checked exceptions. Say I have the code below implemented in an Async call - GWT appears to ignore the specialized version of onFailure - despite having the correct instance type available if I pop a break point into the default onFailure(Throwable caught) implementation new AsyncCallbackVoid(){ public void onFailure(Throwable caught) { //TODO Implement this method } public void onFailure(MyUpdateException caught) { //TODO Implement this method } public void onSuccess(Void v) { // DO STUFF } } Has anyone got any ideas? - I'm assuming that something more elegant than handling a series of instanceof checks within the default onFailure implementation is there for me to find! 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: i am wondering can gwt do the following?
Agreed. Some of the GWT Canvas work make some of this easier, but over all, Javascript in a browser (which is what GWT is after all!) isn't your best choice. Flash (which they used) or an applet (java or whatever Microsoft is calling an activex control these days...) would make your life easier. My .02 USD..good luck! Later, Shaffer On Mar 4, 6:32 am, Lothar Kimmeringer j...@kimmeringer.de wrote: ytbryan schrieb: http://labs.digg.com/stack/ can someone point me to where i can do something like this? or it is not possible for gwt to accomplish this? For a one-threaded environment I think this will be quite hard at best. Regards, Lothar --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Read HTTP GET variables
Hi, I am launching a GWT app with passing some arguments via URL, e.g. something like this: http://localhost/com.domain.App/App.html?param1=value1 Now, the question is: How can I read the param1-value1 pair from the above URL? Is that even possible? 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: i am wondering can gwt do the following?
mikedshaffer schrieb: Agreed. Some of the GWT Canvas work make some of this easier, but over all, Javascript in a browser (which is what GWT is after all!) isn't your best choice. The rendering itself shouldn't be much of a problem. Since http://www.zark.com/ which already worked on Netscape 2 (yes, the old stuff, not Firefox or Mozilla) I think you can do more or less everything, even something like the stack-application he linked in his OP. The biggest problem I see with the fact, that incoming data leads to an immediate rendering of a part of the page. So if two diggs are happening this lead to two drops tearing down at the same time, so you need something Comet-like that allows a push from the server to the client and a busy-wait-loop that renders the different drops step by step, changing CSS-properties for the fade-in/fade-out effect of the links that are shown below (the latter is already available with third-party). The busy-wait solution is what makes me suspicious that GWT is the right choice for that. With Flash or Java or whatever the implementation is easy. As soon a new entry has been received from the server a Thread is fired up that handles the fade-in/-out and tearing down of the drop. As soon as the rendering of that drop is finished, the Thread dies. In a singlethreaded environment you have to keep an array of currently to be rendered elements with their current rendering states (e.g. element 1 has teared down 25% of the distance, element 2 30% etc.). The busy waiting loop checks that array for elements to be rendered and renders the next nessecary step for each element. I'm quite sure that you don't need to worry about you coffee getting cold if you place your cup next to the heat-sink of your computer ;-) Flash (which they used) or an applet (java or whatever Microsoft is calling an activex control these days...) would make your life easier. Agreed Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Read HTTP GET variables
I think; String QueryString = Window.Location.getQueryString(); If what you want, but you would have to parse it yourself unless the params are knowen in advance. Or, purhapes, you might want to use a history-token based data instead App.html#param1=value1 Then the data present could trigger a onHistoryChange, and would be in the parameter; public void onHistoryChanged(String historyToken) { String token = historyToken; } On Mar 4, 3:45 pm, Miloš Ranđelović milos@gmail.com wrote: Hi, I am launching a GWT app with passing some arguments via URL, e.g. something like this: http://localhost/com.domain.App/App.html?param1=value1 Now, the question is: How can I read the param1-value1 pair from the above URL? Is that even possible? 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: Read HTTP GET variables
Thanks! Window.Location.getQueryString() works perfectly well for me. On Mar 4, 3:59 pm, Darkflame darkfl...@gmail.com wrote: I think; String QueryString = Window.Location.getQueryString(); If what you want, but you would have to parse it yourself unless the params are knowen in advance. Or, purhapes, you might want to use a history-token based data instead App.html#param1=value1 Then the data present could trigger a onHistoryChange, and would be in the parameter; public void onHistoryChanged(String historyToken) { String token = historyToken; } On Mar 4, 3:45 pm, Miloš Ranđelović milos@gmail.com wrote: Hi, I am launching a GWT app with passing some arguments via URL, e.g. something like this: http://localhost/com.domain.App/App.html?param1=value1 Now, the question is: How can I read the param1-value1 pair from the above URL? Is that even possible? 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: Question about mGoogle Maps URL and its parameter gwt
Thank you very much! Good to know! -Danny 2009/2/27 Eric Ayers zun...@google.com Removing that parameter will not affect the functioning of the Maps API. It is currently used for accounting purposes only. 2009/2/27 Danny Schimke schimk...@googlemail.com: Hello! Does anyone know what is the parameter gwt with the value1 for? The URL looks like the following: http://maps.google.com/maps?gwt=1amp;file=apiamp;v=2amp;key= I can't make differences between the functionality of URL with parameters and without parameters. Is the this parameter needed and why? Are there other possible values instead of 1 and what does they mean? Thank you! -Danny -- 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 -~--~~~~--~~--~--~---
Tips for reducing Cache.html sizes?
I know this has probably been asked before a few times, but searching around I didn't find anything specific to help me. My current site takes about 10 seconds to load for the first time, mostly down to a 156kb cache file. (for the firefox at least, the others are similar) I understand this only needs to be loaded once, but I'd still like to shave a few seconds of where I can. * I'm using Eclipse to edit, and to my knowledge I haven't changed the compiler options, so Obfuscated should be the mode its using. (how can I check this?). Is there other compiler options or variables I should know about? * I notice sites such as gmail have a loading bar that appears near instantlyif my site must take 10seconds or more to load the first time, is it possible to do this? (but then how, as its the java itself taking the time..not the images etc). * While not directly related using firebug I've determined the images themselves arnt slowing it down much, but I could still potentially shave a few 100ms of time by getting everything into one image bundle rather then a fewbut how is this possible when dealing with googles own image bundles? (say, those used for the Up and Down arrow into a disclosure panel?). Finaly, should I wait for 1.6 before working on this level of optimisation or not? Cheers, Thomas --~--~-~--~~~---~--~~ 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: EntryPoint onModuleLoad called multiple times over course of application lifetime
I'm not sure. It is interesting to note that I don't see this behavior in web mode (aka compiled to javascript and run in the browser). So I'm going to assume it's not an issue I need to worry about? On Mar 4, 12:13 am, Vitali Lovich vlov...@gmail.com wrote: Is it possible that as a result of the RPC call the javascript loads another page or reloads the current one? On Wed, Mar 4, 2009 at 2:30 AM, Brian Ferris bdfer...@gmail.com wrote: I have a relatively complex GWT application composed of my main application EntryPoint and a number of library modules. I had some printlns in the EntryPoint for my application and the libraries and I noticed that they are called multiple times over the course of the application lifetime in hosted mode. This is not the standard I just hit the reload button case where you expect to hit your module EntryPoint, but more of the case where a user has just hit a button to initiate an RPC call that then updates the UI. Is this expected behavior? Something I should be worried about? I apologize for not posting any code samples, but I'm hoping there is something simple I'm missing before I go through the work of trying to reproduce the behavior with a simpler code fragment. --~--~-~--~~~---~--~~ 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: which tools you have used for development of GWT?
Very vague. Eclipse is my absolute must have for me. I use a old version of GoLive for the html, and PSP for the image stuff. Firefox+Firebug is an absolute must have too, makes debuging and optimisation s much easier. I also quite often use Opera too though, its ability to life-edit HTML/ CSS is quite handy. (obviously, firebug can do that as well, but its a bit more clunky if your expirementing a lot). On Mar 4, 2:13 pm, Charlie Collins charlie.coll...@gmail.com wrote: Eclipse, Maven, emacs, bash. Sort of a vague question though ;). On Mar 4, 12:05 am, shiren1118 shiren1...@126.com wrote: which tools you have used for development of GWT? I'm puzzled --~--~-~--~~~---~--~~ 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: Tips for reducing Cache.html sizes?
darkflame schrieb: I know this has probably been asked before a few times, but searching around I didn't find anything specific to help me. My current site takes about 10 seconds to load for the first time, mostly down to a 156kb cache file. (for the firefox at least, the others are similar) What kind of computer and what bandwith are you talking about? I need 10 seconds as well, but my cache-files are about 1 MB in size. Regards, Lothar --~--~-~--~~~---~--~~ 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: Tips for reducing Cache.html sizes?
Hi, Do you want me to check the load time from the UK? Also, you might like to check the time from my site (220-230k, based in the UK) Depending on the results, it might indicate that it's not the size but the processing which is the problem. Does it take a similar time to load locally? Ian http://examples.roughian.com 2009/3/4 Darkflame darkfl...@gmail.com My bandwidth is fine (8Mb/s down), but I suspect the sever is slow hence the difference. For one thing, I'm in the netherlands and its in america. 1MB?! Thats a hell of a lot of code you got there :p Even my biggest project...a java online adventure game still in development...is only 250kb. I have noticed I get 1MB files if I compile by right clicking on the xml and going Run as GWT Hosted Mode and then compile, but I get vastely smaller files (150kb) if I use eclipse's run system itself and then compile (I assume the plugin for the right click isnt as efficiant..something causes quite a huge difference anyway). Either way, I'm not happy with my loading time. On Mar 4, 4:42 pm, Lothar Kimmeringer j...@kimmeringer.de wrote: darkflame schrieb: I know this has probably been asked before a few times, but searching around I didn't find anything specific to help me. My current site takes about 10 seconds to load for the first time, mostly down to a 156kb cache file. (for the firefox at least, the others are similar) What kind of computer and what bandwith are you talking about? I need 10 seconds as well, but my cache-files are about 1 MB in size. Regards, Lothar --~--~-~--~~~---~--~~ 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: Error Gwt Sockets
Long is an emulated type in GWT (to be compatible with longs in java. If you are returning a long from JSNI you could use double instead -jason On Mar 3, 2009, at 2:44 PM, frankCostello wrote: Hi, I try to use Sockets.jar, but when I compile, give me an error: [ERROR] Line 653: Type 'long' may not be returned from a JSNI method For additional info see: file:/Users/smartsr/Downloads/gwt- mac-1.5.3/doc/helpInfo/longJsniRestriction.html [ERROR] Line 714: Parameter 'value': type 'long' is not safe to access in JSNI code How do I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Window.confirm in timer.run()
You're probably using scheduleRepeat. Browsers are strictly single threaded (some multi-threading Javascript support coming in FF3.1 that I know of). Anyways your problem is this: run() showWindow() browser keeps generating timer event probably because that comes from the OS there's no locking in place user clicks on button next event is shown Instead do this: timer.schedule(1000); run() { showWindow() timer.schedule(1000); } On Wed, Mar 4, 2009 at 9:34 AM, Danny Schimke schimk...@googlemail.comwrote: Hello! I am using a timer to ask the user after xy minutes to save his changes to database. In the run() method of timer I ask the user wheather he want to save the changes. If the user clicks OK I'll save othwerwise I'll do nothing. I shedule the timer repeatly after xy minutes. When does the timer reruns? After handling the run() method? I recognized that the timer reruns while the confirm message is shown. Is this an issue or correct? Should the timer rerun while its run() method is not finished? I occurs in Firefox, in IE it works like I am thinking how it should work. Example for Error: - Rerunning timer every 1 minute - Confirmation is shown after 1 minute, user does *not* click *OK* or * Cancel* - After two or more minutes I'll click OK or Cancel and the confirm window closes. But the confirm window of the second timer run is shown. - The window is maximal shown two times (e.g. when I am waiting three or more minutes) It should be not very difficult to use a workaround, but I want to understand the correct working of the GWT timer. Thank you! -Danny --~--~-~--~~~---~--~~ 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: Error Gwt Sockets
But be careful that if you do, you're code will not work past 1.5. In 1.6, longs are real longs except emulated an object. The question you need to ask yourself is do you really need a long? If you don't, then just use int. If you do, then you'll need a code path for 1.5 which treats it as a double 1.6 which treats it as a non-native integer type. On Wed, Mar 4, 2009 at 10:59 AM, Jason Essington jason.essing...@gmail.comwrote: Long is an emulated type in GWT (to be compatible with longs in java. If you are returning a long from JSNI you could use double instead -jason On Mar 3, 2009, at 2:44 PM, frankCostello wrote: Hi, I try to use Sockets.jar, but when I compile, give me an error: [ERROR] Line 653: Type 'long' may not be returned from a JSNI method For additional info see: file:/Users/smartsr/Downloads/gwt- mac-1.5.3/doc/helpInfo/longJsniRestriction.html [ERROR] Line 714: Parameter 'value': type 'long' is not safe to access in JSNI code How do I do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Tips for reducing Cache.html sizes?
Darkflame schrieb: My bandwidth is fine (8Mb/s down), but I suspect the sever is slow hence the difference. For one thing, I'm in the netherlands and its in america. That should be visible by checking the download-bar (at the bottom of the window of e.g. InternetExplorer). That way you can see quite easily if it takes long to load or to render the page. If your starting page is very complex, this might be the reason for the long startup-time but in that case you would always have this time and not only the first time you load the page. BTW: We're not living in the 90s anymore with only one sea- cable connecting Europe to the USA where you were able to greet every byte by handshake. So even if you load my GWT-application from a server in the USA you shouldn't have significantly lower speeds than loading from a server in your own country. 1MB?! Thats a hell of a lot of code you got there :p Yes, and it's going to grow even more, so I'm waiting for being able to modularize GWT-projects as well like many others ;-) Even my biggest project...a java online adventure game still in development...is only 250kb. The application in question is the administrative backend of some kind of ApplicationServer including user- management of various communication-protocols that are integrated. So for every service of that server has (about 30) and for every communication-protocol the server supports (about 8) you need a specific administrative page (which can become quite complex) with dialog-boxes allowing the edit of a vast range of values. In addition you have tools like a SQL- frontend, usage of the communication-protocols with managed authentication-settings, certificate-management for protocols like AS2 and SSH and so on and so on. So things summed up a bit ;-) I have noticed I get 1MB files if I compile by right clicking on the xml and going Run as GWT Hosted Mode and then compile, but I get vastely smaller files (150kb) if I use eclipse's run system itself and then compile (I assume the plugin for the right click isnt as efficiant..something causes quite a huge difference anyway). I use the Ant Script that has been created by Instantiation's WindowBuilder and changed it in a way that it's not exporting everything including the Java-sources and all the libraries that are shipped with the server-application anyway (reducing the size of the war-file from about 35 MB to about 3 MB now. When looking into the created HTML file it looks like the obfuscated compile-result and the only way to reduce the size of this I can think of is throwing away the line-breaks which would lead to a reduction of 14 KB in my case. Still this will be more than 1 MB to download so I will leave it the way it is ;-) Regards, Lothar --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Incubator: ScrollTable, hide and sort column
Hello, I'm using Scrolltable from the incubator without problem, untill I tried to hide a column (not the last one but one at the beginning). When I tried to sort the visible columns, I found that by clicking on a header cell, it was sorting the previous column and not the good one. Is it a bug from the scrolltable ? Thank's --~--~-~--~~~---~--~~ 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 can I combine 2 projects into one with gwt 1.6+?
How do I include the classpath for another module so ant will build? - My main module com.gawkat.gwt.Test - In Text.gwt.xml file I include inherits name='com.gawkat.gwt.Apple'/ - I have added Apple projects classpath and src folder to Test Debug Configurations classpath and hosted mode will build the projects. So How can I get Ant to Compile it? Run As Build.xml in com.gawkat.gwt.Test : Buildfile: /home/branflake2267/workspace2/Test/build.xml libs: javac: gwtc: [java] Loading module 'com.gawkat.gwt.Test' [java]Loading inherited module 'com.gawkat.gwt.Apple' [java] [ERROR] Unable to find 'com/gawkat/gwt/ Apple.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? [java][ERROR] Line 15: Unexpected exception while processing element 'inherits' [java] com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) --~--~-~--~~~---~--~~ 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: Tips for reducing Cache.html sizes?
Thanks, Pretty sure its the loading itself. Localy takes 2-3 seconds. (this is also the time I get roughly when loading the site normaly with part of it cached). Your site also loads in about 2 seconds or less. I'll send you the link privately, as I dont want it published on a group ;) -Thomas On Mar 4, 4:57 pm, Ian Bambury ianbamb...@gmail.com wrote: Hi, Do you want me to check the load time from the UK? Also, you might like to check the time from my site (220-230k, based in the UK) Depending on the results, it might indicate that it's not the size but the processing which is the problem. Does it take a similar time to load locally? Ian http://examples.roughian.com 2009/3/4 Darkflame darkfl...@gmail.com My bandwidth is fine (8Mb/s down), but I suspect the sever is slow hence the difference. For one thing, I'm in the netherlands and its in america. 1MB?! Thats a hell of a lot of code you got there :p Even my biggest project...a java online adventure game still in development...is only 250kb. I have noticed I get 1MB files if I compile by right clicking on the xml and going Run as GWT Hosted Mode and then compile, but I get vastely smaller files (150kb) if I use eclipse's run system itself and then compile (I assume the plugin for the right click isnt as efficiant..something causes quite a huge difference anyway). Either way, I'm not happy with my loading time. On Mar 4, 4:42 pm, Lothar Kimmeringer j...@kimmeringer.de wrote: darkflame schrieb: I know this has probably been asked before a few times, but searching around I didn't find anything specific to help me. My current site takes about 10 seconds to load for the first time, mostly down to a 156kb cache file. (for the firefox at least, the others are similar) What kind of computer and what bandwith are you talking about? I need 10 seconds as well, but my cache-files are about 1 MB in size. Regards, Lothar --~--~-~--~~~---~--~~ 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: Tips for reducing Cache.html sizes?
Sounds like a massive project you got there indeed. I wish you luck getting all that sorted. I'm confident its loading time, as the bars show me. Thanks for the information on the transatlantic load times, thats good to know that isnt the reason. On Mar 4, 5:16 pm, Lothar Kimmeringer j...@kimmeringer.de wrote: Darkflame schrieb: My bandwidth is fine (8Mb/s down), but I suspect the sever is slow hence the difference. For one thing, I'm in the netherlands and its in america. That should be visible by checking the download-bar (at the bottom of the window of e.g. InternetExplorer). That way you can see quite easily if it takes long to load or to render the page. If your starting page is very complex, this might be the reason for the long startup-time but in that case you would always have this time and not only the first time you load the page. BTW: We're not living in the 90s anymore with only one sea- cable connecting Europe to the USA where you were able to greet every byte by handshake. So even if you load my GWT-application from a server in the USA you shouldn't have significantly lower speeds than loading from a server in your own country. 1MB?! Thats a hell of a lot of code you got there :p Yes, and it's going to grow even more, so I'm waiting for being able to modularize GWT-projects as well like many others ;-) Even my biggest project...a java online adventure game still in development...is only 250kb. The application in question is the administrative backend of some kind of ApplicationServer including user- management of various communication-protocols that are integrated. So for every service of that server has (about 30) and for every communication-protocol the server supports (about 8) you need a specific administrative page (which can become quite complex) with dialog-boxes allowing the edit of a vast range of values. In addition you have tools like a SQL- frontend, usage of the communication-protocols with managed authentication-settings, certificate-management for protocols like AS2 and SSH and so on and so on. So things summed up a bit ;-) I have noticed I get 1MB files if I compile by right clicking on the xml and going Run as GWT Hosted Mode and then compile, but I get vastely smaller files (150kb) if I use eclipse's run system itself and then compile (I assume the plugin for the right click isnt as efficiant..something causes quite a huge difference anyway). I use the Ant Script that has been created by Instantiation's WindowBuilder and changed it in a way that it's not exporting everything including the Java-sources and all the libraries that are shipped with the server-application anyway (reducing the size of the war-file from about 35 MB to about 3 MB now. When looking into the created HTML file it looks like the obfuscated compile-result and the only way to reduce the size of this I can think of is throwing away the line-breaks which would lead to a reduction of 14 KB in my case. Still this will be more than 1 MB to download so I will leave it the way it is ;-) Regards, Lothar --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Slow data loading to a FlexTable
An application I'm working on uses a FlexTable to display a list of parts. There a 5 columns in the flex table. When the parts list is not very large, the table loads in under 1 second. One list of parts is 268 rows. A list of this size takes between 12 and 13 seconds to load. I put displays in to show the elapsed time for every 88 rows. The timings showed the first third was in about 1.5 seconds, the next third was in about 4 seconds and the last third in over 6 seconds. This elapsed time is after the data has been received from the server (which is also very fast). All of the above is on a Windows Vista client using IE 7. Testing the same code on FireFox 3.0.6, the 268 rows display in under 1 second. Is this a known problem with IE and are there any work arounds? Unfortunately FireFox is not a solution for this issue as the company's only approved browser is IE. --~--~-~--~~~---~--~~ 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: Slow data loading to a FlexTable
eadams schrieb: The timings showed the first third was in about 1.5 seconds, the next third was in about 4 seconds and the last third in over 6 seconds. This elapsed time is after the data has been received from the server (which is also very fast). All of the above is on a Windows Vista client using IE 7. Testing the same code on FireFox 3.0.6, the 268 rows display in under 1 second. Is this a known problem with IE and are there any work arounds? Unfortunately FireFox is not a solution for this issue as the company's only approved browser is IE. It's a rendering issue and not the only one. Try creating a Tree with 100.000 elements and have a look how much fun you have with InternetExplorer and Firefox (Safari is very fast here which makes me jealous). One thing I haven't tried but you might try out is adding the flex-table to the panel after adding all rows. This might speed up things because InternetExplorer seems to redraw the whole table when adding rows (this is not GWT- specific, I had the same effects with other web-frameworks in the Good Old Days(R) as well). Or - if that has no effect - you might play around with setVisible. Regards, Lothar --~--~-~--~~~---~--~~ 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: Need fix for GWT 1.6 Jars in Maven Repo
I had the same problem yesterday, and I stumbled on this post. Thanks a lot for the explanation. I opened an issue here: http://code.google.com/p/google-web-toolkit/issues/detail?id=3439 (Will, since your post explained the problem clearly, I took it as a basis in the issue's description (changing/adding some details), I hope you won't mind) I wonder if this problem only appears when using maven, or if ant- based builds also suffer from it. -en On Mar 3, 3:34 pm, Garey garey.tay...@gmail.com wrote: I am also having this issue. The workaround isn't hard, but it's annoying and I would rather not do it for every release. Thanks, g On Feb 26, 10:49 am, Will wgomes.ku...@gmail.com wrote: Not sure who is reposponsible for the jars deployed to maven, but I am having issues with the versions deployed there. The1.6.0 and1.6.1 versions of gwt-dev and gwt-user jars contain the source code for thejavax.servletpackage. The problem is the source code has a newer timestamp than the class files. This causes the javax.servletclasses to be recompiled and placed in our target. Can someone fix the deployed jars to either 1) include class files having a later timestamp or 2) contain nojavaxsource code. Not sure of the source code is required, the jars for version 1.5.3 didn't include anyjavax.servletsources. I'm leaning toward option 2 since the classpath could contain externaljavax.servletclasses with older timestamp than sources bundled in gwt jars. --~--~-~--~~~---~--~~ 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: which tools you have used for development of GWT?
I have only gotten as far as working through the StockWatcher tutorial but am getting the following [ERROR] Unable to instantiate 'com.google.gwt.sample.stockwatcher.server.StockPriceServiceImpl'. But, to answer your question ... I am not using an IDE (eclipse) but am copy/pasting into my favorite text editor (ultraEdit). I have intentions of trying to use netBeans (http://www.netbeans.org/kb/60/ web/quickstart-webapps-gwt.html) sometime later today. On Mar 3, 11:05 pm, shiren1118 shiren1...@126.com wrote: which tools you have used for development of GWT? I'm puzzled --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Google Analytics and GWT
Hi All, Can any one guide me how to add the feature zoom in/ zoom out to charts using gchart and gwt? Thanks, Shital --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Jetty classpath in GWT 1.6
Hello! Currently it seems that Jetty only loads class files and jars from WEB-INF/classes and WEB-INF/lib. The classpath argument are getting ignored (worked with Tomcat). I tried to add extra classpath folder via jetty-web.xml / jetty-env.xml, but that doesn't seems to work (e.g. Spring throws an ClassNotFoundException before the extra classpath is added). This seems like a step backward to me. Especially since I use Maven and Jetty would not only be flexible enough to load classes / jars from different locations, but can also load static webapp files from differnt location: http://docs.codehaus.org/display/JETTY/Multiple+WebApp+Source+Directory This would make things with Maven much cleaner / easier... Best regards, Markus --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Compilation of a GWT project for firefox
i have the following compilation error : [ERROR] Unable to load module entry point class org.vnf.itineo.client.Main (see associated exception for details) com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet ne gère pas cette propriété ou cette méthode number: -2146827850 description: Cet objet ne gère pas cette propriété ou cette méthode at com.google.gwt.user.client.impl.DOMImplStandard.initEventSystem (Native Method) at com.google.gwt.user.client.impl.DOMImplMozilla.initEventSystem (DOMImplMozilla.java:45) at com.google.gwt.user.client.impl.DOMImpl.maybeInitializeEventSystem (DOMImpl.java:165) at com.google.gwt.user.client.impl.DOMImplStandard.sinkEvents (DOMImplStandard.java:160) at com.google.gwt.user.client.impl.DOMImplMozilla.sinkEvents (DOMImplMozilla.java:33) at com.google.gwt.user.client.DOM.sinkEvents(DOM.java:1214) at com.google.gwt.user.client.ui.UIObject.sinkEvents(UIObject.java: 713) at com.google.gwt.user.client.ui.Image$UnclippedState.init (Image.java:232) at com.google.gwt.user.client.ui.Image$UnclippedState.init (Image.java:237) at com.google.gwt.user.client.ui.Image.init(Image.java:354) i modify the module gwt.xml like follows !-- User Agent -- set-property name=user.agent value=gecko / P.S. no problem for ie compilation --~--~-~--~~~---~--~~ 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: i am wondering can gwt do the following?
thank you all for your reply On Mar 4, 3:55 pm, Lothar Kimmeringer j...@kimmeringer.de wrote: mikedshaffer schrieb: Agreed. Some of the GWT Canvas work make some of this easier, but over all, Javascript in a browser (which is what GWT is after all!) isn't your best choice. The rendering itself shouldn't be much of a problem. Sincehttp://www.zark.com/which already worked on Netscape 2 (yes, the old stuff, not Firefox or Mozilla) I think you can do more or less everything, even something like the stack-application he linked in his OP. The biggest problem I see with the fact, that incoming data leads to an immediate rendering of a part of the page. So if two diggs are happening this lead to two drops tearing down at the same time, so you need something Comet-like that allows a push from the server to the client and a busy-wait-loop that renders the different drops step by step, changing CSS-properties for the fade-in/fade-out effect of the links that are shown below (the latter is already available with third-party). The busy-wait solution is what makes me suspicious that GWT is the right choice for that. With Flash or Java or whatever the implementation is easy. As soon a new entry has been received from the server a Thread is fired up that handles the fade-in/-out and tearing down of the drop. As soon as the rendering of that drop is finished, the Thread dies. In a singlethreaded environment you have to keep an array of currently to be rendered elements with their current rendering states (e.g. element 1 has teared down 25% of the distance, element 2 30% etc.). The busy waiting loop checks that array for elements to be rendered and renders the next nessecary step for each element. I'm quite sure that you don't need to worry about you coffee getting cold if you place your cup next to the heat-sink of your computer ;-) Flash (which they used) or an applet (java or whatever Microsoft is calling an activex control these days...) would make your life easier. Agreed Regards, Lothar --~--~-~--~~~---~--~~ 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: Compilation of a GWT project for firefox
gecko1_8 On Mar 4, 2:08 am, Chichone hicham.ass...@gmail.com wrote: i have the following compilation error : [ERROR] Unable to load module entry point class org.vnf.itineo.client.Main (see associated exception for details) com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet ne gère pas cette propriété ou cette méthode number: -2146827850 description: Cet objet ne gère pas cette propriété ou cette méthode at com.google.gwt.user.client.impl.DOMImplStandard.initEventSystem (Native Method) at com.google.gwt.user.client.impl.DOMImplMozilla.initEventSystem (DOMImplMozilla.java:45) at com.google.gwt.user.client.impl.DOMImpl.maybeInitializeEventSystem (DOMImpl.java:165) at com.google.gwt.user.client.impl.DOMImplStandard.sinkEvents (DOMImplStandard.java:160) at com.google.gwt.user.client.impl.DOMImplMozilla.sinkEvents (DOMImplMozilla.java:33) at com.google.gwt.user.client.DOM.sinkEvents(DOM.java:1214) at com.google.gwt.user.client.ui.UIObject.sinkEvents(UIObject.java: 713) at com.google.gwt.user.client.ui.Image$UnclippedState.init (Image.java:232) at com.google.gwt.user.client.ui.Image$UnclippedState.init (Image.java:237) at com.google.gwt.user.client.ui.Image.init(Image.java:354) i modify the module gwt.xml like follows !-- User Agent -- set-property name=user.agent value=gecko / P.S. no problem for ie compilation --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
SmartGWT: retrieving node value
hi all, i posted something on smartgwt forum but didn't get much response. so i hope someone here can give me some advices. .. I can't retrieve the value of the nested xml element. i want to retrieve the value of name under the author node below is my datasource. import com.smartgwt.client.data.DataSource; import com.smartgwt.client.data.DataSourceField; import com.smartgwt.client.data.DSRequest; import com.smartgwt.client.data.fields.DataSourceFloatField; import com.smartgwt.client.data.fields.DataSourceIntegerField; import com.smartgwt.client.data.fields.DataSourceLinkField; import com.smartgwt.client.data.fields.DataSourceTextField; import com.smartgwt.client.data.fields.DataSourceImageField; import com.smartgwt.client.types.DSDataFormat; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.JavaScriptObject; public class Twitter2XmlDS extends DataSource{ private static Twitter2XmlDS instance = null; public static Twitter2XmlDS getInstance() { if (instance == null) { instance = new Twitter2XmlDS(twitterDS); } return instance; } public Twitter2XmlDS(String id) { setID(id); setDataFormat(DSDataFormat.XML); setRecordXPath(//default:entry); setDataURL(ds/test_data/twitter2.data.xml); System.out.println(getRecordXPath()); System.out.println(getDataFormat().toString()); DataSourceTextField title_Field = new DataSourceTextField (title, Title); DataSourceTextField updated_Field = new DataSourceTextField (updated, Updated); ***DataSourceTextField author_Field = new DataSourceTextField (name,Author_name);*** ***author_Field.setValueXPath(author/name);*** setFields(title_Field,updated_Field,author_Field); setClientOnly(true); } } my atom xml: ?xml version=1.0 encoding=UTF-8? feed xmlns:google=http://base.google.com/ns/1.0; xml:lang=en-US xmlns:openSearch=http://a9.com/-/spec/opensearch/1.1/; xmlns=http:// www.w3.org/2005/Atom xmlns:twitter=http://api.twitter.com/; idtag:search.twitter.com,2005:search/twitter/id link type=text/html rel=alternate href=http:// search.twitter.com/search?q=twitter/ link type=application/atom+xml rel=self href=http:// search.twitter.com/search.atom?q=twitter/ titletwitter - Twitter Search/title link type=application/opensearchdescription+xml rel=search href=http://search.twitter.com/opensearch.xml/ link type=application/atom+xml rel=refresh href=http:// search.twitter.com/search.atom?q=twitteramp;since_id=1274320152/ updated2009-03-03T16:19:18Z/updated openSearch:itemsPerPage15/openSearch:itemsPerPage link type=application/atom+xml rel=next href=http:// search.twitter.com/search.atom? max_id=1274320152amp;page=2amp;q=twitter/ entry idtag:search.twitter.com,2005:1274320152/id published2009-03-03T16:19:18Z/published link type=text/html rel=alternate href=http://twitter.com/ kaplanmyrth/statuses/1274320152/ titleWatching @ev at #TED talking about #Twitter: http://ping.fm/IS0GK/title content type=htmlWatching lt;a href=http://twitter.com/ evgt;@evlt;/agt; at lt;a href=http://search.twitter.com/search?q= %23TEDgt;#TEDlt;/agt; talking about lt;a href=http:// search.twitter.com/search?q=%23Twittergt;#lt;bgt;Twitterlt;/ bgt;lt;/agt;: lt;a href=http://ping.fm/IS0GKgt;http://ping.fm/ IS0GKlt;/agt;/content updated2009-03-03T16:19:18Z/updated link type=image/png rel=image href=http://s3.amazonaws.com/ twitter_production/profile_images/64875999/andyhand_normal.jpg/ twitter:sourcelt;a href=http://www.ping.fm/gt;Ping.fmlt;/ agt;/twitter:source author namekaplanmyrth (Andy Kaplan-Myrth)/name urihttp://twitter.com/kaplanmyrth/uri /author /entry entry idtag:search.twitter.com,2005:1274320130/id published2009-03-03T16:19:18Z/published link type=text/html rel=alternate href=http://twitter.com/ Phr0ztByte/statuses/1274320130/ titleRT @shanselman: Why I won't follow you on Twitter http://is.gd/eJrC/title content type=htmlRT lt;a href=http://twitter.com/ shanselmangt;@shanselmanlt;/agt;: amp;quot;Why I won't follow you on lt;bgt;Twitterlt;/bgt;amp;quot; lt;a href=http://is.gd/ eJrCgt;http://is.gd/eJrClt;/agt;/content updated2009-03-03T16:19:18Z/updated link type=image/png rel=image href=http://s3.amazonaws.com/ twitter_production/profile_images/56005704/thomas_normal.jpg/ twitter:sourcelt;a href=http:// twitterfon.net/gt;TwitterFonlt;/agt;/twitter:source author namePhr0ztByte (Phr0ztByte)/name urihttp://twitter.com/Phr0ztByte/uri /author /entry entry
Stuck or cancelled ?
Hello, it seems you're a little bit stuck, or maybe cancelled your project ?! Eventually you really should split your work into two projects, i think nearly everyone is waiting for the php server solution, please share it with the world. Good luck, CRO --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Followup on elem is null issue (Firefox 3)
The previous thread for this issue is no longer taking new posts, but after receiving a few emails, I wanted to follow up on this issue. http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/fabd646526aaf2bc?pli=1 In short, it manifests itself as Widget.element and sometimes other fields appearing to be null in cases where they shouldn't be. For example, immediately after being assigned a non-null value. (The real value shows up later on.) This occurs sporadically, and only on Firefox 3. It seems to occur within a constructor (e.g. soon after the object was created). What I believe is happening is that the value from the prototype is being used instead of the value on the object itself, possibly due to some kind of property caching within Firefox. We're seeing this a _lot_ on our application in production. The upstream bug for this issue is 449809, https://bugzilla.mozilla.org/show_bug.cgi?id=449809 Our current production application is silently ignoring these issues, but reporting them back to us. This required a bunch of patching of GWT and seems non-optimal. The next release of our application is taking a different approach. I've added the following code to UIObject, which seems to eliminate all occurrences of this issue with the element field. public UIObject() { /* * FF3 HACK - we set this to null explicitly in the constructor (rather than on the JS prototype), * hoping that the actual non-null setElement() will be more likely to take. */ element = null; } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
google image search in my java application
Hi, i try to create a little JAVA-application that should make a google image search and show the images. is the gwt the right thing for that. some years ago, there was a library that only provided a googleapi.jar and a license key. is there still something simple like that? thanks, ralf --~--~-~--~~~---~--~~ 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: Window.confirm in timer.run()
Thanks for that detailled answer ;) 2009/3/4 Vitali Lovich vlov...@gmail.com You're probably using scheduleRepeat. Browsers are strictly single threaded (some multi-threading Javascript support coming in FF3.1 that I know of). Anyways your problem is this: run() showWindow() browser keeps generating timer event probably because that comes from the OS there's no locking in place user clicks on button next event is shown Instead do this: timer.schedule(1000); run() { showWindow() timer.schedule(1000); } On Wed, Mar 4, 2009 at 9:34 AM, Danny Schimke schimk...@googlemail.comwrote: Hello! I am using a timer to ask the user after xy minutes to save his changes to database. In the run() method of timer I ask the user wheather he want to save the changes. If the user clicks OK I'll save othwerwise I'll do nothing. I shedule the timer repeatly after xy minutes. When does the timer reruns? After handling the run() method? I recognized that the timer reruns while the confirm message is shown. Is this an issue or correct? Should the timer rerun while its run() method is not finished? I occurs in Firefox, in IE it works like I am thinking how it should work. Example for Error: - Rerunning timer every 1 minute - Confirmation is shown after 1 minute, user does *not* click *OK* or * Cancel* - After two or more minutes I'll click OK or Cancel and the confirm window closes. But the confirm window of the second timer run is shown. - The window is maximal shown two times (e.g. when I am waiting three or more minutes) It should be not very difficult to use a workaround, but I want to understand the correct working of the GWT timer. Thank you! -Danny --~--~-~--~~~---~--~~ 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: Slow data loading to a FlexTable
Thanks for the suggestions. Changing the code to add the FlexTable to the scroll panel after loading the data resulted in a good improvement. The 268 row parts list will now load in IE in just over 5 seconds. I tried the setVisible () suggestion as well, but that did not yield much change. The changes yielded an elapsed time of 0.3 seconds in Firefox. On Mar 4, 11:55 am, Lothar Kimmeringer j...@kimmeringer.de wrote: eadams schrieb: The timings showed the first third was in about 1.5 seconds, the next third was in about 4 seconds and the last third in over 6 seconds. This elapsed time is after thedatahas been received from the server (which is also very fast). All of the above is on a Windows Vista client using IE 7. Testing the same code on FireFox 3.0.6, the 268 rows display in under 1 second. Is this a known problem with IE and are there any work arounds? Unfortunately FireFox is not a solution for this issue as the company's only approved browser is IE. It's a rendering issue and not the only one. Try creating a Tree with 100.000 elements and have a look how much fun you have with InternetExplorer and Firefox (Safari is very fast here which makes me jealous). One thing I haven't tried but you might try out is adding the flex-table to the panel after adding all rows. This might speed up things because InternetExplorer seems to redraw the whole table when adding rows (this is not GWT- specific, I had the same effects with other web-frameworks in the Good Old Days(R) as well). Or - if that has no effect - you might play around with setVisible. Regards, Lothar --~--~-~--~~~---~--~~ 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: Window.confirm in timer.run()
Yeah! I canceled the timer and restarted it in in the run() method... It is about the way you've advised me. Thanks again! -Danny 2009/3/4 Vitali Lovich vlov...@gmail.com Did that solve your problem? On Wed, Mar 4, 2009 at 12:35 PM, Danny Schimke schimk...@googlemail.comwrote: Thanks for that detailled answer ;) 2009/3/4 Vitali Lovich vlov...@gmail.com You're probably using scheduleRepeat. Browsers are strictly single threaded (some multi-threading Javascript support coming in FF3.1 that I know of). Anyways your problem is this: run() showWindow() browser keeps generating timer event probably because that comes from the OS there's no locking in place user clicks on button next event is shown Instead do this: timer.schedule(1000); run() { showWindow() timer.schedule(1000); } On Wed, Mar 4, 2009 at 9:34 AM, Danny Schimke schimk...@googlemail.comwrote: Hello! I am using a timer to ask the user after xy minutes to save his changes to database. In the run() method of timer I ask the user wheather he want to save the changes. If the user clicks OK I'll save othwerwise I'll do nothing. I shedule the timer repeatly after xy minutes. When does the timer reruns? After handling the run() method? I recognized that the timer reruns while the confirm message is shown. Is this an issue or correct? Should the timer rerun while its run() method is not finished? I occurs in Firefox, in IE it works like I am thinking how it should work. Example for Error: - Rerunning timer every 1 minute - Confirmation is shown after 1 minute, user does *not* click *OK* or *Cancel* - After two or more minutes I'll click OK or Cancel and the confirm window closes. But the confirm window of the second timer run is shown. - The window is maximal shown two times (e.g. when I am waiting three or more minutes) It should be not very difficult to use a workaround, but I want to understand the correct working of the GWT timer. Thank you! -Danny --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Reloading borgmon for Stubby Doom thingoEOM
-- 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: strange behavior for float numbers
Thank you Alan. The numbers I want to display, come from a file, to the server, then the server sends those numbers to GWT. So I don't have control generating the numbers as rational numbers. The solution that worked for me is to read the numbers on the server as double, then send them to GWT. GWT displays the numbers correctly and performing calculation works well too. I think it's the conversion from float to double that causes this problem. - Tony On Wed, Feb 25, 2009 at 9:50 AM, Alan Hadsell ahads...@gmail.com wrote: On Feb 24, 1:52 pm, tony.p.. tony.t@gmail.com wrote: This seems like a bug in JS, more than just the way it handles float. Because I'm not doing any calculations on the GWT (JS) side, I'm just printing what comes from the server. So if 15.2 if printed as 15.20, that would be ok, but to be printed as 15.19809265136 is really weired. Am I right or am I missing something? You're missing something. In JavaScript there is no such number as 15.2. JavaScript uses IEEE-754 standard floating-point notation, which can only represent numbers of the form (i times 2 ** j) where ** represents exponentiation, and i and j are integers. See http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html for details. The effect is similar to trying to represent 1/3 with an exact decimal representation; you can come very close but you can't get it exactly. If you want to represent exact decimal numbers in JavaScript you have two choices: Use strings, and forego doing arithmetic on them, or use rational numbers, where all numbers are internally in the form (i/j) with i and j integers. One very useful subset of rational notation is scaled decimal, where j is a constant power of 10 depending on the maximum precision you want to retain. So if you're maintaining 4 digits after the decimal place, j is 1, and 15.2 is represented as 152000/1. The denominator (also called the scale factor) can be implied in this case (i.e. you don't need to store it with each number; think of it as a static final value). This notation makes it easy to add and subtract; just add or subtract the numerators. Multiplication is easy if the numbers are small -- multiply the numerators and then divide by the scale factor. Division is relatively easy; multiply one numerator by the scale factor and then divide by the other numerator. In both multiplication and division you need to think about rounding, and also about overflow if any of the intermediate results might exceed 15 digits. - Show quoted text - --~--~-~--~~~---~--~~ 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: Bug in gwt Grid, Setting Background image
I am getting a similar problem with setting the background image in a flex table. The image seems to be set for the table as a whole and then also for each cell in the first column. The problem started occuring after upgrading to 1.5 from 1.3. (It also doesn't happen in Firefox, just IE7) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
modify model for PagingScrollTable, see updates?
I'm using a PagingScrollTable with my own MutableTableModelT. Is it possible to update the model and have the table re-draw itself in response to the change? The use case I have in mind is that the user is viewing some data in the table, and then clicks some kind of button to filter the table data based on some criteria. I'd then want the table to somehow request new data via the model, which would result in an RPC call. I've tried calling reload() on the table, but it seems to be caching the data or something, as my requestRows() method is not being invoked. Is the problem that MutableTableModel wants to pull the data? Is there a more appropriate model to use in situations where the table data might change externally? 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 -~--~~~~--~~--~--~---
Creating charts using GWT
Hi, Can someone give me advice on the best way to create polished-looking charts using GWT? Notes: 1) My GWT app won't have web access so it can't call out to Google Visualizations. 2) The GChart package is nice for bar charts and line charts, but it doesn't support gauges (like on a dashboard) or 3D pie charts, both of which I need. 3) I've thought about using JFreeChart on the server to create image files, then displaying those in the client. Is this the best way? Is there anything better out there? Thanks. -- Joe --~--~-~--~~~---~--~~ 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 retrieve data as byte[] in GWT from getImageData
According to the WhatWG spec for canvas, getImageData() returns a CavasPixelArray, which is an array of bytes. What if you created a JavaScriptObject to represent it? Does GWT thunk to bytes across the JSNI boundary OK? I know it won't pass arrays of anything back, but individual elements maybe: import com.google.gwt.core.client.JavaScriptObject; public class CanvasPixelArray extends JavaScriptObject { protected CanvasPixelArray() { //required by GWT } public native int getLength() /*-{ return this.length; }-*/; public native byte getPixelByte(int pos) /*-{ return this[pos]; }-*/; } //then, create one in your code: public byte[] getBitmap(Element canvasElement, int left, int top, int width, int height) { //then, create one in your code: CanvasPixelArray cpa = getCPA(canvasElement, left, top, width, height); byte[] pixelBytes = new byte[cpa.length()]; for (int i = 0; i cpa.length(); i++) { pixelBytes[i] = cpa.getPixelByte(i); } return pixelBytes; } private native CanvasPixelArray getCPA(Element canvas, int sx, int sy, int sw, int sh) /*-{ return canvas.getContext(2d).getImageData(sx, sy, sw, sh); }-*/; --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Buttons Question
Hi, I have a rather straight forward question that is driving me up the wall trying to solve. Im sure someone on here can help me. So here goes: Basically I have a list of records created in a for loop and a Button which I want to associate with each record. I need to make a listener that takes say the primary key of the associated Record when the button is clicked. However, I cant for the life of me work out how to implement this. Please can someone point me in the right direction? Regards, Jack --~--~-~--~~~---~--~~ 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 with JPA not working in hosted mode
Hi, I have a small template of this and will post it where you want me to ;) This afternoon, I analyzed stack trace and found some strange code in CompilingClassLoader GWT class (http://code.google.com/p/google-web- toolkit/source/browse/releases/1.5/dev/core/src/com/google/gwt/dev/ shell/CompilingClassLoader.java ): @Override protected synchronized Class? findClass(String className) throws ClassNotFoundException { if (className == null) { throw new ClassNotFoundException(null class name, new NullPointerException()); } // Don't mess with anything in the standard Java packages. // if (isInStandardJavaPackage(className)) { // make my superclass load it throw new ClassNotFoundException(className); } } As far as I understand, every class (and annotations) from java and javax package are not managed by this class loader, which could lead to the issue. I still have to validate this analysis by debugging this method step by step. If I am right, I will open an issue about it in GWT project. Regards Bruno On 4 mar, 14:52, Arthur Kalmenson arthur.k...@gmail.com wrote: That doesn't really make sense to me either. We use JPA annotated beans on the client side all the time and all of them have CascadeType. We don't use either Gilead or GXT, so it might have something to do with those libraries. Can you try to create small sample project without those libraries and see if hosted mode launches with the JPA annotations? Then add the Gilead library, see if it works, then add the GXT library and see if it works. -- Arthur Kalmenson On Tue, Mar 3, 2009 at 5:57 PM, grishag grigori.gold...@gmail.com wrote: It's strange but I'm not running with the embedded Tomcat. I used the noserver option and deployed my code to a standalone server (Tomcat 6.0.18). So according to your last comment it should be working. Could you please post a link to the Gilead forum you've mentioned? I just tried to find it with no luck. I don't see why this would work in the web mode anyway because it still goes through the process of trying to compile the annotated code. I actually had a look at the offending line CompilingClassLoader line 579 and sure enough if the package starts with java or javax it throws this exception. Why gwt emulation not working when running in hosted mode but works during compiling beats me. Thanks for your help. On Mar 4, 5:19 am, noon bruno.marches...@gmail.com wrote: Some more precisions, since this is a recurrent issue related in Gilead forum : - The offending annotation is *always* CascadeType. The code source is the same as regular JPA annotation. - Not a classpath issue : I repoduced the issue with the JAR on classpath, and no way to tell Hosted Mode to take it into account - Only the embedded hosted mode fails, web mode is ok. Regards Bruno On 3 mar, 15:38, Arthur Kalmenson arthur.k...@gmail.com wrote: Hmm, have you checked the classpath you use for your GWTCompile and hosted mode launching in Ant? Make sure they're the same. Hosted mode works fine with JPA annotations here (although we do use Maven). It looks like it might be a classpath issue. -- Arthur Kalmenson On Mon, Mar 2, 2009 at 9:48 PM, grishag grigori.gold...@gmail.com wrote: Hi, I have a problem running GWT in hosted mode using JPA annotated domain classes. I can compile my project to JavaScript, package it up in a war and run it on a server no problem but I can't do the same in hosted mode. Really annoying, without hosted mode development is really slow. Here is what I have done: 1. I have one module that defines my domain classes (sitting under the GWT client package) and DAO classes (under GWT server pacakge). The following is the gwt.xml file for this module: module inherits name='net.sf.gilead.Adapter4Gwt15'/ inherits name='net.sf.gilead.emul.java5.ejb3.Ejb3'/ /module 2. The second module implements the client UI and the RPC service that uses the domain objects from the first module: module inherits name=com.google.gwt.user.User/ inherits name=com.extjs.gxt.ui.GXT/ inherits name=com.extjs.gxt.themes.Themes / inherits name='au.gov.vic.dpi.mpd.geodatavic2.module.domain.DomainModel' / stylesheet src=css/ext-all.css / entry-point class='au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.StratigraphicLegends'/ /module Like I said I can compile this using GWTCompiler and run it all on a standalone server but not in hosted mode (I'm using the noserver option). I've been through my classpath multiple times and everything looks fine but I'm still getting this error no matter what I do. If anyone has any idea why this is happening and most importantly how to fix this it would be greatly
DATEBOX HOURS RESETTED
Hi, I've a question about DateBox widget. If you set a Format as this: dd/ MM/ HH:mm on DateBox, when you are selecting a Date, the hour minutes are resetted. So in your dateBox you have a date as 04/03/2009 15:30 and then you're focusing on the textbox, the DatePicker is displayed.But when you select a date (ex. 10/03/2009) the hoursminutes are resetted and your date will be 10/03/2009 00:00. Anyone can suggest a solution? This one is not very good because the date is first setted on the textbox and then is rewritten: txtDataCompilazione.getDatePicker().addValueChangeHandler(new ValueChangeHandlerDate() { @Override public void onValueChange(ValueChangeEventDate event) { Date ok = event.getValue(); ok.setHours(dataCompilazione.getHours()); ok.setMinutes(dataCompilazione.getMinutes()); txtDataCompilazione.setValue(ok,false); } }); txtDataCompilazione.getTextBox().addBlurHandler(new BlurHandler () { @Override public void onBlur(BlurEvent event) { try { dataCompilazione = DateTimeFormat.getFormat(dd/MM/ HH:mm).parseStrict(txtDataCompilazione.getTextBox().getText()); } catch (Exception ex) { } } }); Thanks 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 -~--~~~~--~~--~--~---
Loading new HTML page when button is clicked
Hello, I'm trying to navigate from one HTML page to another when a button is clicked on the first. I have a button listener added and it's inside a panel. Now when I click the button, I want to load a new page. I do not want to use code RootPanle.get().add(new Page1); . . when button_clicked { RootPanel.get().clear; RootPanle.get().add(new Page2); } /code Because if I use this and refresh the page, it loads Page1 How do I go about this? Thanks, Freeze --~--~-~--~~~---~--~~ 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 can I use gwt for my project
In your specific case it sounds like you want to make certain items on your pages dynamic. That can be doe with GWT using either a singe or multiple entry points. You would still use one main module that is a monolithic compilation of all of your dynamic parts. Include the script tag for that module in all of your pages and away you go. The idea is to first identify each item you would like to make dynamic. A particular input element that suggests the contents (suggest box) for instance. give that element on the page a specific ID, and build a GWT module to implement the functionality. do the same for all of the elements you might use throughout your site. your entry points should attempt to find the id of component it is going to populate, and if it isn't found on the page, just exit immediately (remember you'll have a monolithic library that has all of your different widgets (components) in it, so some pages may not use all of the widgets in your module.) The reason for doing it this way is to allow the most efficient code sharing. one monolithic module will be considerably smaller than individual modules for each component. The other benefit is that if your server is properly configured to set the cache-control headers for the xxx.cache.xxx files then the javascript payload and image bundles will be loaded exactly ONCE for your entire site over the life of a particular version of your application. It is a very efficient way to make dynamic components that are used throughout a multi page web site. -jason On Mar 3, 2009, at 6:24 PM, seawave wrote: My project has completed a few days ago,but I don't satisfied about the web pages.So I want to use gwt to let the pages more beautiful.But I find I just can use in one page,GWT just have one Entry-point.I hava a lot of pages,I want to let every page have one Entry-point,what should I do? 我最近做的一个项目已经基本完工了,我对我的页面展示效果不太满意,所以我 决定采用gwt来改善我的页面外观,但是我发现Main.gwt.xml文件 只能对应一个Entry-point,这意味着我只能用一个页面,我这里有好多个页面, 每个页面的内容是不同的,我想问下,这是不是需要多个处理类的多 个onModuel()方法呢? --~--~-~--~~~---~--~~ 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: Loading new HTML page when button is clicked
You *do* need to do it like that. But you also need to write out a history record when you display a page. In the onModuleLoad, you check the history token and display whichever page the history token tells you to load. Have a look at the History() class Ian http://examples.roughian.com 2009/3/4 mrfreeze81 mrfreez...@gmail.com Hello, I'm trying to navigate from one HTML page to another when a button is clicked on the first. I have a button listener added and it's inside a panel. Now when I click the button, I want to load a new page. I do not want to use code RootPanle.get().add(new Page1); . . when button_clicked { RootPanel.get().clear; RootPanle.get().add(new Page2); } /code Because if I use this and refresh the page, it loads Page1 How do I go about this? Thanks, Freeze --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
limitation on text area length?
Is anybody aware of browser-specific limitations on the length of text in a textarea? I have reports from some users that their text is truncated after they have pasted it from a TinyMCE instance back into a GWT textarea. My suspect would be IE but I have not got a reply from the user yet. On a related question, I noticed that textarea widget has only the getText method. I recall from Javascript books that the textarea element could return its contents in chunks (2kB as I recall) as a list of elements. Has GWT abstracted all that as a getText method? --~--~-~--~~~---~--~~ 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: Dealing with session timeout and container managed security
The problem with jumping ahead of the RemoteServiceServlet for your authentication is that you don't have a good way to communicate to GWT that there was an authentication exception. I tend to do my JAAS login inside the RemoteServiceServlet where I can throw a checked AuthenticationException which I can in turn handle gracefully on the client side. consider this scenario: User loads a rather large cash worksheet that he needs to fill, the user begins filling the worksheet, then takes a break, and returns to complete the worksheet. This user then submits the completed worksheet. Now, with the previously mentioned technique, the session is checked before the request is deserialized and the server notices that the session has expired, and throws an authentication exception. The client recieves that exception in the onFailure() method of the callback and takes appropriate action to have the user reauthenticate. once that process is successful, the client application can resubmit the original request, and the user has not lost any of his work. If you use the default form based the world just stops, the user is forced to reauthenticate outside the scope of the application, and his progress is lost. This really aggravates customers by the way. -jason On Mar 4, 2009, at 7:30 AM, marcelstoer wrote: Hhhmm, the community being quiet can mean a lot of things...none are really positive. Was I talking about some dark GWT corners where no stable/proper solutions exist? Or is there simply no right way to solve my problem, but rather many potential solutions that all have their flaws? On Feb 28, 8:26 am, marcelstoer mar...@frightanic.com wrote: Is there some consensus or best practice in the GWT community as for how to deal with session timeout and container managed security? There are some pointers if you search for this subject, but some of the ideas are wild... In my case I use the Servlet container's built in security features for authentication as described in the Servlet specification. Hence, in my web.xm I protect access to the GWT application like so: security-constraint web-resource-collection web-resource-namemy app/web-resource-name url-pattern/app/*/url-pattern http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/public/login.jsp/form-login-page form-error-page/public/login.jsp?retry=true/form-error-page /form-login-config /login-config security-role role-name*/role-name /security-role So, the application (host/bootstrap page, RPC Servlet, etc.) is in the app folder and the login form (login.jsp) is in the public folder. This works flawlessly except for the session timeout use case. The application sends an RPC request to /app/AppServlet, the Servlet container requires authentication because the session had timed out and dutifully *forwards* to the login page. Hence, the result of the request is not some RPC/JSON/XML object as expected by the client but the login page HTML structure. The client simply isn't prepared for that and freezes i.e. doesn't do anything. I believe that on the server side everything is set up correctly. If the session timed out the requests don't even reach the RPC Servlet because it's intercepted by the container, fine. But how do you deal with this in the client? Should one write some custom AsyncCallback class that handles the reponse sent by the container? Thanks for your feedback. Marcel --~--~-~--~~~---~--~~ 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: EntryPoint onModuleLoad called multiple times over course of application lifetime
remember, if your libraries (other GWT modules) also have entry points, all of the onModuleLoad() methods will be called in turn. -jason On Mar 4, 2009, at 12:30 AM, Brian Ferris wrote: I have a relatively complex GWT application composed of my main application EntryPoint and a number of library modules. I had some printlns in the EntryPoint for my application and the libraries and I noticed that they are called multiple times over the course of the application lifetime in hosted mode. This is not the standard I just hit the reload button case where you expect to hit your module EntryPoint, but more of the case where a user has just hit a button to initiate an RPC call that then updates the UI. Is this expected behavior? Something I should be worried about? I apologize for not posting any code samples, but I'm hoping there is something simple I'm missing before I go through the work of trying to reproduce the behavior with a simpler code fragment. --~--~-~--~~~---~--~~ 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: limitation on text area length?
Can only answer the first one, and partially. I was teaching a high school web design class a couple of years ago and a kid copied and pasted about a zillion characters into a text area and got it to fail. I'm sitting on a bus right now so I don't have the specifics, but I seem to remember it was rather large, like 256,000 characters or something. Also vaguely remember that it was different between the browsers, but this was IE6 era On Mar 4, 4:43 pm, greenpossum ken_...@y7mail.com wrote: Is anybody aware of browser-specific limitations on the length of text in a textarea? I have reports from some users that their text is truncated after they have pasted it from a TinyMCE instance back into a GWT textarea. My suspect would be IE but I have not got a reply from the user yet. On a related question, I noticed that textarea widget has only the getText method. I recall from Javascript books that the textarea element could return its contents in chunks (2kB as I recall) as a list of elements. Has GWT abstracted all that as a getText method? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Has CustomFieldSerializer functionality changed in GWT 1.6
Hi, I was using GWT 1.5.2 and have custom field serializers with serialize (...) and deserialize(...) methods. And it was working perfectly. When I tried GWT 1.6.1 instead I've got serialization exception. When I switch back to 1.5.2 all works perfectly again. Does anybody knows what was changed? Best regards, Evgeniy. PS. BTW, does anybody knows why there is so little information and documentation about custom serialization in GWT? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Error: missing ; after for-loop initializer
In the Firefox error console I see the error message: Error: missing ; after for-loop initializer Source File: my host.cache.html Line: 42, Column: 167 I'm using GWT 1.5.3 and I looking around found a Fixed issue but the link on GWT release notes is dead http://code.google.com/webtoolkit/releases/release-notes-1.1.10.html (issue 4927592) Maybe something is still not fixed and I've run into it. Any help would be appreciated. FYI, the page loads fine in GWT shell but IE, Firefox and Chrome all dont work. Thanks! That line in the GWT generated code is: function cr(q,r){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,s,t;if (200==r.a.status){t=r.a.responseText;o=(t2(),C4(u2,t));c=c4(new b4(), (B4(),o.a.getElementsByTagNameNS(ri,ik)));this.a.c=nab(new mab());for (i=0;ic.a.length;++i){a=aq(new Ep());d=E3(f5(c.a,i));m=c4(new b4 (),d.a.childNodes);for(k=0;km.a.length;++k){p=E3(f5(m.a,k));if(j8 (p.a.nodeName,tk)){a.b=e4(c4(new b4(),p.a.childNodes),0).a.nodeValue} else if(j8(p.a.nodeName,Ek)){s=c4(new b4(),p.a.childNodes);for (l=0;ls.a.length;++l){e=c4(new b4(),E3(f5(s.a,l)).a.childNodes);f=new Ap();Fq(e,jl);f.b=Fq(e,vl);n=Fq(e,am);if(n==null)continue;n=n.substr (0,n.length-4-0);n+=lm;f.a=n;oab(a.a,f)}}}oab(this.a.c,a)}CW (this.a.d);for(b=B${new z${},this.a.c};b.ab.b.Fb();){a=dy(E${b}, 3);j=DV(new nV(),a.b);for(g=B${new z${},a.a};g.ag.b.Fb();){f=dy(E${g}, 4);h=DV(new nV(),f.b);fY(h,f.a);j.u(h)}EU(this.a.d.g,j)} this.a.i.t.style.display=ul}else{$wnd.alert(wm+r.a.status)}aR (this.a.e)} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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 -~--~~~~--~~--~--~---
problem about add the 3rd party gadgets to GWT page.
Hi All, Yesterday, I wrote a test page for add the gadget of Google Friend Connect to my GWT page. I create a new HTML object and set the gadget's script (got from Google Friend Connect ) to this object. This is the code summary: HTML htmObj = new HTML(!-- some script got from 'Google Friend Connect'--) RootPanel.get().add(htmObj); But this code only can run on Firefox. In other browsers (IE, Chrome, etc.) the gadget is can not show correctly. Do we need use other way to add a 3rd party gadgets to GWT page? Thanks, Xiongjia Le --~--~-~--~~~---~--~~ 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 with JPA not working in hosted mode
Hi, you may need to take a look at -noserver option when running your gwt shell. with this, you could use your favorite servlet container as server for your gwt shell. regards, Gede sutarsa 2009/3/3 grishag grigori.gold...@gmail.com Hi, I have a problem running GWT in hosted mode using JPA annotated domain classes. I can compile my project to JavaScript, package it up in a war and run it on a server no problem but I can't do the same in hosted mode. Really annoying, without hosted mode development is really slow. Here is what I have done: 1. I have one module that defines my domain classes (sitting under the GWT client package) and DAO classes (under GWT server pacakge). The following is the gwt.xml file for this module: module inherits name='net.sf.gilead.Adapter4Gwt15'/ inherits name='net.sf.gilead.emul.java5.ejb3.Ejb3'/ /module 2. The second module implements the client UI and the RPC service that uses the domain objects from the first module: module inherits name=com.google.gwt.user.User/ inherits name=com.extjs.gxt.ui.GXT/ inherits name=com.extjs.gxt.themes.Themes / inherits name='au.gov.vic.dpi.mpd.geodatavic2.module.domain.DomainModel' / stylesheet src=css/ext-all.css / entry-point class='au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.StratigraphicLegends'/ /module Like I said I can compile this using GWTCompiler and run it all on a standalone server but not in hosted mode (I'm using the noserver option). I've been through my classpath multiple times and everything looks fine but I'm still getting this error no matter what I do. If anyone has any idea why this is happening and most importantly how to fix this it would be greatly appreciated. I've been battling with this thing for a day and a half and I'm out of ideas. Thank you. Buildfile: U:\projects\GeoDataVic2alt\build.xml gwt.run: [java] java.lang.NoClassDefFoundError: javax/persistence/ CascadeType [java] at java.lang.Class.getDeclaredMethods0(Native Method) [java] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) [java] at java.lang.Class.getDeclaredMethods(Unknown Source) [java] at com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembersUsingReflectionHelper (DispatchClassInfo.java:184) [java] at com.google.gwt.dev.shell.DispatchClassInfo.lazyInitTargetMembers (DispatchClassInfo.java:146) [java] at com.google.gwt.dev.shell.DispatchClassInfo.getMemberId (DispatchClassInfo.java:55) [java] at com.google.gwt.dev.shell.CompilingClassLoader $DispatchClassInfoOracle.getDispId(CompilingClassLoader.java:130) [java] at com.google.gwt.dev.shell.CompilingClassLoader.getDispId (CompilingClassLoader.java:531) [java] at com.google.gwt.dev.shell.ie.IDispatchProxy.getIDsOfNames (IDispatchProxy.java:124) [java] at com.google.gwt.dev.shell.ie.IDispatchImpl.GetIDsOfNames (IDispatchImpl.java:273) [java] at com.google.gwt.dev.shell.ie.IDispatchImpl.method5 (IDispatchImpl.java:189) [java] at org.eclipse.swt.internal.ole.win32.COMObject.callback5 (COMObject.java:108) [java] at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method) [java] at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke (IDispatch.java:64) [java] at org.eclipse.swt.ole.win32.OleAutomation.invoke (OleAutomation.java:493) [java] at org.eclipse.swt.ole.win32.OleAutomation.invoke (OleAutomation.java:417) [java] at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow (ModuleSpaceIE6.java:67) [java] at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke (ModuleSpaceIE6.java:152) [java] at com.google.gwt.dev.shell.ModuleSpace.invokeNative (ModuleSpace.java:447) [java] at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject (ModuleSpace.java:228) [java] at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject (JavaScriptHost.java:91) [java] at au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer.createMethodMap (transient source for au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer) [java] at au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer.clinit (transient source for au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_TypeSerializer: 10) [java] at au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_Proxy.clinit (transient source for au.gov.vic.dpi.mpd.geodatavic2.module.legends.client.service.StratigraphicLegendsService_Proxy: 12) [java] at java.lang.Class.forName0(Native Method) [java] at java.lang.Class.forName(Unknown Source)
Sequential workflow in an asynchronous GWT world
How is everyone managing to implement sequential workflows when GWT only allows async calls? I have a series of panels that user must respond to in sequence and their answers may lead to a different path of panels (warnings, error panels, etc..) I think every GWT programmer working on a large project must have run into this. I'm interested in what strategies/ techniques/code you used to help keep the complexity down. --~--~-~--~~~---~--~~ 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: Announcing GWT 1.6 Milestone 2
Just installed M2 and took a look around. I must say I like it - feels more natural to me. For a new project I wanted to start in 1.6, I didn't want to migrate in the middle and update all the deprecated stuff. Haven't put it through its paces yet. But first thing - I have control of web.xml :) Excellent work. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Question about Server-client model.
Hi, I’m a very beginner of GWT. I need some help. I’m working on some project such as: 1. User on server make some Java application by using Swing , AWT, or other API. 2. Server converts them into Java script by using GWT and sends them to client. 3. Whenever contents on server are changed, server has to refresh the contents on client. (Push). Are there any good solution or example for me? I need your help! Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Sequential workflow in an asynchronous GWT world
You have to think about what kind of UI the users actions have caused. For instance, if you would expect all inputs to become disabled (or at least the one which would generate more async calls). Perhaps also some kind of waiting indicator that you are in an async call. On Wed, Mar 4, 2009 at 10:15 PM, rlaferla robertlafe...@comcast.net wrote: How is everyone managing to implement sequential workflows when GWT only allows async calls? I have a series of panels that user must respond to in sequence and their answers may lead to a different path of panels (warnings, error panels, etc..) I think every GWT programmer working on a large project must have run into this. I'm interested in what strategies/ techniques/code you used to help keep the complexity down. --~--~-~--~~~---~--~~ 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: Sequential workflow in an asynchronous GWT world
Sorry - so to make it more applicable to what you were asking: disable your current UI/indicate that the application is working. you may also want to prefetch the UI here if necessary. when you receive your result in your async callback, perform the transition. On Wed, Mar 4, 2009 at 10:32 PM, Vitali Lovich vlov...@gmail.com wrote: You have to think about what kind of UI the users actions have caused. For instance, if you would expect all inputs to become disabled (or at least the one which would generate more async calls). Perhaps also some kind of waiting indicator that you are in an async call. On Wed, Mar 4, 2009 at 10:15 PM, rlaferla robertlafe...@comcast.netwrote: How is everyone managing to implement sequential workflows when GWT only allows async calls? I have a series of panels that user must respond to in sequence and their answers may lead to a different path of panels (warnings, error panels, etc..) I think every GWT programmer working on a large project must have run into this. I'm interested in what strategies/ techniques/code you used to help keep the complexity down. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Google Analytics and GWT
How is this related to Google Analytics? Please start another thread. -- Arthur Kalmenson On Wed, Mar 4, 2009 at 8:04 AM, shital k skmai...@gmail.com wrote: Hi All, Can any one guide me how to add the feature zoom in/ zoom out to charts using gchart and gwt? Thanks, Shital --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
pagingScrollTable re-size
When I re-size the Browser window, the left Side of my PagingScrollTable moves around. In the pagingScrollTable example: http://collectionofdemos.appspot.com/demo/com.google.gwt.gen2.demo.scrolltable.ScrollTableDemo/ScrollTableDemo.html When you re-size the browser, the left side of the table stays stationary. How do you keep the left side stationary when you resize? Is there a way to see the source code for the pagingScrollTable example? 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 -~--~~~~--~~--~--~---
The method addClickListener(ClickListener) in the type Label is not applicable for the arguments (TheLocalConnectorContent)
I'm trying to make a click event occur for several images that are rendered as HTML using AbstractImagePrototype.getHTML() and having trouble. I can make a click event just fine when I do each individual HTML object, but when I try to use the this pointer, I get the error in the subject. Here's a snippet of my code. Please comment how I can do this right and, if not this way, how to make it such that I don't need to create a bunch of individual clickListeners. // Constructor TheLocalConnectorContent() { t = new FlexTable(); t.addStyleName(flex-table); images = GWT.create(TheLocalConnectorImages.class); // Retrieve the html portion from TheLocalConnectorImages carouselresale = new HTML(images.carouselresale().getHTML()); carouselresale.addClickListener(this); } // Fired off when an ad was clicked public void onClick(Widget sender) { // First check to see if a regular image was clicked if (sender == carouselresale) { setImagePopupAndDisplay(carouselresale_full); } } --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Why does FormPanel don't implement the reset method?
IE an FF both supply this method --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Validation Framework
Has anyone found a simple and still supported validation framework for gwt yet? Cheers Pete --~--~-~--~~~---~--~~ 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 with JPA not working in hosted mode
I tried a few things today but beside more problems, no solution yet. 1. Created a few POJOs and added a bunch of JPA annotations to them (including the javax.persistence.CascadeType). In my RPC service class, I manually instantiate a POJO and return it. This works fine. The GWT compiler/shell is not complaining about any annotations. I'm still using Gilead and GWT-SL with the -noserver option. 2. For my second attempt, I configured the above POJOs in my Spring AnnotationSessionFactoryBean, e.g bean id=sessionFactory class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean property name=dataSourceref bean=dataSource//property ... property name=annotatedClasses list ... valueau.gov.vic.dpi.mpd.geodatavic2.module.domain.client.model.security.User/ value /list /property /bean Note, I still just manually create the User class in the RPC service class, I'm not actually retrieving anything from database via Hibernate but it didn't work. I got the following exception (on the server): SEVERE: Exception while dispatching incoming RPC call java.lang.RuntimeException: java.lang.NullPointerException at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException (GWTRPCServiceExporter.java:344) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall (GWTRPCServiceExporter.java:313) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest (GWTRPCServiceExporter.java:363) at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle (HttpRequestHandlerAdapter.java:49) at org.springframework.web.servlet.DispatcherServlet.doDispatch (DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService (DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest (FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost (FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 447) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at net.sf.gilead.core.hibernate.HibernateUtil.isUnsavedValue (HibernateUtil.java:1328) at net.sf.gilead.core.hibernate.HibernateUtil.getId (HibernateUtil.java:290) at net.sf.gilead.core.hibernate.HibernateUtil.getId (HibernateUtil.java:200) at net.sf.gilead.core.hibernate.HibernateUtil.isPersistentPojo (HibernateUtil.java:314) at net.sf.gilead.core.PersistentBeanManager.clonePojo (PersistentBeanManager.java:325) at net.sf.gilead.core.PersistentBeanManager.clone (PersistentBeanManager.java:241) at net.sf.gilead.gwt.GileadRPCHelper.parseReturnValue (GileadRPCHelper.java:129) at org.gwtwidgets.server.spring.hb4gwt.HB4GWTRPCServiceExporter.invokeMethodOnService (HB4GWTRPCServiceExporter.java:63) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall (GWTRPCServiceExporter.java:298) ... 21 more I'm still scratching my head about this one... 3. I did try to retrieve POJOs from the database instead of manually creating them but I got the same result. The POJOs are quite simple. Here's an example. Why this doesn't work is a mistery to me. @Entity @Table(name = USERS, schema = SECURITY) public class Users extends LightEntity implements java.io.Serializable { private String userId; private Date endDate; private SetApplicationRoles applicationRoleses = new HashSetApplicationRoles(0); public Users() { } @Id @Column(name =
Re: Sequential workflow in an asynchronous GWT world
Making an async call appear to be sequential is easy, just block or fade out or have a pop up progress bar until the async operation completes. On Mar 4, 10:15 pm, rlaferla robertlafe...@comcast.net wrote: How is everyone managing to implement sequential workflows when GWT only allows async calls? I have a series of panels that user must respond to in sequence and their answers may lead to a different path of panels (warnings, error panels, etc..) I think every GWT programmer working on a large project must have run into this. I'm interested in what strategies/ techniques/code you used to help keep the complexity down. --~--~-~--~~~---~--~~ 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 get imsges from server to client
dear sir, i have a problem in gwt my problem is: How to get images may be 100 images at once from server to client and dispaly them at browser? please send me some good solution abt this problem. with regards Avdhesh --~--~-~--~~~---~--~~ 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: Buttons Question
The easiest way is probably to extend button class to hold an extra id. Smth. like (not checked - just to give you an idea): class myButton extends Button { private int id; Button(int id) { this.id = id; super(); } public int getId() { return id; } } Every time you instantiate a Button - give it your primary key to hold. Every time you click on it use getId() to retrieve the primary key. On 4 Mrz., 22:14, fatjack1...@googlemail.com fatjack1...@googlemail.com wrote: Hi, I have a rather straight forward question that is driving me up the wall trying to solve. Im sure someone on here can help me. So here goes: Basically I have a list of records created in a for loop and a Button which I want to associate with each record. I need to make a listener that takes say the primary key of the associated Record when the button is clicked. However, I cant for the life of me work out how to implement this. Please can someone point me in the right direction? Regards, Jack --~--~-~--~~~---~--~~ 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: popup menu example
Hi Carlo, As Vagner pointed out, you can find an examples of various widgets in the Showcase sample application linked above (just click on the Source Code tab to see view the GWT source). In case you were looking for an example of a Menu widget rather than a Popup (it was unclear in your original message), you can find an example of a MenuBar in the Showcase sample application as well at the link below: http://gwt.google.com/samples/Showcase/Showcase.html#CwMenuBar Hope that helps, -Sumit Chandel On Sun, Mar 1, 2009 at 7:59 PM, Vagner Araujo araujo...@gmail.com wrote: http://gwt.google.com/samples/Showcase/Showcase.html#CwBasicPopup Vagner Araujo. --~--~-~--~~~---~--~~ 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: (JSNI) Accessing this instance from inner JS functions
Hi Andrey, The last solution that Thomas and sutarsa girl proposed should do the trick (assigning the var to the 'this' variable before referencing functions from it). The reason why this must be done to make sure that the copy of the 'this' object that you're dealing with is what you expect it to be. The 'this' variable in an inner function is part of a closure, and in closures, the 'this' variable is stored by reference. Therefore, the state of the 'this' object at the time you're accessing it isn't guaranteed, and hence your function call might not work. By assigning a var to 'this' and then calling the function from that var, you're guaranteed that the function is defined and the var is what you think it is. This is described in the FAQ linked below: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=FAQ_BridgeMethodNotWorkingOnclick Hope that helps, -Sumit Chandel On Sun, Mar 1, 2009 at 8:48 PM, sutarsa giri sutarsa.g...@gmail.com wrote: hi andrey, i usually use this trick when deal with this reference inside method class PageToolbar extends PagingToolbar { private native void patch() /*-{ var dummyThis=this; var pagingToolbar = th...@com.gwtext.client.widgets.component::getOrCreateJsObj()(); pagingToolbar.field.on(keydown, function(e) { alert(1); *dummythi...@mypackage.pagetoolbar::mymethod()(); alert(2); }, pagingToolbar); }-*/; private void mymethod() { ... } } it's work for my jsni call On Mon, Mar 2, 2009 at 7:42 AM, Shawn Brown big.coffee.lo...@gmail.comwrote: HI, Is there any way I can access enclosing this instance (that would be PageToolbar)? Pass it in, and call your method. It works for me. patch(this); //method call class PageToolbar extends PagingToolbar { private native void patch(PageToolbar pt) /*-{ /class of whatever gets passed in var pagingToolbar = p...@com.gwtext.client.widgets.component::getOrCreateJsObj()(); pagingToolbar.field.on(keydown, function(e) { alert(1); p...@mypackage.pagetoolbar::mymethod()(); alert(2); }, pagingToolbar); }-*/; private void mymethod() { ... } } --~--~-~--~~~---~--~~ 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 tree Panel
Hi i am new with gwt and am having some problems with the tree panel. it doesnt seem to appear. really need some help here. thnxs! below is my code. final TreePanel treePanelVistaArrows = new SampleTree(); //treePanelVistaArrows.setTitle(Vista Arrows); treePanelVistaArrows.setWidth(250); treePanelVistaArrows.setHeight(400); treePanelVistaArrows.setUseArrows(true); //treePanelVistaArrows.getUseArrows(true); treePanelVistaArrows.setAnimate(true); treePanelVistaArrows.expandAll(); Panel p2 = new Panel(); p2.add(treePanelVistaArrows); navigationPanel.add(p2); . . . westPanel.add(navigationPanel); class SampleTree extends TreePanel { public SampleTree() { TreeNode root = new TreeNode(Company Heirarchy); TreeNode ceo = new TreeNode(Home); ceo.setExpanded(true); TreeNode manager1 = new TreeNode(Mind Map); manager1.setExpanded(true); TreeNode manager2 = new TreeNode(Info Vault); manager2.setExpanded(true); TreeNode manager3 = new TreeNode(Query Tree); manager3.setExpanded(true); TreeNode manager4 = new TreeNode(Browers State); manager4.setExpanded(true); ceo.appendChild(manager1); ceo.appendChild(manager2); ceo.appendChild(manager3); ceo.appendChild(manager4); root.appendChild(ceo); setRootVisible(false); //setTitle(Company); setWidth(200); setHeight(400); setRootNode(root); root.setExpanded(true); } } --~--~-~--~~~---~--~~ 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 tree Panel
the tree does not appear in the navigation panel that i have setup on the lefthand side(west). --~--~-~--~~~---~--~~ 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] Comment on WAR_Design_1_6 in google-web-toolkit
Comment by mar...@myd0.de: Sorry, forgot that the build.xml compiles the classes on ant hosted. Without the compile task it isn't working... :-/ The problem still exist and can currently only be solved be copying classes and libs into a central war folder. But this isn't nessesary. Jetty is flexible enough to handle this issue better... I still don't get why the classpath isn't working. This was not an issue with Tomcat... For more information: http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Four quick compiler code reviews -- trunk
On Tue, Mar 3, 2009 at 2:16 AM, Scott Blum sco...@google.com wrote: SourceGen: all this really does is make it so that when you click on a JsniMethodBody in the debugger, you can see the source. Is SourceGenerationVisitor specified to be able to recreate the original Java input? Also, why keep the comment braces around the toString version? LGTM JsModVisitor: two peephole optimizations, but the real goal is to enable immutable lists to be traversed, provided you don't actually try to mutate them. Don't you still need to reset ctx.replaced to false? LGTM JsSourceInfo: this is just deleting an old file that's no longer needed; JsSourceInfo was superceded by SourceInfoJs. LGTM JsParser: The API on JsParser is kind of abysmal. There's no reason for this to be stateful between calls, so I just turned this into a couple of static methods and updated the call sites. I'm not 100% done with this patch-- I actually want to verify/tweak on this to make sure we can get character-level accurate SourceInfo in the JS AST. But I figured it would be good to review the basic idea first. LGTM, thought what's the call to Context.exit() for? Thanks, Scott -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4917 - in trunk: dev/core/src/com/google/gwt/core/linker dev/core/src/com/google/gwt/dev/jjs/imp...
Author: sp...@google.com Date: Wed Mar 4 08:03:43 2009 New Revision: 4917 Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java trunk/user/src/com/google/gwt/core/client/AsyncFragmentLoader.java trunk/user/src/com/google/gwt/core/client/RunAsyncCallback.java Log: Allow runAsync to download code using XHR instead of script tags. When the XHR downloads are used, download errors are detected and downloads can be retried later. Review by: bobv Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java == --- trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java (original) +++ trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java Wed Mar 4 08:03:43 2009 @@ -155,13 +155,18 @@ out.newlineOpt(); if (supportRunAsync) { out.print(function __gwtStartLoadingFragment(frag) {); + out.indentIn(); + out.newlineOpt(); + out.print( return $moduleBase + ' + FRAGMENT_SUBDIR + + /' + $strongName + '/' + frag + ' + FRAGMENT_EXTENSION + ';); + out.indentOut(); + out.newlineOpt(); + out.print(};); out.newlineOpt(); + out.print(function __gwtInstallCode(code) {); out.indentIn(); - out.print( var script = document.createElement('script');); out.newlineOpt(); - out.print( script.src = ' + FRAGMENT_SUBDIR + / + strongName - + /' + frag + ' + FRAGMENT_EXTENSION + ';); - out.print( document.getElementsByTagName('head').item(0).appendChild(script);); + out.print($wnd.eval(code)); out.indentOut(); out.newlineOpt(); out.print(};); Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java Wed Mar 4 08:03:43 2009 @@ -180,7 +180,13 @@ srcWriter.println(}); srcWriter.println(if (!loading) {); srcWriter.println(loading = true;); -srcWriter.println(AsyncFragmentLoader.inject( + entryNumber + );); +srcWriter.println(AsyncFragmentLoader.inject( + entryNumber + ,); +srcWriter.println( new AsyncFragmentLoader.LoadErrorHandler() {); +srcWriter.println(public void loadFailed(Throwable reason) {); +srcWriter.println( loading = false;); +srcWriter.println( runCallbackOnFailures(reason);); +srcWriter.println(}); +srcWriter.println( });); srcWriter.println(}); srcWriter.println(}); } Modified: trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java == --- trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java (original) +++ trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java Wed Mar 4 08:03:43 2009 @@ -120,6 +120,21 @@ private HTML styleWidget = null; /** + * Whether the demo widget has been initialized. + */ + private boolean widgetInitialized; + + /** + * Whether the demo widget is (asynchronously) initializing. + */ + private boolean widgetInitializing; + + /** + * A vertical panel that holds the demo widget once it is initialized. + */ + private VerticalPanel widgetVpanel; + + /** * Constructor. * * @param constants the constants @@ -141,6 +156,12 @@ deckPanel.add(w); } + @Override + public void ensureWidget() { +super.ensureWidget(); +ensureWidgetInitialized(widgetVpanel); + } + /** * Get the description of this example. * @@ -255,6 +276,7 @@ * Initialize this widget by creating the elements that should be added to the * page. */ + @Override protected final Widget createWidget() { deckPanel = new DeckPanel(); @@ -264,18 +286,18 @@ tabBar.addSelectionHandler(this); // Create a container for the main example -final VerticalPanel vPanel = new VerticalPanel(); -add(vPanel, constants.contentWidgetExample()); +widgetVpanel = new VerticalPanel(); +add(widgetVpanel, constants.contentWidgetExample()); // Add the name HTML nameWidget = new HTML(getName()); nameWidget.setStyleName(DEFAULT_STYLE_NAME + -name); -vPanel.add(nameWidget); +widgetVpanel.add(nameWidget); // Add the description HTML descWidget = new HTML(getDescription()); descWidget.setStyleName(DEFAULT_STYLE_NAME + -description); -vPanel.add(descWidget); +
[gwt-contrib] final methods in RemoteServiceServlet
We've been using GWT with Spring/Hibernate/GXT for over a year. Loving every day of it. I would like to start contributing to the project to remove little and big annoyances and to make it better overall. First little annoyance on the list - lots of final and private methods in RemoteServiceServlet, which force us into creating ugly hacks that I'd like to avoid. First, description of the problem. We have a service-oriented architecture where GWT client invokes various services. Services are annotated classes that extend RemoteServiceServlet and are managed by Spring through AOP. One service can invoke another service as well. The first problem was encountered with 1 service invoking the other. RemoteServiceServlet stores HttpRequest in a thread local, and provides method getThreadLocalRequest(). This works well when a client calls the service, but does not work when one service calls another since each service ends up with it's own thread local instance (they share the thread, but not the instance) and the callee has a null request. I don't know why RemoteServiceServlets do not share one thread local. Actually, that would be the cleanest fix IMHO. If that cannot be done, at least we could have overridden getThreadLocalRequest() had it not been declared final. The thread local variable is private instead of protected, so there is absolutely not clean way of fixing this. I am also running into the same problem when trying to use serialization from file upload request, which doesn't go through RemoveServiceServlet.doPost() method. Long story why, but I run into null pointer exception in getSerializationPolicy() because getThreadLocalRequest() returns null. Of course, getSerializationPolicy () is final so I can't fix that either! What is the obsession with private variables and final methods? I saw a lot of posts on in groups where people are trying to extend the functionality and final methods prove to be stumbling blocks. What I would like to see is: 1. Have RemoveServiceServlet share HttpRequest if called from the same thread 2. Make final methods of RemoveServiceServlet non-final to provide flexibility to users I am willing to contribute the changes and discuss ideas of course. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Four quick compiler code reviews -- trunk
On Wed, Mar 4, 2009 at 9:58 AM, BobV b...@google.com wrote: On Tue, Mar 3, 2009 at 2:16 AM, Scott Blum sco...@google.com wrote: SourceGen: all this really does is make it so that when you click on a JsniMethodBody in the debugger, you can see the source. Is SourceGenerationVisitor specified to be able to recreate the original Java input? Also, why keep the comment braces around the toString version? LGTM SourceGenerationVisitor is should accurately recreate Java code, but it's not guaranteed to produce something that can compile, due to certain transformations we apply that sometimes violate what you could write by hand in Java. The comment braces just make it easy to see in the debugger that you're looking at JS code. JMethodBody produces: { foo.makeCall(a); } JsniMethodBody produces: /*-{ foo.makeCall(a); }-*/ JsModVisitor: two peephole optimizations, but the real goal is to enable immutable lists to be traversed, provided you don't actually try to mutate them. Don't you still need to reset ctx.replaced to false? LGTM JsModVisitor.NodeContext.traverse() resets replaced internally on a new traversal. JsSourceInfo: this is just deleting an old file that's no longer needed; JsSourceInfo was superceded by SourceInfoJs. LGTM JsParser: The API on JsParser is kind of abysmal. There's no reason for this to be stateful between calls, so I just turned this into a couple of static methods and updated the call sites. I'm not 100% done with this patch-- I actually want to verify/tweak on this to make sure we can get character-level accurate SourceInfo in the JS AST. But I figured it would be good to review the basic idea first. LGTM, thought what's the call to Context.exit() for? According to the Rhino javadoc, you are supposed to pair up calls to Context.enter() and Context.exit(). It doesn't seem to have ever mattered in practice in the past, but I thought I'd go ahead and fix it as future proofing. Thanks! Scott --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4918 - in trunk: dev/core/src/com/google/gwt/core/linker dev/core/src/com/google/gwt/dev/jjs/imp...
Author: sco...@google.com Date: Wed Mar 4 10:32:11 2009 New Revision: 4918 Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java trunk/user/src/com/google/gwt/core/client/AsyncFragmentLoader.java trunk/user/src/com/google/gwt/core/client/RunAsyncCallback.java Log: Rolling back r4917 to clear the build for a pending 1.6 - trunk merge. Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java == --- trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java (original) +++ trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java Wed Mar 4 10:32:11 2009 @@ -155,18 +155,13 @@ out.newlineOpt(); if (supportRunAsync) { out.print(function __gwtStartLoadingFragment(frag) {); - out.indentIn(); - out.newlineOpt(); - out.print( return $moduleBase + ' + FRAGMENT_SUBDIR - + /' + $strongName + '/' + frag + ' + FRAGMENT_EXTENSION + ';); - out.indentOut(); - out.newlineOpt(); - out.print(};); out.newlineOpt(); - out.print(function __gwtInstallCode(code) {); out.indentIn(); + out.print( var script = document.createElement('script');); out.newlineOpt(); - out.print($wnd.eval(code)); + out.print( script.src = ' + FRAGMENT_SUBDIR + / + strongName + + /' + frag + ' + FRAGMENT_EXTENSION + ';); + out.print( document.getElementsByTagName('head').item(0).appendChild(script);); out.indentOut(); out.newlineOpt(); out.print(};); Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java Wed Mar 4 10:32:11 2009 @@ -180,13 +180,7 @@ srcWriter.println(}); srcWriter.println(if (!loading) {); srcWriter.println(loading = true;); -srcWriter.println(AsyncFragmentLoader.inject( + entryNumber + ,); -srcWriter.println( new AsyncFragmentLoader.LoadErrorHandler() {); -srcWriter.println(public void loadFailed(Throwable reason) {); -srcWriter.println( loading = false;); -srcWriter.println( runCallbackOnFailures(reason);); -srcWriter.println(}); -srcWriter.println( });); +srcWriter.println(AsyncFragmentLoader.inject( + entryNumber + );); srcWriter.println(}); srcWriter.println(}); } Modified: trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java == --- trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java (original) +++ trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java Wed Mar 4 10:32:11 2009 @@ -120,21 +120,6 @@ private HTML styleWidget = null; /** - * Whether the demo widget has been initialized. - */ - private boolean widgetInitialized; - - /** - * Whether the demo widget is (asynchronously) initializing. - */ - private boolean widgetInitializing; - - /** - * A vertical panel that holds the demo widget once it is initialized. - */ - private VerticalPanel widgetVpanel; - - /** * Constructor. * * @param constants the constants @@ -156,12 +141,6 @@ deckPanel.add(w); } - @Override - public void ensureWidget() { -super.ensureWidget(); -ensureWidgetInitialized(widgetVpanel); - } - /** * Get the description of this example. * @@ -276,7 +255,6 @@ * Initialize this widget by creating the elements that should be added to the * page. */ - @Override protected final Widget createWidget() { deckPanel = new DeckPanel(); @@ -286,18 +264,18 @@ tabBar.addSelectionHandler(this); // Create a container for the main example -widgetVpanel = new VerticalPanel(); -add(widgetVpanel, constants.contentWidgetExample()); +final VerticalPanel vPanel = new VerticalPanel(); +add(vPanel, constants.contentWidgetExample()); // Add the name HTML nameWidget = new HTML(getName()); nameWidget.setStyleName(DEFAULT_STYLE_NAME + -name); -widgetVpanel.add(nameWidget); +vPanel.add(nameWidget); // Add the description HTML descWidget = new HTML(getDescription()); descWidget.setStyleName(DEFAULT_STYLE_NAME + -description); -widgetVpanel.add(descWidget); +vPanel.add(descWidget); // Add source code tab if (hasSource()) { @@ -314,6 +292,22 @@ add(styleWidget,
[gwt-contrib] [google-web-toolkit commit] r4920 - releases/1.6
Author: sco...@google.com Date: Wed Mar 4 10:55:58 2009 New Revision: 4920 Modified: releases/1.6/branch-info.txt Log: Recording 1.6 - trunk merge. Modified: releases/1.6/branch-info.txt == --- releases/1.6/branch-info.txt(original) +++ releases/1.6/branch-info.txtWed Mar 4 10:55:58 2009 @@ -35,8 +35,11 @@ /releases/1.6/@r4658:4669 was merged (r4670) into trunk /tr...@c4873 was merged (r4878) into /releases/1.6 /trunk revision c4889 was merged (r4892) into this branch +/releases/1.6/@r4669:4694 was merged (r4919) into trunk +/releases/1.6/@r4695:4874 was merged (r4919) into trunk, skipping c4695 (1.6-only change) +/releases/1.6/@r4875:4877 was merged (r4919) into trunk, skipping c4875 (different trunk change) +/releases/1.6/@r4878:4891 was merged (r4919) into trunk, skipping c4878 (cherry picked above) +/releases/1.6/@r4892:4911 was merged (r4919) into trunk, skipping c4892 (cherry picked above) The next merge into trunk will be: -svn merge -r4669:4694 https://google-web-toolkit.googlecode.com/svn/releases/1.6 . -svn merge -r4695:4877 https://google-web-toolkit.googlecode.com/svn/releases/1.6 . -svn merge -r4878: https://google-web-toolkit.googlecode.com/svn/releases/1.6 . +svn merge -r4911: https://google-web-toolkit.googlecode.com/svn/releases/1.6 . --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4921 - in releases/1.6/user: src/com/google/gwt/dom/client test/com/google/gwt/dom/client
Author: jlaba...@google.com Date: Wed Mar 4 11:23:10 2009 New Revision: 4921 Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.java releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java releases/1.6/user/src/com/google/gwt/dom/client/Element.java releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java Log: In IE, Element.getAttribute(String) natively tries to get the property of the same name first, which results in an JS exception if the property return value if not of type String (ex. offsetWidth). This patch uses a deferred binding for IE to coerce the return value into a string. Patch by: jlabanca Review by: jgw Issue: 3238 Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.java == --- releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.javaWed Mar 4 11:23:10 2009 @@ -160,6 +160,10 @@ return top; }-*/; + public native String getAttribute(Element elem, String name) /*-{ +return elem.getAttribute(name) || ''; + }-*/; + public native int getBodyOffsetLeft() /*-{ return 0; }-*/; Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java == --- releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java Wed Mar 4 11:23:10 2009 @@ -160,6 +160,17 @@ } }-*/; + /** + * IE returns a numeric type for some attributes that are really properties, + * such as offsetWidth. We need to coerce these to strings to prevent a + * runtime JS exception. + */ + @Override + public native String getAttribute(Element elem, String name) /*-{ +var attr = elem.getAttribute(name); +return attr == null? '' : attr + ''; + }-*/; + @Override public native int getBodyOffsetLeft() /*-{ return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.clientLeft; Modified: releases/1.6/user/src/com/google/gwt/dom/client/Element.java == --- releases/1.6/user/src/com/google/gwt/dom/client/Element.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/Element.javaWed Mar 4 11:23:10 2009 @@ -66,15 +66,18 @@ } /** - * Retrieves an attribute value by name. + * Retrieves an attribute value by name. Attribute support can be + * inconsistent across various browsers. Consider using the accessors in + * {...@link Element} and its specific subclasses to retrieve attributes and + * properties. * * @param name The name of the attribute to retrieve * @return The Attr value as a string, or the empty string if that attribute * does not have a specified or default value */ - public final native String getAttribute(String name) /*-{ - return this.getAttribute(name) || ''; - }-*/; + public final String getAttribute(String name) { +return DOMImpl.impl.getAttribute(this, name); + } /** * The class attribute of the element. This attribute has been renamed due to Modified: releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java == --- releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java (original) +++ releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java Wed Mar 4 11:23:10 2009 @@ -31,7 +31,7 @@ } /** - * [get|set|remove]Attribute + * [get|set|remove]Attribute. */ public void testElementAttribute() { DivElement div = Document.get().createDivElement(); @@ -44,7 +44,21 @@ } /** - * getAbsolute[Left|Top] + * Ensure that the return type of an attribute is always a string. IE should + * not return a numeric attribute based on the element property. See issue + * 3238. + */ + public void testElementAttributeNumeric() { +DivElement div = Document.get().createDivElement(); +Document.get().getBody().appendChild(div); +div.setInnerText(Hello World); +div.getAttribute(offsetWidth).length(); +div.getAttribute(offsetWidth).trim().length(); +Document.get().getBody().removeChild(div); + } + + /** + * getAbsolute[Left|Top]. */ public void testGetAbsolutePosition() { final int border = 8; @@ -77,7 +91,7 @@ } /** - * scroll[Left|Top], scrollIntoView + * scroll[Left|Top], scrollIntoView. */ public void testGetAbsolutePositionWhenScrolled() { final DivElement outer = Document.get().createDivElement(); @@ -111,7 +125,7 @@ } /** - * getParentElement + * getParentElement. */ public void testGetParent() {
[gwt-contrib] [google-web-toolkit commit] r4922 - in releases/1.6: doc user/src/com/google/gwt/debug/client user/src/com/google/gwt/user/cl...
Author: br...@google.com Date: Wed Mar 4 13:11:07 2009 New Revision: 4922 Modified: releases/1.6/doc/build.xml releases/1.6/user/src/com/google/gwt/debug/client/DebugInfo.java releases/1.6/user/src/com/google/gwt/user/client/ui/UIObject.java releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTest.java Log: Hopefully this change will break the build, because it contains a breaking API change; I want to see if the API checker catches it. See #3 below. A round of changes related to com.google.gwt.debug.Debug and associated classes, primarly: 1) Cleaning up the doc for com.google.gwt.debug.client and its classes 2) Removing com.google.gwt.debug.client from the javadoc build because UIObject.ensureDebugID() is not actually using it; this makes DebugInfo seem very out of place, and so it's better not to javadoc it until we clean up how it's used (see issue 3449). 3) BREAKING CHANGE: made the various deferred binding nested impl classes to support the debug info switch off private instead of public (they shouldn't have been public to begin with) 4) Added a test case for testing that DebugInfo does the right thing when the client property gwt.enableDebugId is set to false; we were only testing the true case before Review by: jgw (desk) Modified: releases/1.6/doc/build.xml == --- releases/1.6/doc/build.xml (original) +++ releases/1.6/doc/build.xml Wed Mar 4 13:11:07 2009 @@ -10,7 +10,7 @@ property.ensure name=gwt.dev.jar location=${gwt.build.lib}/gwt-dev-linux.jar / property name=USER_PKGS - value=com.google.gwt.animation.client;com.google.gwt.benchmarks.client;com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.debug.client;com.google.gwt.dom.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.http.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.datepicker.client;com.google.gwt.user.server.rpc;com.google.gwt.xml.client / + value=com.google.gwt.animation.client;com.google.gwt.benchmarks.client;com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.dom.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.http.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.datepicker.client;com.google.gwt.user.server.rpc;com.google.gwt.xml.client / property name=LANG_PKGS value=java.lang;java.lang.annotation;java.util;java.io;java.sql / Modified: releases/1.6/user/src/com/google/gwt/debug/client/DebugInfo.java == --- releases/1.6/user/src/com/google/gwt/debug/client/DebugInfo.java (original) +++ releases/1.6/user/src/com/google/gwt/debug/client/DebugInfo.javaWed Mar 4 13:11:07 2009 @@ -18,13 +18,15 @@ import com.google.gwt.core.client.GWT; /** - * This class provides a set of static methods related to Debugging. + * Provides low-level functionality to support the creation of testing and diagnostic frameworks. + * + * @see com.google.gwt.user.client.ui.UIObject#ensureDebugId(String) */ public class DebugInfo { /** * Implementation class for {...@link DebugInfo}. */ - public static class DebugInfoImpl { + private static class DebugInfoImpl { public boolean isDebugIdEnabled() { return false; } @@ -33,7 +35,8 @@ /** * Implementation class for {...@link DebugInfo} used when debug IDs are enabled. */ - public static class DebugInfoImplEnabled extends DebugInfoImpl { + @SuppressWarnings(unused) + private static class DebugInfoImplEnabled extends DebugInfoImpl { @Override public boolean isDebugIdEnabled() { return true; Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/UIObject.java == --- releases/1.6/user/src/com/google/gwt/user/client/ui/UIObject.java (original) +++ releases/1.6/user/src/com/google/gwt/user/client/ui/UIObject.java Wed Mar 4 13:11:07 2009 @@ -97,7 +97,7 @@ * The implementation of the set debug id method, which does nothing by * default. */ - public static class DebugIdImpl { + private static class DebugIdImpl { @SuppressWarnings(unused) //
[gwt-contrib] [google-web-toolkit commit] r4923 - in releases/1.6/user: src/com/google/gwt/debug/client test/com/google/gwt/debug/client te...
Author: br...@google.com Date: Wed Mar 4 13:18:20 2009 New Revision: 4923 Added: releases/1.6/user/src/com/google/gwt/debug/client/package-info.java releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTestDisabled.java releases/1.6/user/test/com/google/gwt/user/DebugTestDisabled.gwt.xml Log: This is should be considered atomic with r4922; I had a weird error with my OS X svn GUI client (the adds didn't get included). Added: releases/1.6/user/src/com/google/gwt/debug/client/package-info.java == --- (empty file) +++ releases/1.6/user/src/com/google/gwt/debug/client/package-info.java Wed Mar 4 13:18:20 2009 @@ -0,0 +1,49 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +/** + * Provides low-level functionality to support the creation of testing and + * diagnostic frameworks. + * + * p + * To use the functionality in this package, your GWT module should inherit the + * module codecom.google.gwt.debug.Debug/code. The codeDebug/code + * module introduces the client property codegwt.enableDebugId/code, + * which controls whether or not this debug code is enabled (and therefore + * included in the final compiled result). It is set to codetrue/code by + * default, but a module being compiled for production would very likely want to + * set it to codefalse/code to avoid unnecessary extra code in the final + * compiled output. + * + * h3Example/h3 + * A module using this package might look like the following: + * + * pre + * lt;module + * lt;inherits name='com.google.gwt.user.User'/ + * + * lt;!-- Inheriting 'Debug' on the next line makes the features available. -- + * lt;inherits name='com.google.gwt.debug.Debug'/ + * + * lt;!-- Disable for production by uncommenting the next line -- + * lt;!-- lt;set-property name=gwt.enableDebugId value=false/ -- + * + * lt;entry-point class='your-entry-point-class'/ + * lt;/module + * /pre + */ +package com.google.gwt.debug.client; + Added: releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTestDisabled.java == --- (empty file) +++ releases/1.6/user/test/com/google/gwt/debug/client/DebugInfoTestDisabled.java Wed Mar 4 13:18:20 2009 @@ -0,0 +1,36 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.debug.client; + +import com.google.gwt.junit.client.GWTTestCase; + +/** + * Test Case for {...@link DebugInfo} when codegwt.enableDebugId/code is disabled. + */ +public class DebugInfoTestDisabled extends GWTTestCase { + + @Override + public String getModuleName() { +return com.google.gwt.user.DebugTestDisabled; + } + + /** + * Test that the {...@link DebugInfo#isDebugIdEnabled()} method works correctly when debug ids are disabled. + */ + public void testIsDebugIdDisabled() { +assertFalse(DebugInfo.isDebugIdEnabled()); + } +} Added: releases/1.6/user/test/com/google/gwt/user/DebugTestDisabled.gwt.xml == --- (empty file) +++ releases/1.6/user/test/com/google/gwt/user/DebugTestDisabled.gwt.xml Wed Mar 4 13:18:20 2009 @@ -0,0 +1,19 @@ +!-- -- +!-- Copyright 2008 Google Inc. -- +!-- Licensed under the Apache License, Version 2.0 (the License); you-- +!-- may not use this file except in compliance with the License. You may -- +!-- may obtain a copy of the License at-- +!-- -- +!-- http://www.apache.org/licenses/LICENSE-2.0 -- +!--
[gwt-contrib] [google-web-toolkit commit] r4924 - branches/snapshot-2009.03.03
Author: rj...@google.com Date: Wed Mar 4 13:41:01 2009 New Revision: 4924 Added: branches/snapshot-2009.03.03/ - copied from r4913, /trunk/ Log: Creates snapshot-2009.03.03 from tr...@4913 via svn copy https://google-web-toolkit.googlecode.com/svn/trunk -r4913 https://google-web-toolkit.googlecode.com/svn/branches/snapshot-2009.03.03 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4926 - releases/1.6/user/src/com/google/gwt/user/client/ui
Author: br...@google.com Date: Wed Mar 4 13:57:08 2009 New Revision: 4926 Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.java Log: Closes '}' on @link tag in javadoc; had been causing a javadoc build warning. Review: none (doc) Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.java == --- releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.java (original) +++ releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.javaWed Mar 4 13:57:08 2009 @@ -312,7 +312,7 @@ * fail on Internet Explorer 6.0./em * * @param multiple codetrue/code to allow multiple selections - * @deprecated use {...@link #ListBox(boolean) instead + * @deprecated use {...@link #ListBox(boolean)} instead */ @Deprecated public void setMultipleSelect(boolean multiple) { --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---