Re: Optimisation of obfuscated mode
On May 6, 10:18 am, X a.revolution.ultra.b...@gmail.com wrote: public interface Bax{ public String getValue();} public class Bar implements Bax{ String size; public String getValue(){return size;} } public class Foo implements Ba... OH WAIT!! You have one class returning String, and another returning int. I know what you are saying, but given the fact that all of the Javascript is regenerated on every compile, and that dynamic classloading is not available in GWT, there is no reason why the compiler itself can't share these functions. What you are saying is that if the circumstances where changed somehow, the optimisation won't work anymore. Well, if that happens, the GWT compiler wouldn't generate the optimisation anymore. If dynamic classloading was supported, this wouldn't work of course, but dynamic classloading was not included in GWT for exactly this reason; to give the compiler better ability to do optimisations. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MultiWordSuggest Help
I have a suggestbox with MultiWordSuggestOracle. I need to type in name which is firstName + +lastname and when user selects a item, i want the replaced text to be the id of the user. I am not sure how to implement this. Thank you all for your help --~--~-~--~~~---~--~~ 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 I write my own version of DialogBox?
Thanks for the help guys, I'm keeping this as a referance for future use, allthough Ian found a very neat solution to my specific problem. (Using an absolute panel, displacing the button upwards above its container, and changing the css to overflow visible...thus getting a close button for the dialog box linked to the content, yet looking like its in the header). This is naturaly better then rewritting the whole class. Cheers, Thomas On May 6, 3:36 am, X a.revolution.ultra.b...@gmail.com wrote: Aye. Use replace-with class=com.google.gwt.user.client.ui.YourCrAZyClassName when-type-is class=com.google.gwt.user.client.ui.DecoratedPopupPanel / /replace-with ...If you're willing to rewrite enough classes, you can even compile out HashMaps and Tables... And file sizes will love you... -- He whose desires are drawn toward knowledge in every form will be absorbed in the pleasures of the soul, and will hardly feel bodily pleasure --I mean, if he be a true philosopher and not a sham one. - Plato Wise Words Woven With Will Wakes Worlds - Alyxandor Artistocles --~--~-~--~~~---~--~~ 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: best practices for gwt + jee
Thanks for your input. Although by drag'n'drop style designer I meant a WYSIWYG editor. I know about the Instantiations GWT designer plugin for eclipse, is it any good? Can it work with the GWT eclipse plugin? Are there any alternatives? On Tue, May 5, 2009 at 9:52 PM, Jim jim.p...@gmail.com wrote: You can use 1. Eclipse (3.4.2), 2. Tomcat 6, 3. Google GWT Eclipse Plugin and 4. http://code.google.com/p/gwt-dnd/. Jim http://www.gwtorm.com/mail/Mail.html for GWT Mail Example. http://code.google.com/p/dreamsource-orm/downloads/list On May 5, 3:07 pm, Pecc valyi.p...@gmail.com wrote: Hello everyone, I'm quite new to GWT and JEE, so I'm looking for some general help. What are the best softwares and methods for developing a jee application with GWT? What should i choose as IDE, app server, plugins so that they work together well, and are easy to use? Are there any drag'n'drop style designers for making the GUI? What else do i need? Thx for any advice. Best Regards Peter Valyi -- -Pecc --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
fail to deploy RPC with tomcat using gwt1.6.4
hi, I try to deploy the gwt's sample DynaTable to tomcat ,web pages display but the RPC call can't finish ,showing message please waitI read the document about deploy rpc to tomcat and follow the guidance,but still don't work.I'm sure that the rpc call has invoked, serve side receives the call and respones for some data is printed on the tomcat console window.The data is same as the data showed when I run the project in hosted mode . In web.xml, url-pattern/dynatable/calendar/url-pattern; in the code , target.setServiceEntryPoint(moduleRelativeURL); -- moduleRelativeURL's value is http://localhost:/DynaTable/dynatable/calendar. in the DynaTable.gwt.xml, module rename-to=dynatable inherits name='com.google.gwt.user.User' / entry-point class='com.google.gwt.sample.dynatable.client.DynaTable' / servlet path='/calendar' class='com.google.gwt.sample.dynatable.server.SchoolCalendarServiceImpl'/ /module. last, I use jdk1.5.0_07,tomcat6.0,gwt1.6.4. I didn't revise the sample and used ant to build the .war file. Thank you all for your help . --~--~-~--~~~---~--~~ 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: HandlerRegistration not always so friendly ??
I don't really understand you Stack proposal is the HandlerManager is already a map to hold different type of listeners and like Thomas explained above you can influence the source. The Concurrent access exception I already solved as I had my own Listener Collection base that all listener collection extended. They control did and did already the necessary queueing like now implemented in the HandlerManager. Or just throw an exception when concurrent access toke place, or the maximum number of listeners exceeded, or a listener already existed, etc Many little things that make it very easy to find bugs... My actual Collection listener implementations where almost empty and just a subclass with some generic specification... that's it, nothing BIG like you mentioned. I understand that the GWT don't want to create a lock-in situation and hide the creation of the HandlerManager such that can easily change this behavior in the future... But is this really an advantage and the correct way ??.. Why not just let this open and still change this behavior ??... I/We have to make changes anyway.. In my case: Option 1: produce many code to code around the situation that my own HandlerManager can't be injected as explained in: http://code.google.com/p/google-web-toolkit/issues/detail?id=3628q=HandlerManager Option 2: My own HandlerManager can be injected which saved my the bunch of code from option 1. Either way: if the gwt team decides to change this HandlerManager behavior, I have to deal with these changes anyway and in option 2, this takes less time and result in less code modifications. So what's the difference?? The same kind of coding around I see in other gwt frameworks like gxt... (they have to change/changed a lot to support 1.6)... So please, help me understand why the gwt dev team make these things hidden for gwt developers??... As I don't see any advantage of hiding these kind of implementation details. I am talking about implementation details in general as there are more of these situations (can be found in this or the contributor forum, like primitive intercaces...) and it sometimes very frustrating when you want to implement complex functionality that is so simple in swt and swing and not in gwt as they still choose to hide these kind of details :(... (not because it's not possible) My experience and advice: please just make GWT more open and extentable.. ... ? -- Ed --~--~-~--~~~---~--~~ 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: Trying to use server in another module
I have been making changes to the XML files and now it doesn't work again. I think I left them like they were, but now when trying to debug in a JBoss server I get the following error: java.net.factoryurlclassloa...@4e33e7 x.gwtlogin.server.GwtLoginServiceImpl java.lang.ClassNotFoundException: x.gwtlogin.server.GwtLoginServiceImpl ... This actually makes more sense than the previous behaviour, GwtLoginServiceImpl is not in the project. On 8 abr, 18:52, Ivan M supertra...@gmail.com wrote: Sorry, too fast. I made it work including x.gwtlogin in x.dt as a module with no entry point. I didn't need to copy theserverclasses, so I have a singleserveras I wanted. On 8 abr, 17:28, Ivan M supertra...@gmail.com wrote: Hello all, I'm facing my first GWT development. I had the idea of developing a projectwith a module which I have called x.gwtlogin. Theserverof this module can perform queries on a LDAPserver. My idea is to have an instance of this module running in the applicationserverand use itsserverfrom any other GWT application I develop. Let's say one of these applications is x.dt. I have copied all x.gwtlogin.client classes that implement theserver'sinterfance in this application, so now I have two client packages in theproject: x.dt.client x.gwtlogin.client The problem is that when debugging in hosted mode wherever I try to use a x.gwtlogin.client.Class in a x.dt.client.Class, I get the following error: [ERROR] Line 20: No source code is available for type x.gwtlogin.client.Class; did you forget to inherit a required module? I suppose the problem is that GWT is not compiling and including the classes in x.gwtlogin.client when building x.dt.client. What can I do?. Is what I intend to do possible at all?. Thank you, Ivan- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
RPC callback problem
Hello, I have a problem with the callback of a RPC call. I have post in appengine forum because i think it was a problem with the appengine datastore, but Max Ross suggests me to post here : http://groups.google.com/group/google-appengine-java/browse_thread/thread/75803bf6ae4eaeb7 In order to summarize : I have two classes AudioFile and Genre. AudioFile as a field of type Genre. Both are marked as detachable like Max says me. I add an AudioFile in the datastore and then i do a RPC call in the client side in order to retrieve the data : this.gtunesService.getAudioFiles(new AsyncCallbackListAudioFile() { public void onFailure(Throwable caught) { SC.say(Gtunes.SERVER_ERROR); } public void onSuccess(ListAudioFile result) { Gtunes.this.audioFiles = result; String buf = ; for (AudioFile af : Gtunes.this.audioFiles) { buf += genre = + af.getGenre ().getName() + - + af.getName() + br /; } SC.say(buf); } }); The problem is in the server side with the following code : public ListAudioFile getAudioFiles() { ListAudioFile audioFiles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(AudioFile.class); q.setOrdering(name); audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute ()); pm.detachCopyAll(audioFiles); } finally { pm.close(); } System.out.println(list = + audioFiles); for (AudioFile audioFile : audioFiles) { System.out.println(name = + audioFile.getName() + \n); } return audioFiles; } audioFiles contains my data. But the return has a problem because i enter in the onFailure in the client side but without any error. However, i see that if i change the line : audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute()); for : audioFiles = (ListAudioFile) q.execute(); I have get the following error : 5 mai 2009 22:23:23 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241555003875000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze (ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object (AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeValue (ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java: 573) at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess (RPC.java:441) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:529) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 713) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle
Module works fine in Firefox or Safari but doesn't load in Internet Explorer
Hello, My module load perfectly in Firefox or Safari but not in Internet Explorer 7. Since I don't have any errors in my module in the firefox console errors, I don't really know what to do... Have you ever seen this? Ask if you need some .gwt.xml or any others informations. --~--~-~--~~~---~--~~ 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: Module works fine in Firefox or Safari but doesn't load in Internet Explorer
update : IE says that there's some errors in my javascript code (a variable is null). How can I know what's wrong in my java code? On 6 mai, 09:45, jeremyprioux jeremypri...@gmail.com wrote: Hello, My module load perfectly in Firefox or Safari but not in Internet Explorer 7. Since I don't have any errors in my module in the firefox console errors, I don't really know what to do... Have you ever seen this? Ask if you need some .gwt.xml or any others informations. --~--~-~--~~~---~--~~ 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: HandlerRegistration not always so friendly ??
He Thomas, Your suggestion about Widget::fireEvent(GwtEvent?) and Widget::delegateEvent(Widget,GwtEvent?) doesn't really work I think, as you that means that the listeners have to be registered on the specified widget. It's merely a forward of the event to the listeners of the specified widget. But that's not what I want. I just want to adjust the source of the handler manager of widget X to another widget. If I do it the way you suggest it means I also have to move the listeners to the other source widget as they are otherwise not informed... (the handler manager isn't a static property in Widget). -- Ed --~--~-~--~~~---~--~~ 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: RPC callback problem
Your onFailure method ignores the Throwable it's given. Maybe it contains something useful? Ouaibou wrote: Hello, I have a problem with the callback of a RPC call. I have post in appengine forum because i think it was a problem with the appengine datastore, but Max Ross suggests me to post here : http://groups.google.com/group/google-appengine-java/browse_thread/thread/75803bf6ae4eaeb7 In order to summarize : I have two classes AudioFile and Genre. AudioFile as a field of type Genre. Both are marked as detachable like Max says me. I add an AudioFile in the datastore and then i do a RPC call in the client side in order to retrieve the data : this.gtunesService.getAudioFiles(new AsyncCallbackListAudioFile() { public void onFailure(Throwable caught) { SC.say(Gtunes.SERVER_ERROR); } public void onSuccess(ListAudioFile result) { Gtunes.this.audioFiles = result; String buf = ; for (AudioFile af : Gtunes.this.audioFiles) { buf += genre = + af.getGenre ().getName() + - + af.getName() + br /; } SC.say(buf); } }); The problem is in the server side with the following code : public ListAudioFile getAudioFiles() { ListAudioFile audioFiles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(AudioFile.class); q.setOrdering(name); audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute ()); pm.detachCopyAll(audioFiles); } finally { pm.close(); } System.out.println(list = + audioFiles); for (AudioFile audioFile : audioFiles) { System.out.println(name = + audioFile.getName() + \n); } return audioFiles; } audioFiles contains my data. But the return has a problem because i enter in the onFailure in the client side but without any error. However, i see that if i change the line : audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute()); for : audioFiles = (ListAudioFile) q.execute(); I have get the following error : 5 mai 2009 22:23:23 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241555003875000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze (ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object (AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeValue (ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java: 573) at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess (RPC.java:441) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:529) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 713) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 806) at org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at
GWT1.6 and annotations
Hello people. I am developing with 1.5/eclipse/cypal-plugin, with some custom annotations and all goes fine. But fails with gwt1.6 and the google plugin. Simple test case. In eclipse create a new gwt project, let's call it just 'g' Create annotation: package g.client; import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Foo { public String bar() default bar; } Create class using annotation: package g.client; import java.io.Serializable; public class Thing implements Serializable { @Foo(bar = ok) public double id; public Thing() { id = 25; } public double getId() { return id; } } GWT compile project output: Compiling module g.G Refreshing module from source Refreshing TypeOracle Processing types in compilation unit: file:/home/mati/eclipse/g/src/g/client/Thing.java Found type 'Thing' Resolving annotation '@Foo(bar = ok)' [ERROR] java.lang.ClassNotFoundException: g.client.Foo at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at com.google.gwt.dev.javac.TypeOracleMediator.getClassLiteral(TypeOracleMediator.java:763) at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotation(TypeOracleMediator.java:831) at com.google.gwt.dev.javac.TypeOracleMediator.resolveAnnotations(TypeOracleMediator.java:857) at com.google.gwt.dev.javac.TypeOracleMediator.resolveField(TypeOracleMediator.java:899) at com.google.gwt.dev.javac.TypeOracleMediator.resolveFields(TypeOracleMediator.java:943) at com.google.gwt.dev.javac.TypeOracleMediator.resolveTypeDeclaration(TypeOracleMediator.java:1428) at com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits(TypeOracleMediator.java:389) at com.google.gwt.dev.javac.TypeOracleMediator.refresh(TypeOracleMediator.java:417) at com.google.gwt.dev.javac.CompilationState.refresh(CompilationState.java:179) at com.google.gwt.dev.javac.CompilationState.init(CompilationState.java:93) at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:264) at com.google.gwt.dev.Precompile.precompile(Precompile.java:283) at com.google.gwt.dev.Compiler.run(Compiler.java:170) at com.google.gwt.dev.Compiler$1.run(Compiler.java:124) at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:84) at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:78) at com.google.gwt.dev.Compiler.main(Compiler.java:131) Compiling 5 permutations Permutation compile succeeded Linking into war Link succeeded Compilation succeeded -- 19,961s Should I just ignore the error? --~--~-~--~~~---~--~~ 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: Simple RPC Issue
http://groups.google.com/group/Google-Web-Toolkit/msg/1e8c310b4002e72a On May 6, 6:47 am, Omer Shakil omer.sha...@gmail.com wrote: @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Group implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true) private String encodedKey; @Persistent private String name; @Persistent private ListMembership members; } @RemoteServiceRelativePath(service) public interface Service extends RemoteService { Group createGroup(final String name); } I get this exception when I call createGroup, what am I missing? com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241583692799000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.sco.backed.ArrayList' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83) --~--~-~--~~~---~--~~ 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: Module works fine in Firefox or Safari but doesn't load in Internet Explorer
What OS are you using ? Is the hosted mode working fine ? From the scarce information you gave, it looks like a null pointer exception in your code but all I can do is guess with that much information. How can I know what's wrong in my java code? Normally that's what HostedMode debugging is for. But if you really can't identify the problem in hosted mode, the you could try compiling in PRETTY or DETAILED style and then IE will at least tell you a more meaningful name for the null variable. Hope that helps; Salvador On May 6, 10:49 am, jeremyprioux jeremypri...@gmail.com wrote: update : IE says that there's some errors in my javascript code (a How can I know what's wrong in my java code? On 6 mai, 09:45, jeremyprioux jeremypri...@gmail.com wrote: Hello, My module load perfectly in Firefox or Safari but not in Internet Explorer 7. Since I don't have any errors in my module in the firefox console errors, I don't really know what to do... Have you ever seen this? Ask if you need some .gwt.xml or any others informations. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Clearing all PopupPanels with one command (Not root panel)
Hi guys, I have an interesting issue. I am trying to do a command similar to clear screen. Where from the main entry point I pretty much create every widget in the app on several levels into a single panel main. When it comes to clearing the screen it is simple to call main.clear() However, PopupPanels seem to be owned by the RootPanel and remain onscreen. Calling RootPanel.get().clear() isnt desirable as that rids the screen of the main element. Unless there is a way to reinstantiate the main element from an inner element by calling a method in the entrypoint but i dont think that seems to be possible. Is there any solutions to clear all PopupPanels short of passing references of these panels up and and down N levels deep to the main panel to manually call hide() on? As this way seems really inefficient. Cheers, Matt --~--~-~--~~~---~--~~ 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: RPC callback problem
Oops it right, if i print the caught says : This application is out of date, please click the refresh button on your browser. com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived (RequestCallbackAdapter.java:204) com.google.gwt.http.client.Request.fireOnResponseReceivedImpl (Request.java:264) com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch (Request.java:236) com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java: 227) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.mac.MethodDispatch.invoke(MethodDispatch.java: 71) org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method) org.eclipse.swt.widgets.Display.sleep(Display.java:3801) com.google.gwt.dev.SwtHostedModeBase.sleep(SwtHostedModeBase.java:241) com.google.gwt.dev.SwtHostedModeBase.processEvents (SwtHostedModeBase.java:236) com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java: 558) com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405) com.google.gwt.dev.HostedMode.main(HostedMode.java:232) It's strange. What can i do ? Thanks for your help. On 6 mai, 11:01, Paul Robinson ukcue...@gmail.com wrote: Your onFailure method ignores the Throwable it's given. Maybe it contains something useful? Ouaibou wrote: Hello, I have a problem with the callback of a RPC call. I have post in appengine forum because i think it was a problem with the appengine datastore, but Max Ross suggests me to post here : http://groups.google.com/group/google-appengine-java/browse_thread/th... In order to summarize : I have two classes AudioFile and Genre. AudioFile as a field of type Genre. Both are marked as detachable like Max says me. I add an AudioFile in the datastore and then i do a RPC call in the client side in order to retrieve the data : this.gtunesService.getAudioFiles(new AsyncCallbackListAudioFile() { public void onFailure(Throwable caught) { SC.say(Gtunes.SERVER_ERROR); } public void onSuccess(ListAudioFile result) { Gtunes.this.audioFiles = result; String buf = ; for (AudioFile af : Gtunes.this.audioFiles) { buf += genre = + af.getGenre ().getName() + - + af.getName() + br /; } SC.say(buf); } }); The problem is in the server side with the following code : public ListAudioFile getAudioFiles() { ListAudioFile audioFiles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(AudioFile.class); q.setOrdering(name); audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute ()); pm.detachCopyAll(audioFiles); } finally { pm.close(); } System.out.println(list = + audioFiles); for (AudioFile audioFile : audioFiles) { System.out.println(name = + audioFile.getName() + \n); } return audioFiles; } audioFiles contains my data. But the return has a problem because i enter in the onFailure in the client side but without any error. However, i see that if i change the line : audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute()); for : audioFiles = (ListAudioFile) q.execute(); I have get the following error : 5 mai 2009 22:23:23 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241555003875000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze (ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write
Re: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
I met same exception before, please check this link below, hope it help. http://groups.google.com/group/google-appengine-java/browse_thread/thread/703b52768b10c049 --~--~-~--~~~---~--~~ 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: Module works fine in Firefox or Safari but doesn't load in Internet Explorer
Everything was fine with the hosted mode. Using pretty and detailed compilation helps me to see that was something wrong with history handling in IE. Then I realized that I had forgotten the html code : iframe src=javascript:'' id=__gwt_historyFrame tabIndex='-1' style=position:absolute;width:0;height:0;border:0/iframe Quite strange that it worked in FF and Safari, no? Thanks for your help ! On 6 mai, 10:23, Salvador Diaz diaz.salva...@gmail.com wrote: What OS are you using ? Is the hosted mode working fine ? From the scarce information you gave, it looks like a null pointer exception in your code but all I can do is guess with that much information. How can I know what's wrong in my java code? Normally that's what HostedMode debugging is for. But if you really can't identify the problem in hosted mode, the you could try compiling in PRETTY or DETAILED style and then IE will at least tell you a more meaningful name for the null variable. Hope that helps; Salvador On May 6, 10:49 am, jeremyprioux jeremypri...@gmail.com wrote: update : IE says that there's some errors in my javascript code (a How can I know what's wrong in my java code? On 6 mai, 09:45, jeremyprioux jeremypri...@gmail.com wrote: Hello, My module load perfectly in Firefox or Safari but not in Internet Explorer 7. Since I don't have any errors in my module in the firefox console errors, I don't really know what to do... Have you ever seen this? Ask if you need some .gwt.xml or any others informations. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
GWT1.6.4: anybody facing problems with DecoratedStackPanel.setHeight() ?
Hello, I am using a DecoratedStackPanel in my application. If I call DecoratedStackPanel.setHeight() when the window is resized, the DecoratedStackPanel becomes too big. The values I am passing are correct. It seems like it is setting the size of the widget that is added to the DecoratedStackPanel, and not the size of the DecoratedStackPanel itself. Anybody facing the same problem? Cheers Tom --~--~-~--~~~---~--~~ 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: RPC callback problem
Okay, thanks Salvador, I will see that :o) On 6 mai, 11:17, Salvador Diaz diaz.salva...@gmail.com wrote: Everybody seems to be missing this since app engine for java was released. Try reading the GWT Developer Guide guys, you'll find all kinds of interesting and useful stuff. Anyway, the problem is that you can't use any org.datanucleus.store.appengine.* classes in your client-side code. You have to use the DTO pattern. Here's one of the discussions related to this topic from a couple of days ago:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... You could also try searching the forum, that'd keep us from answering the same question for the n-th time. Hope that helps; Salvador PS: The relevant part of the developer documentation discussing this is here:http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#D... On May 6, 11:01 am, Paul Robinson ukcue...@gmail.com wrote: Your onFailure method ignores the Throwable it's given. Maybe it contains something useful? Ouaibou wrote: Hello, I have a problem with the callback of a RPC call. I have post in appengine forum because i think it was a problem with the appengine datastore, but Max Ross suggests me to post here : http://groups.google.com/group/google-appengine-java/browse_thread/th... In order to summarize : I have two classes AudioFile and Genre. AudioFile as a field of type Genre. Both are marked as detachable like Max says me. I add an AudioFile in the datastore and then i do a RPC call in the client side in order to retrieve the data : this.gtunesService.getAudioFiles(new AsyncCallbackListAudioFile() { public void onFailure(Throwable caught) { SC.say(Gtunes.SERVER_ERROR); } public void onSuccess(ListAudioFile result) { Gtunes.this.audioFiles = result; String buf = ; for (AudioFile af : Gtunes.this.audioFiles) { buf += genre = + af.getGenre ().getName() + - + af.getName() + br /; } SC.say(buf); } }); The problem is in the server side with the following code : public ListAudioFile getAudioFiles() { ListAudioFile audioFiles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(AudioFile.class); q.setOrdering(name); audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute ()); pm.detachCopyAll(audioFiles); } finally { pm.close(); } System.out.println(list = + audioFiles); for (AudioFile audioFile : audioFiles) { System.out.println(name = + audioFile.getName() + \n); } return audioFiles; } audioFiles contains my data. But the return has a problem because i enter in the onFailure in the client side but without any error. However, i see that if i change the line : audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute()); for : audioFiles = (ListAudioFile) q.execute(); I have get the following error : 5 mai 2009 22:23:23 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241555003875000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze (ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object (AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali zeValue (ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java: 573) at
Re: GWT1.6.4: anybody facing problems with DecoratedStackPanel.setHeight() ?
This was already discussed in this group. It's better to set the size of the widgets inside the decoratedPanel. On 6 Mai, 12:40, TomJanssens jansse...@gmail.com wrote: Hello, I am using a DecoratedStackPanel in my application. If I call DecoratedStackPanel.setHeight() when the window is resized, the DecoratedStackPanel becomes too big. The values I am passing are correct. It seems like it is setting the size of the widget that is added to the DecoratedStackPanel, and not the size of the DecoratedStackPanel itself. Anybody facing the same problem? Cheers Tom --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
annotated timeline and menu
hi all, anybody has a workaround for the google visualization annotated timeline being always on top of the drop down menu? when i have an annotated timeline, i cannot see my drop down menu. drop down menu works fine with other visualization. thanks /bryan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
InitialContext not supported!
Recently, I have change my gwt working environment from Cypal to Google Plugin. Everything seems fine except compile error: 'javax.naming.InitialContext is not supported by Google App Engine's Java runtime environment' in code line 'InitialContext ctx = new InitialContext();'. I use this to connect to EJB 3.0 middle layer. Does anyone have a solution? Best regards, Žarko Bodroški. --~--~-~--~~~---~--~~ 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: GWT1.6.4: anybody facing problems with DecoratedStackPanel.setHeight() ?
Hello, Thanks for the quick answer. I can understand that for a DecoratorPanel, but I was talking about the DecoratedStackPanel. And the normal StackPanel has the same issues. It looks like I have to do workaround, and calculate the size of widgets in the StackPanel. Cheers Tom On May 6, 1:13 pm, alex.d alex.dukhov...@googlemail.com wrote: This was already discussed in this group. It's better to set thesize of the widgets inside thedecoratedPanel. On 6 Mai, 12:40, TomJanssens jansse...@gmail.com wrote: Hello, I am using a DecoratedStackPanel in my application. If I call DecoratedStackPanel.setHeight() when the window is resized, the DecoratedStackPanel becomes too big. The values I am passing are correct. It seems like it is setting thesizeof the widget that is added to the DecoratedStackPanel, and not thesizeof the DecoratedStackPanel itself. Anybody facing the same problem? Cheers Tom --~--~-~--~~~---~--~~ 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: Module works fine in Firefox or Safari but doesn't load in Internet Explorer
On 6 mai, 12:23, jeremyprioux jeremypri...@gmail.com wrote: Everything was fine with the hosted mode. Using pretty and detailed compilation helps me to see that was something wrong with history handling in IE. Then I realized that I had forgotten the html code : iframe src=javascript:'' id=__gwt_historyFrame tabIndex='-1' style=position:absolute;width:0;height:0;border:0/iframe Quite strange that it worked in FF and Safari, no? No actually, because only IE6 and IE7 need this IFrame as a workaround to push an entry in the browsing history; in other browsers (including IE8), setting the location.hash does this without the need for navigating this hidden iframe. --~--~-~--~~~---~--~~ 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: Calling a different HTML page
Thanks for the answer. When I have multiple modules and try to run the application. The GWT webserver asks me to choose a module to run. Is there any way to specify a default module to run when you have more than one module ? Thanks - Harjit On May 5, 8:20 pm, Vishesh visheshs...@gmail.com wrote: Try the code between the tags: code String lnk = GWT.getModuleBaseURL() + newPage.html?Parameter1= + parameter1 Parameter2= + parameter2; Window.open(lnk,New Window,); /code It will open a new window which can be a different module with its onw onModuleLoad() within the same project. Hope this helps.. Vish.. On Tue, May 5, 2009 at 6:26 PM, harjit.singh harjit.si...@content-studios.com wrote: Sumit, Thanks for the response. I did the way you described it using JSP. I have one more question on the same lines. how can I call another module from a link ? Thanks - Harjit On May 5, 2:53 pm, Sumit Chandel sumitchan...@google.com wrote: Hi Harjit, Assuming that you really need these windows to be actual native browser windows (and not simply popup panels, in which case you could use the PopupPanel class), and further assuming that the HTML in the new windows will need to be populated with some data from the server-side, here is a proposed solution. Let's say you want to have some link-styled text that can be clicked to create the new window. You could do this by creating an HTML snippet and adding a click handler to it. You would also need to style the HTML snippet to make it look like a link. In the click handler, you could make a callback to your server-side that could read in whatever data is passed in the call and generate an HTML page that will be served in the new window. Once the RPC completes, you can create a new window sourced to the generated HTML page in the onSuccess() method. Alternatively, you could pre-generated these pages in timed background RPCs and simply create an anchor tag sourced to the generated pages once they're ready. Hope that helps, -Sumit Chandel On Fri, May 1, 2009 at 2:15 PM, harjit.singh harjit.si...@content-studios.com wrote: Hi there, I have an GWT application. Right now what I'm doing is that I'm displaying the data in a single grid with all the buttons in a row . Each button has a listener. when i click one of the buttons, it hides the other widgets and displays the required widgets on the same page and displays some data on the same page. I have added a back button to the page and when the back button is clicked the app hides the panels and displays the other panels. What I need to do is following 1) instead of having a button I need a link and when that link is clicked it would open the a URL in a seperate window and then later on display some data in that window. What approach should I take ? How can I have multiple htmls and call them from the GWT module or have multiple entry points to the application and call it ? Thanks - -- Vishesh Sahu --~--~-~--~~~---~--~~ 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: HandlerRegistration not always so friendly ??
On 6 mai, 10:57, Ed post2edb...@hotmail.com wrote: He Thomas, Your suggestion about Widget::fireEvent(GwtEvent?) and Widget::delegateEvent(Widget,GwtEvent?) doesn't really work I think, as you that means that the listeners have to be registered on the specified widget. It's merely a forward of the event to the listeners of the specified widget. But that's not what I want. I just want to adjust the source of the handler manager of widget X to another widget. If I do it the way you suggest it means I also have to move the listeners to the other source widget as they are otherwise not informed... (the handler manager isn't a static property in Widget). You're breaking the principle of least surprise: if I register a handler on a widget, I expect the source of the event to be that specific widget, so that I can use the same handler on more than one widget and switch/case (well, actually if/else) depending on the event's source, as explained in http://code.google.com/webtoolkit/doc/1.6/FAQ_UI.html#As_the_application_grows,_event_handlers_seem_to_fire_more_slowl As for your maximum number of handler use case, you can ask how many handlers have been registered for a given event type (Widget::getHandlerCount), so you can override add*Handler and throw if this number is too high. ...eventually, you can still have access to a private field using JSNI, so you can inject your own HandlerManager this way if you really want to... --~--~-~--~~~---~--~~ 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: MultiWordSuggest Help
On 6 mai, 08:15, Yogi yogesh@gmail.com wrote: I have a suggestbox with MultiWordSuggestOracle. I need to type in name which is firstName + +lastname and when user selects a item, i want the replaced text to be the id of the user. I am not sure how to implement this. You can't; you have to use your own SuggestOracle (which can delegate to an internal MultiWordSuggestOracle if you want; you could then wrap each MultiWordSuggestion in your own Suggestion class which would map back the firstName lastName --from the MultiWordSuggestion::getReplacementText-- to the user id in your getReplacementText 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: HandlerRegistration not always so friendly ??
You're breaking the principle of least surprise: if I register a handler on a widget, I expect the source of the event to be that Exactly my point why I want to change the source. Your suggestion works with single widget components, but not really wel for composite widgets. Example: suppose you have a composite widget that contains a chexkbox and label. The composite contains a addClickHandler method to add a click handler. This method will simple forward the call to the underlying checkbox and label. The listener will expect the source to be the composite widget like you mentioned above, which isn't the case in the above (in the past you could change the sender widget in the listener). Note: ofcourse you can create a single listener in the composite that is added to the checkbox and label that will forward his event to the contained listeners. But don't forget this is just an example and there are more where this is desirable.. -- Ed --~--~-~--~~~---~--~~ 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 suppress the token change for Hyperlink
On 5 mai, 21:12, George Georgovassilis g.georgovassi...@gmail.com wrote: Hi Kevin, had the same problem. Similar to Isaac's solution I used labels to do the trick, but that left a shallow aftertaste since you have to put a lot of work into them (make them focuseable etc for keyboard navigation) and they still don't feel like real links. Left aside the cool stuff you can do by right clicking on links. OK, so just use an Anchor instead of Hyperlink if you want a link without history management. --~--~-~--~~~---~--~~ 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 change the base URL for the app in Hosted Mode??
If you'd like, you can enter a full URL in the URL field for the launch configuration. That is, you can enter http://yourhostname.com:8080, and the hosted browser will start up and attempt to navigate to that URL. In this example, I'm assuming that you're launch configuration specifies that the built-in server will be listening on port 8080. On Tue, May 5, 2009 at 11:38 AM, k9mab mab.m...@gmail.com wrote: Is it possible to get this to use the actual hostname instead of localhost? I'm trying to tie this into CAS auth filter which redirects to a login page on the CAS server, which in turn redirects back to my page after auth is successful. I get through the CAS auth ok but the redirect back to my app doesn't work. I'm guessing that this is because the CAS client on my side is passing a localhost URL to the CAS server and the CAS server post-auth redirect back to my app fails because localhost doesn't have the same meaning over there. Mike On May 4, 11:03 am, Rajeev Dayal rda...@google.com wrote: Hey Tim, Right now, we have not built functionality into the Eclipse Plugin to detect when you want to launch your app and hit a particular servlet; we only append tohttp://localhost:8080/when you perform a right-click launch against a particular file (HTML or JSP). To change the default URL for a launch, follow the instructions here (esp. the GWT Settings section): http://code.google.com/eclipse/docs/running_and_debugging.html Rajeev On Fri, May 1, 2009 at 11:01 PM, TimOnGmail timbes...@gmail.com wrote: Hi all... When I run a GWT app in Tomcat, I can specify the base URL in the web.xml, or just by the fact that the webapp is known by the name of the directory it's in in the webapps directory. However, running in the Eclipse plugin, in hosted mode, it seems it always runs ashttp://localhost:8080. How can I change it so that it'shttp://localhost:8080/myAppor something different than the default? - Tim --~--~-~--~~~---~--~~ 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: HandlerRegistration not always so friendly ??
I remember trying this bubbling of events which didn't work for focus events So I am a bit sceptic about this, but maybe it improved.. ...but I'm yet to see a concrete example of your needs that lead you to develop this heavy/distorted workaround framework you're talking about... That's not so difficult: I need an event interceptor for every basic widget like explained above. That is: I need to do things before the listeners are informed and a confirmation of the interceptor that they are allowed to be informed (event preview is too global in my case). This isn't possible with the current HandlerManager so I have to inject my own - the heavy/distored workaround framework as you call it, which is just based on standard design patterns, so it works well/clean and clear. It's just it wouldn't be necessary if Gwt would be more open like explained above. Ofcourse I can put those checks you talk about in the widget, but that's not very elegant and I don't like to copy/paste code as I need it on more places... It's nice if you have just a few widgets, but not for me where I have to meet complex requirements and have tons of widgets generated... Ofcourse I can influence the HandlerManager in jnsi but that's fare from elegant ... and not testable as the HandlerManager is not a gwt specific thing, I can use it in any event manager application... - Ed --~--~-~--~~~---~--~~ 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: Optimisation of obfuscated mode
This is true, I was thinking of this later, and saw that in many cases, this COULD be done, And it can be done outside of the gwt compiler, if you like. Some fancy regexp to find functions with EXACT method bodies and renaming+deletion could potentially decrease file sizes dramatically, but only for Obfuscated code... Possibly a fourth compiler option PRODUCTION which would do all the extra permutations for final builds, using text functions after the Java-JavaScript magic happens. One look at the logic trees from the compiler is enough to scare a stone into cold sweat, so to me, it seems easier to just use RegExp; capture the argument names, back-reference them in the method bodies, create generic method signatures, search for equalities, and then replace them down to a minimum. If someone who actually works on the compiler has any input, I'd love to hear it. /Starring this issue now... --~--~-~--~~~---~--~~ 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: Unique identifier
What do you call a GWT instance ? Do you know that GWT applications are just HTML + js + servlets ? (servlets are the RPC implementations) On May 6, 12:53 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hello! I am trying to build a function that stores data about each GWT instance that is running in a database. Is there anyway way to get some sort of unique identifier from GWT in an easy way? I have looked some at session handling, is that the right way to go? Should I use the RPC functionality for this? Joakim Sjöberg Technical Consultant --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
i18n possible to change properties file name
His, Does anyone know if it is possible (maybe with annotation) on the interface extending Messages interface point to the property file that should be used? I am trying to use existing properties file, which is trivially called messages.properties and forced to name interface also Messages and capitalizing the file name, otherwise keys for my properties cannot be found. 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: annotated timeline and menu
Annotated tiimeline is a flash animation so try this: http://kb2.adobe.com/cps/155/tn_15523.html Hope that helps, Salvador On May 6, 2:10 pm, ytbryan ytbr...@gmail.com wrote: hi all, anybody has a workaround for the google visualization annotated timeline being always on top of the drop down menu? when i have an annotated timeline, i cannot see my drop down menu. drop down menu works fine with other visualization. thanks /bryan --~--~-~--~~~---~--~~ 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: InitialContext not supported!
Remove the App Engine support from your project. Cheers, Salvador On May 6, 2:35 pm, zb zarkobodro...@gmail.com wrote: Recently, I have change my gwt working environment from Cypal to Google Plugin. Everything seems fine except compile error: 'javax.naming.InitialContext is not supported by Google App Engine's Java runtime environment' in code line 'InitialContext ctx = new InitialContext();'. I use this to connect to EJB 3.0 middle layer. Does anyone have a solution? Best regards, Žarko Bodroški. --~--~-~--~~~---~--~~ 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: Unique identifier
Hi! Yes I know that, more or less what I want is some way to uniquely identify every time a user goes into my page. When they do that I want to put that into a database (for example time when they used my page) and in the end I want when they come to the end of my page (it's a form page) record the time when they were finished. And for that I need to have a unique identifier that I can use to update the database with. Hope this helps to explain more what I want. // Joakim -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Salvador Diaz Sent: Wednesday, May 06, 2009 4:16 PM To: Google Web Toolkit Subject: Re: Unique identifier What do you call a GWT instance ? Do you know that GWT applications are just HTML + js + servlets ? (servlets are the RPC implementations) On May 6, 12:53 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hello! I am trying to build a function that stores data about each GWT instance that is running in a database. Is there anyway way to get some sort of unique identifier from GWT in an easy way? I have looked some at session handling, is that the right way to go? Should I use the RPC functionality for this? Joakim Sjöberg Technical Consultant --~--~-~--~~~---~--~~ 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: Calling a different HTML page
Google Web Toolkit 1.6.4 HostedMode [-noserver] [-port port-number | auto] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logLevel level] [- gen dir] [-style style] [-ea] [-server servletContainerLauncher] [- startupUrl url] [-war dir] [-extra dir] [-workDir dir] [-localWorkers count] module[s] where -noserver Prevents the embedded web server from running -port Specifies the TCP port for the embedded web server (defaults to ) -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL -gen The directory into which generated files will be written for review -style Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF) -eaDebugging: causes the compiled output to check assert statements. -serverSpecifies a different embedded web server to run (must implement ServletContainerLauncher) -startupUrlAutomatically launches the specified URL -war The war directory to write output files into (defaults to war) -extra The directory into which extra, non-deployed files will be written -workDir The compiler work directory (must be writeable; defaults to a system temp dir) -localWorkers Specifies the number of local workers to use when compiling permutations and module[s] Specifies the name(s) of the module(s) to host On May 6, 3:02 pm, harjit.singh harjit.si...@content-studios.com wrote: Thanks for the answer. When I have multiple modules and try to run the application. The GWT webserver asks me to choose a module to run. Is there any way to specify a default module to run when you have more than one module ? Thanks - Harjit On May 5, 8:20 pm, Vishesh visheshs...@gmail.com wrote: Try the code between the tags: code String lnk = GWT.getModuleBaseURL() + newPage.html?Parameter1= + parameter1 Parameter2= + parameter2; Window.open(lnk,New Window,); /code It will open a new window which can be a different module with its onw onModuleLoad() within the same project. Hope this helps.. Vish.. On Tue, May 5, 2009 at 6:26 PM, harjit.singh harjit.si...@content-studios.com wrote: Sumit, Thanks for the response. I did the way you described it using JSP. I have one more question on the same lines. how can I call another module from a link ? Thanks - Harjit On May 5, 2:53 pm, Sumit Chandel sumitchan...@google.com wrote: Hi Harjit, Assuming that you really need these windows to be actual native browser windows (and not simply popup panels, in which case you could use the PopupPanel class), and further assuming that the HTML in the new windows will need to be populated with some data from the server-side, here is a proposed solution. Let's say you want to have some link-styled text that can be clicked to create the new window. You could do this by creating an HTML snippet and adding a click handler to it. You would also need to style the HTML snippet to make it look like a link. In the click handler, you could make a callback to your server-side that could read in whatever data is passed in the call and generate an HTML page that will be served in the new window. Once the RPC completes, you can create a new window sourced to the generated HTML page in the onSuccess() method. Alternatively, you could pre-generated these pages in timed background RPCs and simply create an anchor tag sourced to the generated pages once they're ready. Hope that helps, -Sumit Chandel On Fri, May 1, 2009 at 2:15 PM, harjit.singh harjit.si...@content-studios.com wrote: Hi there, I have an GWT application. Right now what I'm doing is that I'm displaying the data in a single grid with all the buttons in a row . Each button has a listener. when i click one of the buttons, it hides the other widgets and displays the required widgets on the same page and displays some data on the same page. I have added a back button to the page and when the back button is clicked the app hides the panels and displays the other panels. What I need to do is following 1) instead of having a button I need a link and when that link is clicked it would open the a URL in a seperate window and then later on display some data in that window. What approach should I take ? How can I have multiple htmls and call them from the GWT module or have multiple entry points to the application and call it ? Thanks - -- Vishesh Sahu --~--~-~--~~~---~--~~ You received this message because you are subscribed
Re: Unique identifier
You could use gwt-log: http://code.google.com/p/gwt-log/ with a RemoteLogger Hope that helps, Salvador On May 6, 4:33 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hi! Yes I know that, more or less what I want is some way to uniquely identify every time a user goes into my page. When they do that I want to put that into a database (for example time when they used my page) and in the end I want when they come to the end of my page (it's a form page) record the time when they were finished. And for that I need to have a unique identifier that I can use to update the database with. Hope this helps to explain more what I want. // Joakim -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Salvador Diaz Sent: Wednesday, May 06, 2009 4:16 PM To: Google Web Toolkit Subject: Re: Unique identifier What do you call a GWT instance ? Do you know that GWT applications are just HTML + js + servlets ? (servlets are the RPC implementations) On May 6, 12:53 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hello! I am trying to build a function that stores data about each GWT instance that is running in a database. Is there anyway way to get some sort of unique identifier from GWT in an easy way? I have looked some at session handling, is that the right way to go? Should I use the RPC functionality for this? Joakim Sjöberg Technical Consultant --~--~-~--~~~---~--~~ 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: HandlerRegistration not always so friendly ??
So, after having my errors pointed out to me, I did my research and realized that I was talking about HandlerRegistrations, not HandlerManager. Oops... ...I've been trying to avoid as much of the Collections routines in favor of custom JSNI stacks; they might obscure bugs, but they run much faster. Anyway, if you need an event model where you can turn one source widget into another, why not just make a static class, widgetMapper, with a static private MapWidget,Widget map //or MapWidget,WidgetCollection {If you need one-to-many}, public static Widget delegate(Widget x){ return map.containsKey(x)?map.get(x):x; } Then just call Widget src = widgetMapper.delegate(((Widget) event.getSource()); inside your handlers. Since you've already overridden HandlerManager, consider adding a static field: lastWidget, which is either the Source Widget, or it's delegate source. If your root event panel needs to forward events with a modified Source object, widgetMapper.delegate(((Widget)event.getSource()).fireEvent(event); if you aren't forwarding the events to widgets with registered handlers, you don't need to change the event's Source object, you just need to turn the supplied Source into your desired Source. Furthermore, if you need to do some testing before calling fireEvent, make a testing interface that accepts two Widgets, and returns boolean. You could then send your events to a static function that checks for a delegate widget. then checks for a test object linked to the widgets, then, if test(x,y)==true, set a static Widget/ WidgetCollection instance to the delegate object and return true. Then, your specific handlers can do if(widgetMapper.isValid(event)) {Widget newSource = widgetMapper.getLastWidget(); ...} ...You could even use generics or whatever you like. The benefit of doing this statically as opposed to instance prototypes is that your objects don't need to directly reference and re-reference each other {reduces memory leakage}. Also, you can get your code reuse you were looking for Anyway, I'm somewhat confused about what, exactly, you want... If you post some actual source of what you're doing, I'd probably be less abstract and maybe even make a little sense... All I know is that if you don't want to forward the event to Handlers added to sub-widgets, then your issue likely isn't with event.getSource(). I am likely wrong, but I don't really care. Personally, I like static list objects that link a Widgets hashCode to interface functions that take things like Event or Widget or whatever you need as a parameter, and then use a static function like xRun(int hash,Event x){ if (jsMap.hasKey(hash)) jsMap.castGet(hash).run(x); }xRun(Object hash,Event x){xRun(hash.hashCode(),x); xRun(event.getSource(),event); where jsMap extends JavaScriptObject, uses JSNI to map ints to Objects, and generics to return items in whatever class is needed. HashMapObject,Event could work, but HashMapWidget,Event would require a sometimes-needless cast from getSource() to Widget. Good luck friend! --~--~-~--~~~---~--~~ 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: Trying to use server in another module
I've had some luck with adding multiple module-definitions in my build file. Instead of just x.dt or x.gwtlogin, put both {in ant} target name=hosted depends=javac description=Run hosted mode java failonerror=true fork=true classname=com.google.gwt.dev.HostedMode classpath pathelement location=src/ path refid=project.class.path/ /classpath jvmarg value=-Xmx768M/ arg value=-style/ arg value=PRETTY/ arg value=aiyx.x51.xInk/ arg value=aiyx.X/ arg value=x.dt/ arg value=x.gwtlogin/ /java /target This tells HostedMode to create all the specified modules, and have them present in the active classpath. It might bloat your compile time a little, but it should help resolve classNotFounds Of course, I'm basically ignorant of your server setup, but this is how I use HostedMode to debug multiple projects that contain each other in iframes --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Bar code scanner
Hi My customer is asking if my GWT application is able to accept input from the bar code scanner. I have not done anything with bar code scanner before this, but this is what I got from Google: A bar code scanner is typically comes with a keyboard wedge output or a RS232 output. I think there is no problem if using bar code scanner with keyboard wedge output, the scanner will input the string into the text field as if the user is typing it from the keyboard. The problem is when the customer is using bar code RS232 output, how do I populate the string into the text field? -- Hez --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
overwriting locale client property
My client should specify locale with attribute language=xx set in the query string. I tried pasting updated code from i18n..gwt.xml module but getting an error Unexpected exception in locale detection, using default: TypeError: invalid 'in' operand kd[a]. property-provider name=locale ![CDATA[ try { var locale; // Look for the locale as a url argument if (locale == null) { var args = location.search; var startLang = args.indexOf(language); if (startLang = 0) { var language = args.substring(startLang); var begin = language.indexOf(=) + 1; var end = language.indexOf(); if (end == -1) { end = language.length; } locale = language.substring(begin, end); } } if (locale == null) { // Look for the locale on the web page locale = __gwt_getMetaProperty(language) } if (locale == null) { return default; } while (!__gwt_isKnownPropertyValue(language, locale)) { var lastIndex = locale.lastIndexOf(_); if (lastIndex == -1) { locale = default; break; } else { locale = locale.substring(0,lastIndex); } } return locale; } catch(e){ alert(Unexpected exception in locale detection, using default: + e); return default; } ]] /property-provider --~--~-~--~~~---~--~~ 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: Two web.xml for hosted mode and real mode
Thanks a lot! Somehow that had not worked some days ago, but now it does. ;-) On 4 Mai, 19:08, Sumit Chandel sumitchan...@google.com wrote: Hi Ole, In GWT 1.5.3, you don't need to define the servlets a second time in the web.xml file generated and used by the embedded Tomcat server in hosted mode. You should instead define your servlet targets in your GWT module XML file. There are servlet tags defined in the module XML that you can use to define your servlets and have them automatically copied over into the generated web.xml file for hosted mode. For more details, check out the documentation linked below: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=goog... Hope that helps, -Sumit Chandel On Wed, Apr 29, 2009 at 12:18 AM, olel lauri...@engram.de wrote: Hi, I have a question concerning the web.xml files in a GWT 1.5.3 application. As we are using some none-RPC servlets we need to define them in the web.xml. As far as I understand it there are two web.xml files. One in src\main \webapp\WEB-INF\ and one in tomcat\webapps\ROOT\WEB-INF. The first one is used when the WAR is created by maven 2 and the second one is used for the hosted mode. Unfortunately we therefore have to define the servlets in both files which is obviously error-prone. Is there a way to simplify that or am I doing something wrong? Thanks in advance, Ole --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
In need of a GWT developer in Utah
I have a 6 month contract for a GWT/J2EE developer in Utah. Other than GWT and J2EE experience candidates need to have experience using Spring and Hibernate and WebLogic. The position is with a State agency and because of the nature of the work the position requires both US and Utah citizenship. Please contact me at rthur...@smithjohnson.com if you are interested in the position. Thanks! Randi --~--~-~--~~~---~--~~ 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 suppress the token change for Hyperlink
George's hack with the boolean for don't do history stuff is actually a surprisingly good way to deal with History Events. In order to achieve History events from multiple sources with multiple targets, some validation on HistoryToken is needed, and using a boolean variable will let you change this functionality programmatically. This might not seem like a big deal until you notice how you can't click a history-link after it's been clicked once. Say, you open an iframe on a history event, and once it's closed, you want to let the user click on it again without having to click on anything else. The only way is to inject a useless HistoryToken with History.newItem(do nothing,false);, but now you will lose directionality {as forward to do nothing looks like backward to do nothing}, which means you now need to inject (go forward,false); AND (go backward,false), and when a REAL history event is fired, do History.goBack();History.goBack(); or History.goForward();History.goForward(); It may seem like a gross hack, but it DOES help you to make your application more static and bookmarkable. Using anchor overrides and doing it all in javascript means you lose state when the user actually presses back or forward, AND when power- users view your site, they might want to open a few windows at the same time by Ctrl+clicking links. We all do it, and if every link opens javascript:void(0);, the only way to have multiple tabs of content is to open each to the home page and manually navigate the to the application state you want to test / experience. Taking the time to hack with History support will be worth it when your users start bookmarking your content, and that bookmark actually points to the content they want to see next time. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using GWT to produce pure JavaScript libraries
I've released JsChismeshttp://code.google.com/p/gwtchismes/wiki/JsChismes_Documentationwhich is the result of exporting gwtchismes http://code.google.com/p/gwtchismes library code in order to populate its classes and methods into native javascript. The goal of this port is that the set of widgets can now be used directly in html pages without the need of knowing anything about gwt and java. So non-java developers (ruby, php ..) and designers can use the library in their pages with a little effort. I see several advantages in using GWT to produce javascript libraries: IDE, re-factoring, name-spaces, reusing code, debugging, testing, coverage tools, obfuscate, optimize, browser compatibility etc. and this technique is easier since Ray Cromwell's gwt-exporthttp://code.google.com/p/gwt-exporter/library makes it pretty simple. Manolo Carrasco --~--~-~--~~~---~--~~ 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: Gears GWT API on Android behaving differently?
Ok I seriously think I'm about to lose it here. This is driving me nuts!!! For some reason, I cannot get the following class to run in Android without throwing a Wrong Number of SQL Parameters Exception. It throws the error on my G1 (Android 1.1) and on my Cupcake Emulator. It works without fail on every other platform I've tried it on. Also, it seems to work find if I just copy/paste the insert user method into the DatabaseDemo app from the Gears Sample application. Does anyone have any idea what could be happening here? I'm using GWT 1.5.3 and Gears 1.2.0. I feel like I've tried every possible permutation of this code and still have not been successful! Could someone maybe give this thing an old run and test with the Android Emulator? Here is the stand alone class: public class TestGears implements EntryPoint { /* | C O N S T A N T S | */ private static final String DB_NAME = moose_db; private static final String INSERT_USER = INSERT INTO userTable (user_id, sessionId, name, email) values ( ?, ?, ?, ? ); private static final String CREATE_USER_TABLE = CREATE TABLE IF NOT EXISTS userTable ( user_id TEXT NOT NULL, sessionId TEXT, name TEXT, email TEXT ); /* |I N S T A N C E V A R I A B L E S| */ private Database db; /* | C O N S T R U C T O R S | */ /* | P U B L I CA P IM E T H O D S | */ public void onModuleLoad() { User testUser = new User(); testUser.id = 100L; testUser.name = Forced Manual ; testUser.currentSessionId = FAKESESSION; this.db = Factory.getInstance().createDatabase(); this.db.open( DB_NAME ); try { db.execute( DROP TABLE IF EXISTS userTable ); this.db.execute( CREATE_USER_TABLE ); } catch ( DatabaseException e ) { Window.alert( e.getMessage() ); } insertUser( testUser ); } /* |N O N - P U B L I CM E T H O D S | */ public void insertUser( User theUser ) { final String[] params = new String[] { Long.toString( theUser.id ) , theUser.currentSessionId , theUser.name , }; try { db.execute( INSERT_USER, params ); } catch ( DatabaseException e ) { String parameterString = new String(); parameterString += [ ; for ( String param : params ) { parameterString += param + , ; } parameterString = parameterString.substring( 0, parameterString.length() - 2 ); parameterString += ]; Window.alert( insertUser: + e.getMessage() + - + parameterString ); } } /* | I N L I N EC L A S S E S| */ public class User { public Long id; public String name = new String(); public String currentSessionId = new String(); } } On May 5, 2:24 pm, Evan Ruff evan.r...@gmail.com wrote: Oh also, I should add, that I checked out the DB structure using the little DB explorer guy that is available in the vanilla gears distro. The SQLite DB looks identical as the one on the other platforms, just without data ('cause of all the SQL errors, I assume) Thanks! E On May 5, 2:22 pm,EvanRuffevan.r...@gmail.com wrote: Hey guys, I've got a pretty heavy gears app the works great in IE, Firefox and Chrome; however, I'm getting some inconsistencies when running it on Android using Gears GWT API 1.2.0. Whenever I seem to run ANY query, I get a Wrong number of SQL parameters DatabaseException. Everything works perfectly in the other browsers. I'm debugging back to the client and my info is: Exception Message: Wrong number of SQL parameters. Method: selectUserByUserId Parameters: [ 1 ] Here is the method: private static final String SELECT_USER = SELECT
Re: How to suppress the token change for Hyperlink
On 6 mai, 17:47, Alyxandor a.revolution.ultra.b...@gmail.com wrote: George's hack with the boolean for don't do history stuff is actually a surprisingly good way to deal with History Events. In order to achieve History events from multiple sources with multiple targets, some validation on HistoryToken is needed, and using a boolean variable will let you change this functionality programmatically. This might not seem like a big deal until you notice how you can't click a history-link after it's been clicked once. Say, you open an iframe on a history event, and once it's closed, you want to let the user click on it again without having to click on anything else. The only way is to inject a useless HistoryToken with History.newItem(do nothing,false);, but now you will lose directionality {as forward to do nothing looks like backward to do nothing}, which means you now need to inject (go forward,false); AND (go backward,false), and when a REAL history event is fired, do History.goBack();History.goBack(); or History.goForward();History.goForward(); It may seem like a gross hack, but it DOES help you to make your application more static and bookmarkable. I find it much easier/better to just use an Anchor with a ClickHandler that mimics the Hyperlink (Hyperlink would be equivalent to wrap the Anchor in a SimplePanel and set the panel's primary style name to gwt- Hyperlink). final String TARGET_HISTORY_TOKEN = targetHistorytoken; Anchor anchor = new Anchor(text, # + TARGET_HISTORY_TOKEN); anchor.addClickHandler(new ClickHandler() { static final HyperlinkImpl impl = GWT.create(HyperlinkImpl.class); public void onClick(ClickEvent event) { if (impl.handleAsClick(Event.as(event.getNativeEvent( { // do your stuff here and choose whether to call the following History.newItem History.newItem(targetHistoryToken); // ...though always prevent default (a priori), unless that's not what you want... event.preventDefault(); } } }); Using anchor overrides and doing it all in javascript means you lose state when the user actually presses back or forward, AND when power- users view your site, they might want to open a few windows at the same time by Ctrl+clicking links. We all do it, and if every link opens javascript:void(0);, the only way to have multiple tabs of content is to open each to the home page and manually navigate the to the application state you want to test / experience. Taking the time to hack with History support will be worth it when your users start bookmarking your content, and that bookmark actually points to the content they want to see next time. In your iframe sample use case above, though, you're mis-using the history/hyperlink, as the history state is not stable (you can close the iframe, whatever it means to you), and you're expecting the hyperlink to take an action (re-open the closed iframe), not only navigate to a given history state. It would be quite easy to solve (hack!) by testing the current history getToken() and then call newItem(x) or fireCurrentHistoryState(). I'm using such a hack (in response to async requests though; instead of rewriting my app) and it works pretty well. --~--~-~--~~~---~--~~ 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: Optimisation of obfuscated mode
Ah, that's not a bad idea actually. Using a regex that is… I might actually try that. I haven't actually looked at the compiler source yet, but I think I'll do that tomorrow. I'll update if I come up with anything. On 6 Maj, 22:00, Alyxandor a.revolution.ultra.b...@gmail.com wrote: This is true, I was thinking of this later, and saw that in many cases, this COULD be done, And it can be done outside of the gwt compiler, if you like. Some fancy regexp to find functions with EXACT method bodies and renaming+deletion could potentially decrease file sizes dramatically, but only for Obfuscated code... Possibly a fourth compiler option PRODUCTION which would do all the extra permutations for final builds, using text functions after the Java-JavaScript magic happens. One look at the logic trees from the compiler is enough to scare a stone into cold sweat, so to me, it seems easier to just use RegExp; capture the argument names, back-reference them in the method bodies, create generic method signatures, search for equalities, and then replace them down to a minimum. If someone who actually works on the compiler has any input, I'd love to hear it. /Starring this issue now... --~--~-~--~~~---~--~~ 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: overwriting locale client property
On 6 mai, 17:36, denis56 denis.ergashb...@gmail.com wrote: My client should specify locale with attribute language=xx set in the query string. I tried pasting updated code from i18n..gwt.xml module but getting an error Unexpected exception in locale detection, using default: TypeError: invalid 'in' operand kd[a]. property-provider name=locale ![CDATA[ try { var locale; // Look for the locale as a url argument if (locale == null) { var args = location.search; var startLang = args.indexOf(language); if (startLang = 0) { var language = args.substring(startLang); var begin = language.indexOf(=) + 1; var end = language.indexOf(); if (end == -1) { end = language.length; } locale = language.substring(begin, end); } } if (locale == null) { // Look for the locale on the web page locale = __gwt_getMetaProperty(language) } if (locale == null) { return default; } while (!__gwt_isKnownPropertyValue(language, locale)) { Should probably be locale here. var lastIndex = locale.lastIndexOf(_); if (lastIndex == -1) { locale = default; break; } else { locale = locale.substring(0,lastIndex); } } return locale; } catch(e){ alert(Unexpected exception in locale detection, using default: + e); return default; } ]] /property-provider --~--~-~--~~~---~--~~ 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: Gears GWT API on Android behaving differently?
I looked at your code and didn't see anything obviously wrong. I searched on some of the Gears groups and found a similar report, but no answer. It is worth nothing that the version of Gears on android is different (older) than the version you are getting when you install Gears on a desktop browser. Can we rule out the GWT bindings? Could you write a simple program that reproduces (or fails to reproduce) the problem in straight JavaScript? -Eric. -- 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: Gears GWT API on Android behaving differently?
If it turns out to be reproducible outside of GWT, I was going to point you at the android-developers google group. http://groups.google.com/group/android-developers On Wed, May 6, 2009 at 1:45 PM, Eric Ayers zun...@google.com wrote: I looked at your code and didn't see anything obviously wrong. I searched on some of the Gears groups and found a similar report, but no answer. It is worth nothing that the version of Gears on android is different (older) than the version you are getting when you install Gears on a desktop browser. Can we rule out the GWT bindings? Could you write a simple program that reproduces (or fails to reproduce) the problem in straight JavaScript? -Eric. -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Gears GWT API on Android behaving differently?
Hey Eric, I'm pretty much terrified of Javascript. I'm a little hesitant to make any determination whatsoever as to the cause of the problem. When I run the GWT Gears Sample DatabaseDemo project, it works as expected. I can even replace all of the DB specifics with the internals of my tables/queries and it seems to work! It's just so freakin' frustrating. RememberTheMilk and the mobile GMail seem to make use of Gears on Android without issue, so I really don't know where to go from here. Any other suggestions? Here's the replaced DatabaseDemo code, fwiw: public class Gears implements EntryPoint { private static final int NUM_SAVED_ROWS = 3; private static final int NUM_DATA_TABLE_COLUMNS = 3; private final Button addButton = new Button( Add ); private final Button clearButton = new Button( Clear Database ); private Database db; private final TextBox input = new TextBox(); private final FlexTable dataTable = new FlexTable(); public void onModuleLoad() { VerticalPanel outerPanel = new VerticalPanel(); outerPanel.setSpacing( 10 ); outerPanel.getElement().getStyle().setPropertyPx( margin, 15 ); HorizontalPanel textAndButtonsPanel = new HorizontalPanel(); textAndButtonsPanel.add( new Label( Enter a Phrase: ) ); textAndButtonsPanel.add( input ); textAndButtonsPanel.add( addButton ); textAndButtonsPanel.add( clearButton ); outerPanel.add( textAndButtonsPanel ); outerPanel.add( new Label( Last 3 Entries: ) ); outerPanel.add( dataTable ); for ( int i = 0; i = NUM_SAVED_ROWS; ++i ) { dataTable.insertRow( i ); for ( int j = 0; j NUM_DATA_TABLE_COLUMNS; j++ ) { dataTable.addCell( i ); } } dataTable.setWidget( 0, 0, new HTML( bId/b ) ); dataTable.setWidget( 0, 1, new HTML( bPhrase/b ) ); dataTable.setWidget( 0, 2, new HTML( bTimestamp/b ) ); // Create the database if it doesn't exist. try { db = Factory.getInstance().createDatabase(); db.open( database-demo ); db.execute( DROP TABLE IF EXISTS user ); db.execute( CREATE TABLE IF NOT EXISTS user ( user_id TEXT NOT NULL, sessionId TEXT, name TEXT, email TEXT ) ); } catch ( DatabaseException e ) { RootPanel.get( demo ).add( new HTML( Error opening or creating database: font color=\red\ + e.toString() + /font ) ); // Fatal error. Do not build the interface. return; } input.addKeyboardListener( new KeyboardListenerAdapter() { @Override public void onKeyDown( Widget sender, char keyCode, int modifiers ) { if (keyCode == KeyboardListener.KEY_ENTER) { insertPhrase(); } } } ); addButton.addClickListener( new ClickListener() { public void onClick( Widget sender ) { insertPhrase(); } } ); clearButton.addClickListener( new ClickListener() { public void onClick( Widget sender ) { clearPhrases(); displayRecentPhrases(); } } ); RootPanel.get( demo ).add( outerPanel ); displayRecentPhrases(); } /** * Remove all phrases from the database. */ private void clearPhrases() { try { db.execute( DELETE FROM Phrases ); } catch ( DatabaseException e ) { Window.alert( e.toString() ); } } /** * Fill the labels with the phrases from the database. */ private void displayRecentPhrases() { try { ResultSet rs = db.execute( SELECT name, email FROM user ); int i; for ( i = 1; rs.isValidRow(); ++i, rs.next() ) {
I have a problem withn the refresh file
Hello every one, i'm using gwt 16.4 and GWT-ext 2.0.5.When i modify the html file siteAfrikaSciences.html i have the result of the old file. I try to changem the name of the file and i put 2 at it's end siteAfrikaSciences2.html. Unable to find the file - correct. But when i modify to the correct name siteAfrikaSciences.html i have this error HTTP ERROR: 503 SERVICE_UNAVAILABLE RequestURI=/siteAfrikaSciences.html I try to clean and rebuild with Ant i have this error of build: Buildfile: C:\Documents and Settings\Arnaud AGOSSA\Bureau \ProjetSiteInternetArnaud\gwt-windows-1.6.4\siteAfrikaSciences \build.xml libs: [copy] Copying 1 file to C:\Documents and Settings\Arnaud AGOSSA \Bureau\ProjetSiteInternetArnaud\gwt-windows-1.6.4\siteAfrikaSciences \war\WEB-INF\lib javac: [javac] Compiling 4 source files to C:\Documents and Settings \Arnaud AGOSSA\Bureau\ProjetSiteInternetArnaud\gwt- windows-1.6.4\siteAfrikaSciences\war\WEB-INF\classes BUILD FAILED C:\Documents and Settings\Arnaud AGOSSA\Bureau\ProjetSiteInternetArnaud \gwt-windows-1.6.4\siteAfrikaSciences\build.xml:25: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to C:\Program Files\Java\jre1.6.0 The class Directory is also empty. What can i do? Thank you for your response Arnaud --~--~-~--~~~---~--~~ 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: RPC callback problem
I have tried with DTO but i always have the following error : This application is out of date, please click the refresh button on your browser. I have empty my cache, but the problem persists. Someone has an idea ? Thanks. On 6 mai, 12:51, Ouaibou ouai...@gmail.com wrote: Okay, thanks Salvador, I will see that :o) On 6 mai, 11:17, Salvador Diaz diaz.salva...@gmail.com wrote: Everybody seems to be missing this since app engine for java was released. Try reading the GWT Developer Guide guys, you'll find all kinds of interesting and useful stuff. Anyway, the problem is that you can't use any org.datanucleus.store.appengine.* classes in your client-side code. You have to use the DTO pattern. Here's one of the discussions related to this topic from a couple of days ago:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... You could also try searching the forum, that'd keep us from answering the same question for the n-th time. Hope that helps; Salvador PS: The relevant part of the developer documentation discussing this is here:http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#D... On May 6, 11:01 am, Paul Robinson ukcue...@gmail.com wrote: Your onFailure method ignores the Throwable it's given. Maybe it contains something useful? Ouaibou wrote: Hello, I have a problem with the callback of a RPC call. I have post in appengine forum because i think it was a problem with the appengine datastore, but Max Ross suggests me to post here : http://groups.google.com/group/google-appengine-java/browse_thread/th... In order to summarize : I have two classes AudioFile and Genre. AudioFile as a field of type Genre. Both are marked as detachable like Max says me. I add an AudioFile in the datastore and then i do a RPC call in the client side in order to retrieve the data : this.gtunesService.getAudioFiles(new AsyncCallbackListAudioFile() { public void onFailure(Throwable caught) { SC.say(Gtunes.SERVER_ERROR); } public void onSuccess(ListAudioFile result) { Gtunes.this.audioFiles = result; String buf = ; for (AudioFile af : Gtunes.this.audioFiles) { buf += genre = + af.getGenre ().getName() + - + af.getName() + br /; } SC.say(buf); } }); The problem is in the server side with the following code : public ListAudioFile getAudioFiles() { ListAudioFile audioFiles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(AudioFile.class); q.setOrdering(name); audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute ()); pm.detachCopyAll(audioFiles); } finally { pm.close(); } System.out.println(list = + audioFiles); for (AudioFile audioFile : audioFiles) { System.out.println(name = + audioFile.getName() + \n); } return audioFiles; } audioFiles contains my data. But the return has a problem because i enter in the onFailure in the client side but without any error. However, i see that if i change the line : audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute()); for : audioFiles = (ListAudioFile) q.execute(); I have get the following error : 5 mai 2009 22:23:23 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241555003875000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali ze (ServerSerializationStreamWriter.java:591) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write Object (AbstractSerializationStreamWriter.java:129) at
Re: Debugging a GWT project in netbeans + glassfish
Hi Ariel, Assuming you're using the GWT4NB plugin for your application, you should probably try posting up on the GWT4NB support group. There should be a way to pass more memory to the hosted mode process through the plugin launch configuration, which is what you'll need to do to get over the java.lang.OutOfMemoryError block. GWT4NB Discussion forum: https://gwt4nb.dev.java.net/servlets/ForumMessageList?forumID=2603 Hope that helps, -Sumit Chandel On Fri, May 1, 2009 at 6:45 AM, ariel_ro bonnano@gmail.com wrote: Hello everybody! I have a question related to the debugging process of GWT apps. Basically when I set a breakpoint at any line in Netbeans IDE a window asks me weather I want to launch hosted mode(server-side) or client mode. After that, the GWT Development Shell along with a browser window appear but the Shell has the following message to display: [ERROR] Failure to load module 'timetable.Main' java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity (AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java: 390) at java.lang.StringBuffer.append(StringBuffer.java:224) at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException (Compiler.java:467) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java: 411) at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java: 277) at com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193) at com.google.gwt.dev.javac.CompilationState.compile (CompilationState.java:115) at com.google.gwt.dev.cfg.ModuleDef.updateTypeOracle(ModuleDef.java: 477) at com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:324) at com.google.gwt.dev.GWTShell $BrowserWidgetHostImpl.createModuleSpaceHost(GWTShell.java:252) at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad (BrowserWidgetIE6.java:72) at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke (BrowserWidgetIE6.java:139) at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke (IDispatchImpl.java:294) at com.google.gwt.dev.shell.ie.IDispatchImpl.method6 (IDispatchImpl.java:194) at org.eclipse.swt.internal.ole.win32.COMObject.callback6 (COMObject.java:117) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966) at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720) at com.google.gwt.dev.GWTShell.run(GWTShell.java:593) at com.google.gwt.dev.GWTShell.main(GWTShell.java:357) [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) I tried many things to increase the memory but none seems to work. Not being able to debug my application is a serios drawback for me. Any help will be highly appreciated! Thanks in advance, Ariel --~--~-~--~~~---~--~~ 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 don't know how to add handlers to widgets!
This is probably a really simple thing, but I don't know how to implement the following. package mods.client.resultSelector; import com.google.gwt.event.dom.client.MouseDownEvent; import com.google.gwt.event.dom.client.MouseDownHandler; import com.google.gwt.event.dom.client.MouseMoveEvent; import com.google.gwt.event.dom.client.MouseMoveHandler; import com.google.gwt.event.dom.client.MouseOutEvent; import com.google.gwt.event.dom.client.MouseOutHandler; import com.google.gwt.event.dom.client.MouseUpEvent; import com.google.gwt.event.dom.client.MouseUpHandler; import com.google.gwt.user.client.ui.AbsolutePanel; import com.google.gwt.user.client.ui.Composite; public class MousyAbsolutePanel extends Composite implements MouseDownHandler { AbsolutePanel abs = new AbsolutePanel(); public MousyAbsolutePanel(int width){ System.out.println(MousyAbsolutePanel being created with width: + width); initWidget(abs); abs.setWidth(String.valueOf(width)); abs.setHeight(100%); abs.setStyleName(mousyAbsolutePanel); } public void onMouseDown(MouseDownEvent event) { System.out.println(onMouseDown()); } } I want to have what is effectively a absolutePanel that can accept mouse events. However, within the Composite object I don't know how to tie the the handler I have written (the onMouseDown() thing) with the abs variable. To put it sucinctly, I wan the abs AbsolutePanel to respond when it is clicked upon, but AbsolutePanels do not naturally accept click events. How do I go about doing 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 -~--~~~~--~~--~--~---
horizontal and vertical flow panels
I've made horizontal and vertical flow panels and put them up here: http://blog.sudhirj.com/2009/05/vertical-and-horizontal-flow-panels-in.html Any idea why something like this isn't in GWT in the first place? It would be useful... The tables implementation seems very messy. Sudhir Jonathan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
RPC Call and onSuccess get File.
I have a problem downloading a file using Internet Explorer 7: I Have a GWT almost offline application that works and generates lots of data that will be written into a PDF report. The only call that the application do to a servlet is when he needs to generate the PDF report. I'm using birt engine to generate the PDF report, and i'm doing a RPC call to generate the pdf: On GWT file: reportService.generateReport(...lots of params..., new AsyncCallback () { public void onFailure(final Throwable throwable) { } public void onSuccess(final Object o) { Frame downloadFrame = new Frame(); downloadFrame .setSize(0px, 0px); downloadFrame .setVisible(false); RootPanel.get().add(downloadFrame ); downloadFrame .setUrl(GWT.getModuleBaseURL() + DownloadReportService); } }); The report PDF is sucessfully generated and placed on a temporary dir, where it will be loaded by the DownloadReportService. This works fine withall firefox versions but in IE7 it doesn't let me download the file until I accept a raised warning of download blocked (appears when the address it's not localhost address and with default ie7 settings). When i accept the download warning all the information in my application is clean because IE refreshes the page. I saw this problem solved on another threads on this list, and i tried to do it that way, but it didn't work. (Using Window.open or Window.Location.assign Window.Location.assign). I want to get rid of the download warning, or if not possible, make sure the page is not refreshed and the content cleaned! Can anyone help me? The DownloadReportService (extends HttpServlet) code: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String dir = C:\\tmp; String fileName = test.pdf; // Open file File f = new File(dir + \\ + fileName); ServletOutputStream op = response.getOutputStream(); ServletContext context = getServletConfig().getServletContext (); String mimetype = context.getMimeType(fileName); // Set the servlet response response.setContentType((mimetype != null) ? mimetype : application/octet-stream); response.setContentLength((int) f.length()); response.setHeader(Content-Disposition, attachment; filename=\ + fileName + \); // Stream to the requester. byte[] bbuf = new byte[BUFSIZE]; DataInputStream in = new DataInputStream(new FileInputStream (f)); int length; while ((length = in.read(bbuf)) != -1) { op.write(bbuf, 0, length); } in.close(); op.flush(); op.close(); } --~--~-~--~~~---~--~~ 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: Unique identifier
Hi! Seems good, but I still got the problem with the unique identifier, right? // Joakim -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Salvador Diaz Sent: Wednesday, May 06, 2009 4:46 PM To: Google Web Toolkit Subject: Re: Unique identifier You could use gwt-log: http://code.google.com/p/gwt-log/ with a RemoteLogger Hope that helps, Salvador On May 6, 4:33 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hi! Yes I know that, more or less what I want is some way to uniquely identify every time a user goes into my page. When they do that I want to put that into a database (for example time when they used my page) and in the end I want when they come to the end of my page (it's a form page) record the time when they were finished. And for that I need to have a unique identifier that I can use to update the database with. Hope this helps to explain more what I want. // Joakim -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Salvador Diaz Sent: Wednesday, May 06, 2009 4:16 PM To: Google Web Toolkit Subject: Re: Unique identifier What do you call a GWT instance ? Do you know that GWT applications are just HTML + js + servlets ? (servlets are the RPC implementations) On May 6, 12:53 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hello! I am trying to build a function that stores data about each GWT instance that is running in a database. Is there anyway way to get some sort of unique identifier from GWT in an easy way? I have looked some at session handling, is that the right way to go? Should I use the RPC functionality for this? Joakim Sjöberg Technical Consultant --~--~-~--~~~---~--~~ 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: RPC callback problem
There was a little mistake in my DTO. Now all is okay. Thanks for your help. On 6 mai, 20:23, Ouaibou ouai...@gmail.com wrote: I have tried with DTO but i always have the following error : This application is out of date, please click the refresh button on your browser. I have empty my cache, but the problem persists. Someone has an idea ? Thanks. On 6 mai, 12:51, Ouaibou ouai...@gmail.com wrote: Okay, thanks Salvador, I will see that :o) On 6 mai, 11:17, Salvador Diaz diaz.salva...@gmail.com wrote: Everybody seems to be missing this since app engine for java was released. Try reading the GWT Developer Guide guys, you'll find all kinds of interesting and useful stuff. Anyway, the problem is that you can't use any org.datanucleus.store.appengine.* classes in your client-side code. You have to use the DTO pattern. Here's one of the discussions related to this topic from a couple of days ago:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... You could also try searching the forum, that'd keep us from answering the same question for the n-th time. Hope that helps; Salvador PS: The relevant part of the developer documentation discussing this is here:http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#D... On May 6, 11:01 am, Paul Robinson ukcue...@gmail.com wrote: Your onFailure method ignores the Throwable it's given. Maybe it contains something useful? Ouaibou wrote: Hello, I have a problem with the callback of a RPC call. I have post in appengine forum because i think it was a problem with the appengine datastore, but Max Ross suggests me to post here : http://groups.google.com/group/google-appengine-java/browse_thread/th... In order to summarize : I have two classes AudioFile and Genre. AudioFile as a field of type Genre. Both are marked as detachable like Max says me. I add an AudioFile in the datastore and then i do a RPC call in the client side in order to retrieve the data : this.gtunesService.getAudioFiles(new AsyncCallbackListAudioFile() { public void onFailure(Throwable caught) { SC.say(Gtunes.SERVER_ERROR); } public void onSuccess(ListAudioFile result) { Gtunes.this.audioFiles = result; String buf = ; for (AudioFile af : Gtunes.this.audioFiles) { buf += genre = + af.getGenre ().getName() + - + af.getName() + br /; } SC.say(buf); } }); The problem is in the server side with the following code : public ListAudioFile getAudioFiles() { ListAudioFile audioFiles = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query q = pm.newQuery(AudioFile.class); q.setOrdering(name); audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute ()); pm.detachCopyAll(audioFiles); } finally { pm.close(); } System.out.println(list = + audioFiles); for (AudioFile audioFile : audioFiles) { System.out.println(name = + audioFile.getName() + \n); } return audioFiles; } audioFiles contains my data. But the return has a problem because i enter in the onFailure in the client side but without any error. However, i see that if i change the line : audioFiles = new ArrayListAudioFile((ListAudioFile) q.execute()); for : audioFiles = (ListAudioFile) q.execute(); I have get the following error : 5 mai 2009 22:23:23 com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1241555003875000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: Type 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer ialize (StandardSerializationPolicy.java:83) at
Re: Bar code scanner
Hi Hez, It's been my experience that most if not all scanners come with either a hardware or software keyboard wedge. If it doesn't you may want to look at the problem differently. Provide a software keyboard wedge, what this will do is receive the input from RS-232 or USB and emulate keyboard input for the platforms you want to support. Then your GWT app doesn't have to worry about it. The one thing you may need to account for is sometimes the input is wrapped in a beginning and end character i.e. 1234 becomes *1234*. Regards, Gordon http://devbright.com On May 6, 9:35 am, hezjing hezj...@gmail.com wrote: Hi My customer is asking if my GWT application is able to accept input from the bar code scanner. I have not done anything with bar code scanner before this, but this is what I got from Google: A bar code scanner is typically comes with a keyboard wedge output or a RS232 output. I think there is no problem if using bar code scanner with keyboard wedge output, the scanner will input the string into the text field as if the user is typing it from the keyboard. The problem is when the customer is using bar code RS232 output, how do I populate the string into the text field? -- Hez --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
onResponseReceived - Functioning in hosted/IE Only
Hey all, I'm working on a simple GWT application, but for some reason I cannot get my compiled version to function in FireFox or Opera. It works fine in IE/Hosted mode, meaning that it fetches the XML and displays what it needs to on the screen. In FireFox and Opera, the onResponseRecieved never gets fired, albeit the URL is functional if I paste it in a browser. I'm done some searching, and the only thing that came up was IE's interpretation vs. FireFox/Opera of same domain, but since it is localhost talking to localhost, it shouldn't matter? I'm assuming it has to be something with either the way the url is handled in the RequestBuilder or something I'm missing. I'm sure this is something trivial, and I would be most appreciative if someone could point me in the right direction. Here is the code I'm working with - thanks again: public static void getXml(String input, final VerticalPanel nodePanel) { String url = http://localhost/test.xml;; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url)); try { Request request = builder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { System.out.println(onError triggered.); } public void onResponseReceived(Request request, Response response) { Nodes[] toRender = parseString(response.getText()); renderView(toRender, nodePanel); } }); } catch (RequestException e) { e.printStackTrace(); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
How do I get gwt-user javadoc with GWT 1.6 Eclipse plugin?
I've been trying the new 1.6 Eclipse plugin, but when I hit shift-F2 on a GWT class, no javadoc pops up. The message that *does* pop up says that I should modify the properties page of the parent jar, but I see no way to do that. Can somebody give me step-by-step directions for hooking up Eclipse to the javadoc for gwt-user.jar? 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: InitialContext not supported!
That's it. Thanks. On May 6, 4:32 pm, Salvador Diaz diaz.salva...@gmail.com wrote: Remove the App Engine support from your project. Cheers, Salvador On May 6, 2:35 pm, zb zarkobodro...@gmail.com wrote: Recently, I have change my gwt working environment from Cypal to Google Plugin. Everything seems fine except compile error: 'javax.naming.InitialContext is not supported by Google App Engine's Java runtime environment' in code line 'InitialContext ctx = new InitialContext();'. I use this to connect to EJB 3.0 middle layer. Does anyone have a solution? Best regards, Žarko Bodroški. --~--~-~--~~~---~--~~ 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: Eclipse Plugin Compile Button Stack Overflow
Hi Denis, If the command line workaround works for you, you can proceed to deploy your GWT application to Google App Engine by invoking the uploader utility with the command below: ..\appengine-java-sdk\bin\appcfg.cmd update war The GWT compiler will generate output in a standard war structure, which you can then directly deploy to Google App Engine to host your application. If you're using the AppEngine SDK that came with the Eclipse plugin, you can find it in the directory below: \eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.2.0.v200904062334\appengine-java-sdk-1.2.0\bin You can read more about deploying your application to Google App Engine at the link below: http://code.google.com/appengine/docs/java/gettingstarted/uploading.html Hope that helps, -Sumit Chandel On Tue, May 5, 2009 at 6:10 AM, denis denis.at...@gmail.com wrote: Thanks. I understand that I can avoid the button. I will try the workaround with line mode. As I said, my purpose is to export a GWT application to Google App Engine. GWT Eclipse plugin invokes the GWT compiler leading to the stack overflow. Denis On 5 mai, 14:40, Miguel Méndez mmen...@google.com wrote: We have a fix that allows you to specify the VM args for both the GWT Compile toolbar action as well as the GWT Compilation that takes place during deploy. As a work around, you can invoke the GWT compiler manually, seehttp:// code.google.com/webtoolkit/doc/1.6/DevGuideCompilingAndDebuggi..., and then deploy from the command line. We should be pushing a plugin update very shortly. On Tue, May 5, 2009 at 2:43 AM, denis denis.at...@gmail.com wrote: I have the same issue. With the regular compiler, I can avoid stack overflow error thanks to -Xmx512m -Xms128m -Xss8M in the VM arguments box. But, with GWT compiler, I have not found a way to set these arguments, and the compiler is stopped with the stack overflow error. Using GWT compiler is automated for App Engine deployment. What shall I do? Denis On 30 avr, 18:06, Vitali Lovich vlov...@gmail.com wrote: On Thu, Apr 30, 2009 at 10:25 AM, mounier.flor...@gmail.com mounier.flor...@gmail.com wrote: I'm waiting for it too and its starting to take time just for two options... Why does deploying force compilation (which fails so badly) ? Because that's what deployment is? Maybe I'm not understanding your question. Hosted mode (which runs the Java code in a JVM) is just for debugging. For deployment, you compile the Java code into actual Javascript. BTW what does it change to use GWT trunk ? From what I could tell, not much. But there could be more unknown bugs whatnot. However, it should compile - according to the Google developers, they have other internal teams working against trunk. I'm using it and I still have the issue... (and I can't deploy and oophm doesn't have a compile button yet, fortunately i can compile with ant) So what's the issue? What do you mean you can't deploy? You just said you can compile with ant. OOPHM should get the compile button eventually - I never found a particular need to use it. Just run your ant script. On 23 avr, 15:59, Miguel Méndez mmen...@google.com wrote: We've updated the compile UI to allow you to tweak the -Xss and -Xmx settings. It will be part of the upcoming point release of the plugin. In the meantime, the compile button in hosted mode is one work around. You can also compile a version of the GWT trunk and have the plugin use that SDK for the project. On Thu, Apr 23, 2009 at 3:51 AM, mihai007 mihai@gmail.com wrote: oh well add me to the list. this should have priority as it turns the use of plugin useless if I can't compile any workarounds? On 8 Abr, 16:11, Brian hibr...@gmail.com wrote: Just installed the Google plugin for Eclipse, and hit the Compile button on my project. It gave me astackoverflowerror. Prior to using the plugin, I'd compile by hitting the Compile button in the hosted mode browser. In the Run/Debug Eclipse configuration, I have -Xss4k -Xmx256M Compiles worked fine with those flags and the Compile button from hosted mode. How do I set the Xss flag for use by the Compile button in the eclipse toolbar? I tried putting it in the Advanced section, but this just informed me it wasn't an appropriate gwt compiler option. This isn't stopping me from doing anything, as I can still compile from hosted mode, just curious how to set it up. I checked the plugin faq, but couldn't find anything there. -- Miguel -- Miguel --~--~-~--~~~---~--~~ You received this message
Re: How To add GWT component on request
Hi wera, If you have control over the button in the host page, you should probably include it as part of the widgets in your GWT application to programmatically add the GWT component you want to display when the button is clicked from within your GWT code. You could potentially do something like: Button addGwtComponent = new Button(Add my widget!); addGwtComponent.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { RootPanel.get(gwcontainer).add(myGwtComponent); } }); You can even take this further if you have control over whether the div is necessarily in the first place, in which case you can just add myGwtComponent to a panel that may have previously not displayed anything. If you don't have control over elements in the page, you could expose an initialization bridge method that would execute something similar to the RootPanel.get(gwcontainer).add(myGwtComponent) mentioned above. Check out the FAQ below for more details on how to expose a bridge method: http://code.google.com/webtoolkit/doc/1.6/FAQ_Client.html#How_do_I_call_Java_methods_from_handwritten_JavaScript_or_third Hope that helps, -Sumit Chandel On Sun, May 3, 2009 at 11:27 AM, wera svet...@gmail.com wrote: Hi, I've got HTML page that contains + some content + div + button A click on button should create Ajax request and on success add GWT component to Div (replace it with the content that returned from server). I thought that when I add includes of GWT scripts to DOM, it would reload a GWT component. But it doesn't work correctly. Is there another way to do it? 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: Unique identifier
Hi, I would go with the HttpSession identifier, it should always be unique (something like 1 in 1 billion chance it will duplicate over a year). Also if I was going to add a log to do it, I would use the adligo i_log code (I'm partial I wrote it), but its already on in your Servlet api so assumeing your calling a rpc mehod somewhere. //something like... myRPC() { super.getThreadLocalRequest().getSession().getId(); } Cheers, Scott On May 6, 2:43 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hi! Seems good, but I still got the problem with the unique identifier, right? // Joakim -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Salvador Diaz Sent: Wednesday, May 06, 2009 4:46 PM To: Google Web Toolkit Subject: Re: Unique identifier You could use gwt-log:http://code.google.com/p/gwt-log/ with a RemoteLogger Hope that helps, Salvador On May 6, 4:33 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hi! Yes I know that, more or less what I want is some way to uniquely identify every time a user goes into my page. When they do that I want to put that into a database (for example time when they used my page) and in the end I want when they come to the end of my page (it's a form page) record the time when they were finished. And for that I need to have a unique identifier that I can use to update the database with. Hope this helps to explain more what I want. // Joakim -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Salvador Diaz Sent: Wednesday, May 06, 2009 4:16 PM To: Google Web Toolkit Subject: Re: Unique identifier What do you call a GWT instance ? Do you know that GWT applications are just HTML + js + servlets ? (servlets are the RPC implementations) On May 6, 12:53 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hello! I am trying to build a function that stores data about each GWT instance that is running in a database. Is there anyway way to get some sort of unique identifier from GWT in an easy way? I have looked some at session handling, is that the right way to go? Should I use the RPC functionality for this? Joakim Sjöberg Technical Consultant --~--~-~--~~~---~--~~ 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: Using GWT to produce pure JavaScript libraries
Hi, Thanks for the excellent and great looking widgets. Can you add something like Window.confirm() to the list of available components? Rgds Subendu On May 6, 11:11 am, Manuel Carrasco manuel.carrasc...@gmail.com wrote: I've released JsChismeshttp://code.google.com/p/gwtchismes/wiki/JsChismes_Documentationwhich is the result of exporting gwtchismes http://code.google.com/p/gwtchismes library code in order to populate its classes and methods into native javascript. The goal of this port is that the set of widgets can now be used directly in html pages without the need of knowing anything about gwt and java. So non-java developers (ruby, php ..) and designers can use the library in their pages with a little effort. I see several advantages in using GWT to produce javascript libraries: IDE, re-factoring, name-spaces, reusing code, debugging, testing, coverage tools, obfuscate, optimize, browser compatibility etc. and this technique is easier since Ray Cromwell's gwt-exporthttp://code.google.com/p/gwt-exporter/library makes it pretty simple. Manolo Carrasco --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Intergrating other GWT projects in eclipse
Hi all, I need a bit of help with the following. I am using the latest 1.6. GWT tools. I created a java project and created a new widget. I then exported the widget via eclipse to a jar file. At this point I then created a full GWT project and attempted to use the jar file in the project. I can not figure out how to use this jar file in my eclipse GWT project. I can make it an external jar file for eclipse and the eclipse env is happy. When I try to run the application from eclipse I get all sorts of errors. I added an inherits in the xml file for the jar file and also added the jar file to the run classpath. When I launched the program I always get that it can not find the jar file. How do you use a jar file from another project in a GWT 1.6 project. NOTE: I even tried moving the jar file to the war\WEB-INF\lib and this did not work. HELP HELP Thanks Donald W. Long --~--~-~--~~~---~--~~ 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: Intergrating other GWT projects in eclipse
If I am understanding your problem correctly, you are trying to inherit a module. This is what I did to inherit another module, when both projects are in my eclipse environment : Go to Project Properties Java Build Path Libraries Add External Class Folder Add source folder of your widget project. You could Add the widget project to refer the classes instead of creating and using a jar file. I hope it helps. On May 6, 5:41 pm, Donald.W.Long donald.w.l...@thelongsfamily.com wrote: Hi all, I need a bit of help with the following. I am using the latest 1.6. GWT tools. I created a java project and created a new widget. I then exported the widget via eclipse to a jar file. At this point I then created a full GWT project and attempted to use the jar file in the project. I can not figure out how to use this jar file in my eclipse GWT project. I can make it an external jar file for eclipse and the eclipse env is happy. When I try to run the application from eclipse I get all sorts of errors. I added an inherits in the xml file for the jar file and also added the jar file to the run classpath. When I launched the program I always get that it can not find the jar file. How do you use a jar file from another project in a GWT 1.6 project. NOTE: I even tried moving the jar file to the war\WEB-INF\lib and this did not work. HELP HELP Thanks Donald W. Long --~--~-~--~~~---~--~~ 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 load the Application again along with destroying the thread on cancel button press event?
Hi Sir, I m newbei for this forum. I have just strated learing GWT. I have 1 java application which is running at the Backend side in Different No. of threads. While i am going to put my GWT application in running state and try to cancel the process,my application at the Backend side is not going to be stopped ,becoz it has its own seperate threads and there is no control at the GWT RPC side to stop it even though i have used the threads destroy and stop methods.At last it is giving exception for the Thread destroy and stop method. Hoping that i have explained it properly and whom so ever reading this is getting, Can any body help me out from this problem and give some solution? please provide any valuable code snippet which can destroy the backend running threads and GWT can get back its control to the application load module part. Please provide any links or code... Thanking with you an anticipation 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: GWTCanvas, in a nested Grid == buggy shifts in x-coordinates in IE7. Workarounds?
I filed an issue with the GWT incubator project that reproduces this problem with a much simpler chunk of code (all you need is a single grid, no nesting required) than where I initially found it in the more complicated code: http://code.google.com/p/google-web-toolkit-incubator/issues/detail?id=275 Pretty sure it's a GWTCanvas bug. In the issue above I provide code to reproduce it and a workaround. John On May 6, 12:43 am, John Gunther johncurtisgunt...@yahoo.com wrote: I'm using a GWTCanvas widget inside of div inside of...inside of a Grid widget inside of another Grid widget inside of...etc. It all works just fine in Firefox. But in IE7 I'm finding that, unless I left-align the innermost Grid cell, the x-coordinates are getting mangled, shifting the stuff drawn inside the canvas (in this case, they are pie slices, but I have also seen it with rectangles in an earlier test with somewhat less nesting...but still with those same two nested Grids) along x inappropriately. Oddly, the canvas itself is positioned correctly, it is as if the drawn elements within it are dragged to the right-in some cases (right- aligned) entirely off the canvas, in others (center-aligned) seems about half-way. I'm seeing this within a complex nested DOM structure, have not yet tested if any old Grid cell would produce this problem. Other, similar, stuff, not nested in a Grid (but nested in divs only) renders just fine in both FF and IE, The outer Grid is hidden and the inner is visible, which is kind of an unusual combination and thus could have something to do with it, perhaps? Has anyone seen anything like this before? Any workarounds (nothing I've tried so far to beat this has worked). John --~--~-~--~~~---~--~~ 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: Calling a different HTML page
I implemented a much easier way of defining which default module to use while loading or compiling. Create a completely new .html .css file pointing to your other module and you can edit the eclipse .launch file by changing the line code stringAttribute key=org.eclipse.jdt.launching.PROGRAM_ARGUMENTS value=-out www GWTApp/GWTApp.html/ /code to the new .html file which loads the other module in the same project. code stringAttribute key=org.eclipse.jdt.launching.PROGRAM_ARGUMENTS value=-out www GWTAppNew/GWTAppNew.html/ /code Keep in mind to edit the new .html file and point it to the new module in the src value. code script type=text/javascript language=javascript src=GWTAppNew.nocache.js/script /code I implemented it and it works like a charm. I even have the second module called from the first module using a link. The only complex part comes while deploying, when you will have to compile both the modules separately and keep it in one war file (if deployed on tomcat). Hope this helps... Let me know if you need more help on it, but I recommend you first experiment it yourself. Vishesh.. On Wed, May 6, 2009 at 10:38 AM, Salvador Diaz diaz.salva...@gmail.comwrote: Google Web Toolkit 1.6.4 HostedMode [-noserver] [-port port-number | auto] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logLevel level] [- gen dir] [-style style] [-ea] [-server servletContainerLauncher] [- startupUrl url] [-war dir] [-extra dir] [-workDir dir] [-localWorkers count] module[s] where -noserver Prevents the embedded web server from running -port Specifies the TCP port for the embedded web server (defaults to ) -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL -gen The directory into which generated files will be written for review -style Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF) -eaDebugging: causes the compiled output to check assert statements. -serverSpecifies a different embedded web server to run (must implement ServletContainerLauncher) -startupUrlAutomatically launches the specified URL -war The war directory to write output files into (defaults to war) -extra The directory into which extra, non-deployed files will be written -workDir The compiler work directory (must be writeable; defaults to a system temp dir) -localWorkers Specifies the number of local workers to use when compiling permutations and module[s] Specifies the name(s) of the module(s) to host On May 6, 3:02 pm, harjit.singh harjit.si...@content-studios.com wrote: Thanks for the answer. When I have multiple modules and try to run the application. The GWT webserver asks me to choose a module to run. Is there any way to specify a default module to run when you have more than one module ? Thanks - Harjit On May 5, 8:20 pm, Vishesh visheshs...@gmail.com wrote: Try the code between the tags: code String lnk = GWT.getModuleBaseURL() + newPage.html?Parameter1= + parameter1 Parameter2= + parameter2; Window.open(lnk,New Window,); /code It will open a new window which can be a different module with its onw onModuleLoad() within the same project. Hope this helps.. Vish.. On Tue, May 5, 2009 at 6:26 PM, harjit.singh harjit.si...@content-studios.com wrote: Sumit, Thanks for the response. I did the way you described it using JSP. I have one more question on the same lines. how can I call another module from a link ? Thanks - Harjit On May 5, 2:53 pm, Sumit Chandel sumitchan...@google.com wrote: Hi Harjit, Assuming that you really need these windows to be actual native browser windows (and not simply popup panels, in which case you could use the PopupPanel class), and further assuming that the HTML in the new windows will need to be populated with some data from the server-side, here is a proposed solution. Let's say you want to have some link-styled text that can be clicked to create the new window. You could do this by creating an HTML snippet and adding a click handler to it. You would also need to style the HTML snippet to make it look like a link. In the click handler, you could make a callback to your server-side that could read in whatever data is passed in the call and generate an HTML page that will be served in the new window. Once the RPC completes, you can create a new window sourced to the generated HTML page in the onSuccess() method. Alternatively, you could pre-generated these pages in timed background
Eclipse Plugin of GWT ORM
Dreamsource ORM has been used in three major applications for over three years. It solves the following problems: 1. Whatever you codes happens in database. No merge 2. No detached enhanced object. 3. No lazy loading. Just eager loading because you can expect whatever you want during coding. 4. Easy to learn and use because it just mirrors SQL statements. 5. High performance compared to Hibernate 6. High productivity compared to Hibernate. 7. It can be used in GWT and any other frameworks without third party libraries. 8. It provides most demanding features in a small library. 9. It provides more flexible query feature than JPA 2.0. 10. Eclipse plugin to generate ORM code is available from http://www.gwtorm.com/products.jsp. Ten minutes evaluation will make big difference. You can find Spring and GWT examples from http://www.gwtorm.com/examples.jsp. Any feedback is appreciated. Jim Xie http://www.gwtorm.com http://code.google.com/p/dreamsource-orm/ --~--~-~--~~~---~--~~ 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: horizontal and vertical flow panels
Sudhir - why not post this idea to the GWT contributors forum as well - you might get some detailed answers/comments from there (http:// groups.google.se/group/Google-Web-Toolkit-Contributors). //Adam On 6 Maj, 18:56, Sudhir sudhi...@gmail.com wrote: I've made horizontal and vertical flow panels and put them up here: http://blog.sudhirj.com/2009/05/vertical-and-horizontal-flow-panels-i... Any idea why something like this isn't in GWT in the first place? It would be useful... The tables implementation seems very messy. Sudhir Jonathan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
SCRIPT elem to read JSON src does not work
There is a nice article on JSON over GWT. (Or is it GWT over JSON) http://code.google.com/support/bin/answer.py?answer=65632topic=11368 I don't understand the reason for callbacks to get JSON data as I could just code a RESTful URL for src. Therefore, I simply use the script tag: script src=json source from one of my servers/ But that is not the point. The point is the script element inserter codes shown in the article do not work. The article proposes two ways to insert a script element in GWT. Method 1: public void addScript_(String url) { Element e = DOM.createElement(script); DOM.setAttribute(e, language, JavaScript); DOM.setAttribute(e, src, url); DOM.appendChild(RootPanel.get().getElement(), e); } Method 2: public static native void addScript(String url) /*-{ var scr = document.createElement(script); scr.setAttribute(language, JavaScript); scr.setAttribute(src, url); document.getElementsByTagName(body)[0].appendChild(scr); }-*/; Method 1 uses GWT API while Method 2 uses native access. (I am still wondering what's native about javascript. I think it's because it's the only code escape directive allowed by java compiler). Anyway, the article says Method 1 would not work due to GWT generated code sitting in another iframe. Actually, Method 1 works only on Microsoft IE. It fails on Firefox, Chrome Safari. While Method 2 - the solution to relocate the json data to the proper window - does not work at all in any of the four browser brands. On GWT Eclipse hosted browser, method 1 (the supposed flawed method) works perfectly while method 2 (the supposed solution) does not work at all. Could someone advise how to properly insert a script element in GWT for the document to read RESTful json data? At least explain the possibilities why the methods worked/did not worked. Would be very much appreciated. I could know when it does not work because at the end of the json data, I have alert(jsondatasrc.member); --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Attach a widget to an element
I have a project using GWT which integrates with existing HTML. I want to be able to place widgets into the page by retrieving HTML elements with specific ID's and inserting the widget as a child. In 1.5 I just used: RootPanel.get(id).add(widget); However I found as many people did once upgrading to 1.6 that this isn't a good way as nested elements cause problems. So I'm trying to figure out how this should be done. Simple DOM manipulation gets the widget in the right place and displaying properly but doesn't setup any of its event handlers properly. I have two solutions at the moment, although neither are ideal: Solution 1: Add the widget to the root panel and then moves it via DOM manipulation to be a child of its hook element. RootPanel.get().add(widget); widget.getElement().getParentElement().removeChild(widget.getElement ()); DOM.getElementById(id).appendChild(widget.getElement()); Solution 2: Attach via DOM, fix events by calling onAttach via proxy class to get around onAttach being protected. DOM.getElementById(id).appendChild(w.getElement()); WidgetUtils.WidgetOnAttach(w); WidgetUtils Class: package com.google.gwt.user.client.ui; public class WidgetUtils { public static void WidgetOnAttach(Widget w) { w.onAttach(); } } Both these methods seem to work fine, have tried both by converting all my old 1.5 RootPanel.get(id).add(widget) calls to both of these methods under 1.6 and all tests have passed. However, both are somewhat of a hack and I seeing if there is a better way. --~--~-~--~~~---~--~~ 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] Re: I've implemented Java stack trace support for web mode
Hi Joel, thanks for the pointer! StackTraceCreator looks pretty cool, but I don't think there's any overlap with my work. If I understand correctly, when you're running code compiled with OBF it would give you a trace with elements like abc(), def(), ghi(). Here is what you get with my framework (actual output from an exception in an OBF'd app in running in web mode): java.lang.IllegalStateException: Should not reach this point StackTesterWidget.thirdMethod(StackTesterWidget.java:39) StackTesterWidget.secondMethod(StackTesterWidget.java:35) StackTesterWidget.firstMethod(StackTesterWidget.java:31) .onClick(StackTesterWidget.java:23) In my case this information doesn't come from the FF-Opera-etc-specific exception support. It's maintained separately from the browser. Alex On Tue, May 5, 2009 at 11:39 PM, Joel Webber j...@google.com wrote: Alex, Do check out com.google.gwt.core.client.impl.StackTraceCreator (in trunk). If I'm understanding your proposal correctly, there may be a great deal of overlap there. Cheers, joel. On Tue, May 5, 2009 at 6:47 PM, Alex Epshteyn alexander.epsht...@gmail.com wrote: Are there any new developments on this front in the core GWT code? The reason I ask is to be sure that I'm not duplicating your efforts and wasting my time. On Tue, May 5, 2009 at 4:31 PM, Alex Epshteyn alexander.epsht...@gmail.com wrote: I have a working implementation which produces stack traces representing the original Jave source code when Javascript exceptions occur in web mode. I plan to deploy this in production on my site, typeracer.com in my next release. I'd like to polish up my implementation over the next few weeks, measure performance, and present it at Google I/O at the end of the month. We've talked about adding similar features to the GWT compiler in the past on this forum, but my site couldn't wait (I was getting too many cryptic exceptions logged from users), so I decided to go ahead and do it my way. I ended up doing it externally to GWT, without any changes to the GWT compiler or any other code. Are there any new developments on this front in the core GWT code? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Add name to Anchor tag using GWT Anchor widget
On 5 mai, 17:49, Iyer aruniye...@gmail.com wrote: I am viewing the source on render of the jsp , infact full source, where in all the elements of anchor tag will eb updated except the name attribute of the anchor tag. say href, font for the hyperlink text but the name doesnt get updated. http://msdn.microsoft.com/en-us/library/ms534184(VS.85).aspx seems to indicate that prior to IE8, only form controls (except input type=radio) can have their name set dynamically (used for form submission). In most GWT apps (and more generally most JS apps), the window.location.hash is used to manage some kind of browsing history without navigating to another HTML page (it's even been blessed in HTML5 with the addition of the onhashchange event, already implemented in IE8 and in betas of most of the other browsers). This use conflicts with named anchors (and elements with ids, as it's the blessed way to link to specific sections of a page since HTML4), so those are rarely used in JS apps (though GWT isn't limited to those kind of apps). BTW, what's the reason for setting both @href and @name on an anchor? And the correct way to test this is to add a link to your named anchor and see if IE6 scrolls the page or not, not to use developer tools (or even elt.outerHTML/parent.innerHTML, which could be buggy too; IE's DOM is such a mess...) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: I've implemented Java stack trace support for web mode
@bob: Weren't you doing some work to produce map files automatically and get back a clean stack trace on the server? Is that something available in trunk? On Wed, May 6, 2009 at 4:28 AM, Alex Epshteyn alexander.epsht...@gmail.comwrote: Hi Joel, thanks for the pointer! StackTraceCreator looks pretty cool, but I don't think there's any overlap with my work. If I understand correctly, when you're running code compiled with OBF it would give you a trace with elements like abc(), def(), ghi(). Here is what you get with my framework (actual output from an exception in an OBF'd app in running in web mode): java.lang.IllegalStateException: Should not reach this point StackTesterWidget.thirdMethod(StackTesterWidget.java:39) StackTesterWidget.secondMethod(StackTesterWidget.java:35) StackTesterWidget.firstMethod(StackTesterWidget.java:31) .onClick(StackTesterWidget.java:23) In my case this information doesn't come from the FF-Opera-etc-specific exception support. It's maintained separately from the browser. Alex On Tue, May 5, 2009 at 11:39 PM, Joel Webber j...@google.com wrote: Alex, Do check out com.google.gwt.core.client.impl.StackTraceCreator (in trunk). If I'm understanding your proposal correctly, there may be a great deal of overlap there. Cheers, joel. On Tue, May 5, 2009 at 6:47 PM, Alex Epshteyn alexander.epsht...@gmail.com wrote: Are there any new developments on this front in the core GWT code? The reason I ask is to be sure that I'm not duplicating your efforts and wasting my time. On Tue, May 5, 2009 at 4:31 PM, Alex Epshteyn alexander.epsht...@gmail.com wrote: I have a working implementation which produces stack traces representing the original Jave source code when Javascript exceptions occur in web mode. I plan to deploy this in production on my site, typeracer.com in my next release. I'd like to polish up my implementation over the next few weeks, measure performance, and present it at Google I/O at the end of the month. We've talked about adding similar features to the GWT compiler in the past on this forum, but my site couldn't wait (I was getting too many cryptic exceptions logged from users), so I decided to go ahead and do it my way. I ended up doing it externally to GWT, without any changes to the GWT compiler or any other code. Are there any new developments on this front in the core GWT code? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: I've implemented Java stack trace support for web mode
On Wed, May 6, 2009 at 4:15 PM, Alex Epshteyn alexander.epsht...@gmail.com wrote: Yes, we discussed it some time ago. How is that coming along? The symbol maps are emitted into the -aux directory. @Alex, what technique are you using? -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] review request: make Window.Location use decodeComponent instead of decode
Hey Joel, Would you take a look at this patch, against the trunk at r5321, which switches Window.Location's decode methods to use URL.decodeComponent instead of just URL.decode? It also adds some testing in WindowTest to make sure the decoding goes as expected. This should fix issue 2941. Thanks! -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~--- Index: user/test/com/google/gwt/user/client/WindowTest.java === --- user/test/com/google/gwt/user/client/WindowTest.java (revision 5321) +++ user/test/com/google/gwt/user/client/WindowTest.java (working copy) @@ -116,6 +116,11 @@ assertEquals(map.get(d).get(0), d=d); assertEquals(map.get(f).get(0), 2); assertEquals(map.get(f).get(1), 1); + +// Values escaped with hex codes should work too. +map = Window.Location.buildListParamMap( +?foo=bar%20baz%3aqux); +assertEquals(map.get(foo).get(0), bar baz:qux); } /** Index: user/src/com/google/gwt/user/client/Window.java === --- user/src/com/google/gwt/user/client/Window.java (revision 5321) +++ user/src/com/google/gwt/user/client/Window.java (working copy) @@ -270,7 +270,7 @@ values = new ArrayListString(); out.put(kv[0], values); } - values.add(kv.length 1 ? URL.decode(kv[1]) : ); + values.add(kv.length 1 ? URL.decodeComponent(kv[1]) : ); } } @@ -292,7 +292,7 @@ for (String kvPair : qs.split()) { String[] kv = kvPair.split(=, 2); if (kv.length 1) { - paramMap.put(kv[0], URL.decode(kv[1])); + paramMap.put(kv[0], URL.decodeComponent(kv[1])); } else { paramMap.put(kv[0], ); }
[gwt-contrib] Re: I've implemented Java stack trace support for web mode
I'm using static code rewriting at the Java source level to maintain a virtual stack. It's actually working out very well so far. Getting surprisingly good results for code size, efficiency, and correctness. The symbol maps are emitted into the -aux directory. So compiling with the latest trunk will emit mappings from the OBF symbols to original Java symbols? I want to decide whether it's worth the effort to continue developing my system. So my questions are does StackTraceCreator work with all browsers and is your symbol translation system ready to be used? Are there any limitations with your approach? Perhaps there is some area where my technique could provide better information to the programmer? Thanks, Alex On Wed, May 6, 2009 at 4:22 PM, BobV b...@google.com wrote: On Wed, May 6, 2009 at 4:15 PM, Alex Epshteyn alexander.epsht...@gmail.com wrote: Yes, we discussed it some time ago. How is that coming along? The symbol maps are emitted into the -aux directory. @Alex, what technique are you using? -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: review request: make Window.Location use decodeComponent instead of decode
LGTM, thanks. On Wed, May 6, 2009 at 4:24 PM, Alex Rudnick a...@google.com wrote: Hey Joel, Would you take a look at this patch, against the trunk at r5321, which switches Window.Location's decode methods to use URL.decodeComponent instead of just URL.decode? It also adds some testing in WindowTest to make sure the decoding goes as expected. This should fix issue 2941. Thanks! -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: review request: make Window.Location use decodeComponent instead of decode
Great! Committed r5322. On Wed, May 6, 2009 at 5:32 PM, Joel Webber j...@google.com wrote: LGTM, thanks. On Wed, May 6, 2009 at 4:24 PM, Alex Rudnick a...@google.com wrote: Hey Joel, Would you take a look at this patch, against the trunk at r5321, which switches Window.Location's decode methods to use URL.decodeComponent instead of just URL.decode? It also adds some testing in WindowTest to make sure the decoding goes as expected. This should fix issue 2941. Thanks! -- Alex Rudnick swe, gwt, atl -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---