Re: RPC Issues - Lifespan of Data from a RPC
I was wondering if anyone knows of a way to run a function after the RPC is complete. The completion of a RPC call is signaled by the call to the onSuccess method of the asyncCallback you pass to the RPC as the last argument. So how does this answer your question ? Let's take a concrete example. Let's say you call your rpc in the following way: code myRPCAsyncInstance.myMethodCall(parameter1, parameter2, ..., parameterN, myCallback); /code This is how you would implement your callback to call a method call doSomethingWhenRpcIsFinished: code AsyncCallbackMyReturnObject myCallback = new AsyncCallbackMyReturnObject(){ //This is the method called when the RPC call failed public void onFailure(Throwable t){ GWT.log(RPC failed); } //This is the method called when the RPC finished successfully public void onSuccess(MyReturnObject result){ doSomethingWhenRpcIsFinished(); } }; /code Hope that helps, Salvador On May 15, 10:52 pm, JohnofLong johnlonganec...@gmail.com wrote: Thank you for your input, what was happening is once the RPC was complete the data that I was adding to the ArrayList would disappear. So I decided to do something ugly, but it works. I am writing the data onto a invisible div on the page then getting it then adding it to the ArrayList. It seems to work just fine. I am new to GWT but I am starting to get a basic understanding on how these things work. I was wondering if anyone knows of a way to run a function after the RPC is complete. Thanks! John On May 9, 7:44 am, Salvador Diaz diaz.salva...@gmail.com wrote: Well, the indexOutOfBoundsException can't possibly be thrown by the method add of an ArrayList (that's the type of productArrayList, isn't it?). In fact there's nothing in your snippets that'll throw that exception. Did you debug the method call on the server side ? Somewhere in your Eclipse or HostedMode console you'll have a complete stack trace that'll tell you the exact line of code that's throwing that exception. I suggest you read it carefully. As for the lifecycle of your RPCs, it is the normal lifecycle of a servlet. Hope that helps, Salvador On May 8, 10:46 pm, JohnofLong johnlonganec...@gmail.com wrote: I tried to find this topic already on the discussions but could not find it. Currently using GWT 1.5.3 I am making a RPC to call to read XML and call a function that loads the data into an ArrayList of classes. I have made a class that implements RequestCallback(LoadData) and takes in my mainClass example: LoadData loadData = new LoadData(this); String url = xmlString; RequestBuilder requestBuilder = new RequestBuilder (RequestBuilder.GET, url); try { requestBuilder.sendRequest(null, loadData); } catch (RequestException ex) { //Window.alert(exception); } Inside the RPC class: mainClass.addProducts(id, sku, name, catagory) ; inside my main class: public addProducts(int id, int sku, String name, String catagory) { productArrayList.add(new product(id, sku, name, catagory); } But when I call a method on my productArray it just says index out of bound (basically the arrayList is empty) but I know it is calling the addProduct method I am guessing the lifespan of the data is tied to the lifespan of the RPC call. What sort of things can I do to get around this(assuming my assumptions are correct)? I greatly appreciate the help and apologize if this topic is covered somewhere already. --~--~-~--~~~---~--~~ You received 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: Failed to import and run gwtrpc-spring example with Google plugin
Hi, [WARN] failed com.google.gwt.dev.shell.jetty.jettylauncher$webappcontextwithrel...@dc926f {/,C:\Personal\Project\GwtRpcSpringExample\war} java.lang.UnsupportedClassVersionError: Bad version number in .class file This exception can occur when the source is built targeting a JDK that is not supported by the JDK attempting to run it. In the above example, if the servlet was built targeting only JDK 1.5, but the web server runs JDK 1.4, the above exception will occur. So check that you're using the same jdk to compile and to launch hosted mode and also try cleaning your project before launching the hosted mode (Project Clean ...). Hope that helps, Salvador On May 16, 12:52 am, hezjing hezj...@gmail.com wrote: Hi Miguel The following are the first few messages copied from the GWT Hosted Mode main window: [INFO] Starting Jetty on port 8080 [INFO] jetty-6.1.x [INFO] Initializing Spring root WebApplicationContext [WARN] failed dispatcher java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:321) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:233) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:414) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:478) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397) at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) [WARN] failed com.google.gwt.dev.shell.jetty.jettylauncher$webappcontextwithrel...@dc926f {/,C:\Personal\Project\GwtRpcSpringExample\war} java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:321) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:233) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at
Re: DisclosurePanel not working properly in Firefox
Can you post some code ? (Preferably to something like pastebin or snipplr) It's hard to tell what's going on without code. For what is worth, I don't think it's a DisclosurePanel bug. Cheers, Salvador On May 16, 2:47 pm, Nim chaudhary.nim...@gmail.com wrote: Hi All, I m using DisclosurePanel and setting some text on it.But when i click on it ,other text field in same widget become blank ,and once i close DisclosurePanel text field get populated again. Its working fine with IE Please help me out,thanks in advance. --Nimish --~--~-~--~~~---~--~~ You received 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: History implementation and Kitchen sink example
Hi imgnik, HistoryListener (the class that contained the onHistoryChanged method) is deprecated as of GWT 1.6.4, the new event system introduced the new ValueChangeHandler and its onValueChanged method, which do the same thing. Take a look at line 211 of Showcase.java, that's where you'll find the history management implementation. Hope that helps, Salvador On May 16, 7:39 pm, imgnik ytbr...@gmail.com wrote: and one more thing, i cannot find the onHistoryChanged in the showcase app. why is this so ? and why is it not needed? On May 16, 6:45 pm, imgnik ytbr...@gmail.com wrote: I don't understand how did the History.fireCurrentHistoryState() works. when i press the back button what actually happen? can someone advise me ? On May 16, 12:32 pm, 0710 ytbr...@gmail.com wrote: Isee! thanks sumit. will check it out the showcase! On May 13, 7:05 pm, Sumit Chandel sumitchan...@google.com wrote: Hiimgnik, That's right, the Mail sample application doesn't support history, however, the Showcase sample application, as mentioned in my last post, does. You can find the online Showcase sample application demo here:http://gwt.google.com/samples/Showcase/Showcase.html The source code for the application will be in the samples/ directory of your GWT distribution. Hope that helps, -Sumit Chandel On Wed, May 13, 2009 at 6:31 AM,imgnikytbr...@gmail.com wrote: i mean the online demo herehttp://gwt.google.com/samples/Mail/Mail.html On May 13, 3:26 pm,imgnikytbr...@gmail.com wrote: Thank you for your reply Sumit. I check out the Mailbox app. Tried the online demo here but it doesn't seems to have history management as stated. I tried looking for the history class in mailbox source code but cannot find. did anyone else have this problem? regardsytbryan On May 12, 1:01 am, Sumit Chandel sumitchan...@google.com wrote: Hiytbryan, The KitchenSink sample application, previously used in GWT 1.4 and prior to showcase the GWT widgets, has been replaced by the more appropriately named Showcase sample application that serves the same purpose. You should be able to find the Showcase sample application in your GWT distribution, which also supports browser history. If the Showcase sample application isn't enough to get you started on the History implementation for your application, please feel free to post up about any difficulties you encounter on the forum. Hope that helps, -Sumit Chandel On Fri, May 8, 2009 at 7:49 AM,ytbryanytbr...@gmail.com wrote: hi all, I have problem implementing history on my gwt application. i wanted to download thekitchensink but cannot find it in the website or the gwt distribution. can someone kindly give me the link to download the source code? many 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: how to make gwt eclipse plugin compiler see other projects
Hi Tim, But then I can't choose the package name I want, correct? No, you're wrong, you can choose whatever package name you want, as long as you specify in your module definition which one it is. Read the following section of the developer's guide: http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModuleXml And take a look at the 3rd bullet point of the section called XML Element reference Hope that helps, Salvador On May 16, 10:16 pm, Tim McCormack ti...@ccs.neu.edu wrote: On May 15, 9:15 pm, Donald.W.Long donald.w.l...@thelongsfamily.com wrote: First lets look at the depent project. You must create this project as a GWT project. But then I can't choose the package name I want, correct? It'll be something.client, right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: @gwt.TypeArgs gwt 1.6 specification documentation
Dear BlessedGeek, The requirements should be quite clear to any java developer (unless said developer is completely unaware of all of the post 1.4 jdk enhancements). When the documentation says: In GWT 1.5, @gwt.typeArgs annotations have been deprecated in favor of parameterized types you should understand that instead of declaring a method this way: code /** * This field is a Set that must always contain Strings. * * @gwt.typeArgs java.lang.String */ public Set setOfStrings; /code You should declare it like this: code /** * This field is a parameterised Set. * */ public SetString setOfStrings; /code unbelievably and unacceptably give examples on how to use @gwt.TypeArgs using the pre-1.5 patterns. Well, it is neither unbelievably nor unacceptable, as sometimes you just can't declare parameterised variable and in those cases it's still helpful to know how to use @gwt.typeargs Cheers, Salvador On May 17, 12:58 am, Blessed Geek blessedg...@gmail.com wrote: Dear GWT team, This may seem trivial but I think even if it is worth just a paragraph or two, you should document the new requirements rather than just referring to unlike pre-gwt1.5, you have to used parameterised types in blogs and discussions. Having proper documentation makes it professional too. I find it difficult to ascertain the precise requirement when I have to google- search for @gwt.TypeArgs gwt 1.6 specification and finding none but some heresay/heresy from blogs and discussions. Even your what's new says: @gwt.TypeArgs pre-1.5 has been deprecated but unbelievably and unacceptably give examples on how to use @gwt.TypeArgs using the pre-1.5 patterns. --~--~-~--~~~---~--~~ You received 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: To deploy GWT1.6 app on my own local web server issue
Is your web server's documents path pointing to where myAPP.html is? If it isn't then there is no way your browser can display that file. Ian http://examples.roughian.com 2009/5/17 bencoder zwj...@gmail.com Dear all I use EasyPHP, a kind of WAMP, to build my own local server (http:// localhost:80/). Then, I create a application using Eclipse with GWT1.6 plug at localhost/myAPP directory. This application, myAPP, needs to request JSON data from json.php file which locates at localhost/json directory. I think I have to disable the embedded Tomcat server. Hence, I open Run-Open Run Dialog... in Eclipse, and add -noserver and -port 80 in Program arguments on Argrments tab. After that, I run the app in host mode. But there is nothing to appear, i.e. the http://localhost/myAPP.html is NOT found. I have tried to add -startupUrl /myAPP.html in Program arguments, the problem is still here. Do any flags that I missed need to be added in Program arguments? BR, bencoder --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Cleaning GWT project with Google plugin
Hi To clean a GWT project created by webAppCreator, the Ant will delete the following directories:myproject\war\WEB-INF\classes myproject\war\myproject In Eclipse 3.4.2, I tried Project - Clean ... but both the directories are not deleted. How do we clean a GWT project created by Google plugin? -- 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 -~--~~~~--~~--~--~---
Re: Cleaning GWT project with Google plugin
The myproject\war\WEB-INF\classes directory is in fact deleted by Eclipse. When you clean a project with Eclipse, it has to be recompiled, so Eclipse immediately recreates that directory and puts freshly compiled classes in it. As for the myproject\war\myproject, Eclipse doesn't know it has to be cleaned so it doesn't touch it. Normally you can delete it manually, as it is created by the GWT Hosted Mode each time you launch it. Cheers, Salvador On May 17, 2:24 pm, hezjing hezj...@gmail.com wrote: Hi To clean a GWT project created by webAppCreator, the Ant will delete the following directories:myproject\war\WEB-INF\classes myproject\war\myproject In Eclipse 3.4.2, I tried Project - Clean ... but both the directories are not deleted. How do we clean a GWT project created by Google plugin? -- 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 -~--~~~~--~~--~--~---
Re: Failed to import and run gwtrpc-spring example with Google plugin
Hi The problem still exist after I manually deleted both myproject/war/myproject and myproject/war/WEB-INF/classes directories. I have JDK 1.5 and JRE 1.5 and 1.6 installed on my Windows: C:\Program Files\Java\jdk1.5.0_18 (JAVA_HOME) C:\Program Files\Java\jre1.5.0_18 C:\Program Files\Java\jre6 I'm using JDK 1.5 for development, and jre1.5.0_18 is the only Installed JRE configured in Eclipse. The JRE 1.6 is merely used for Google Chrome. Can I safely tell that all Eclipse, GWT and Jetty are running on Java 1.5? On Sun, May 17, 2009 at 6:04 PM, Salvador Diaz diaz.salva...@gmail.comwrote: Hi, [WARN] failed com.google.gwt.dev.shell.jetty.jettylauncher$webappcontextwithrel...@dc926f {/,C:\Personal\Project\GwtRpcSpringExample\war} java.lang.UnsupportedClassVersionError: Bad version number in .class file This exception can occur when the source is built targeting a JDK that is not supported by the JDK attempting to run it. In the above example, if the servlet was built targeting only JDK 1.5, but the web server runs JDK 1.4, the above exception will occur. So check that you're using the same jdk to compile and to launch hosted mode and also try cleaning your project before launching the hosted mode (Project Clean ...). Hope that helps, Salvador On May 16, 12:52 am, hezjing hezj...@gmail.com wrote: Hi Miguel The following are the first few messages copied from the GWT Hosted Mode main window: [INFO] Starting Jetty on port 8080 [INFO] jetty-6.1.x [INFO] Initializing Spring root WebApplicationContext [WARN] failed dispatcher java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:321) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:233) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:414) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:478) at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397) at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) [WARN] failed com.google.gwt.dev.shell.jetty.jettylauncher$webappcontextwithrel...@dc926f {/,C:\Personal\Project\GwtRpcSpringExample\war} java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:321)
How to replace MouserListener in GWT 1.6
I imported an GWT 1.5 app for transforming it to a GWT 1.6 app. Every listener is now marked as deprecated, so i'm currently replacing all these. Anyway i do not know how to replace my MouseListener implementations. Concretly speaking i use the folling implementations public void onMouseEnter(Widget sender) { //..do s.th. here } public void onMouseLeave(Widget sender) { //..do s.th. here } that are demanded by the MouseListener interface. But i have not figured out yet how to replace these with the new handler interfaces. Does somebody know how to accomplish this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Simple Example using event handlers, Google App Engine, Integrated Google Analytics
This is a simple GWT application using addClickHandler, addChangeHandler and Integrated Google Analytics. Demo - http://gwtexample.appspot.com/ - This application demo is deployed on the Google App Engine. SVN Source - http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/gwt_handler_example/src/com/gawkat/gwt/example_handler/client%3Fstate%3Dclosed Notes: (check out the svn source for more code) I really like the new event system. This simple example only uses a small potential of the event system. Its much easier to observe events. It was harder to understand at first, but its much easier to understand once learned. Its well worth the change from listeners! Something to note if you want to fire a change event. private void fireChange() { NativeEvent nativeEvent = Document.get().createChangeEvent(); ChangeEvent.fireNativeEvent(nativeEvent, this); } Instead of adding listeners you register handlers. /** * when firing a change event, this handler is used */ public HandlerRegistration addChangeHandler(ChangeHandler handler) { return addDomHandler(handler, ChangeEvent.getType()); } /** * allows for observing click events on the entire widget */ public HandlerRegistration addClickHandler(ClickHandler handler) { return addDomHandler(handler, ClickEvent.getType()); } --~--~-~--~~~---~--~~ You received 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 replace MouserListener in GWT 1.6
onMouseLeave: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/dom/client/MouseOutHandler.html onMouseEnter (I don't know which so you'll have to try them out): http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/dom/client/MouseOverHandler.html or http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/dom/client/MouseUpEvent.html Hope that helps, Salvador On May 17, 7:00 pm, Paul van Hoven paul.van.ho...@googlemail.com wrote: I imported an GWT 1.5 app for transforming it to a GWT 1.6 app. Every listener is now marked as deprecated, so i'm currently replacing all these. Anyway i do not know how to replace my MouseListener implementations. Concretly speaking i use the folling implementations public void onMouseEnter(Widget sender) { //..do s.th. here } public void onMouseLeave(Widget sender) { //..do s.th. here } that are demanded by the MouseListener interface. But i have not figured out yet how to replace these with the new handler interfaces. Does somebody know how to accomplish this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Social Collaboration Through Application State Reference
My beginning thoughts about Collaboration through links: http://codintips.blogspot.com/2009/05/social-collaboration-through.html The question is, whats the best way to reference the entire applications current state through a link? Of course, putting all the parameters into the link is the answer, but is that really the best way? An application has so many widgets and widgets that have widgets with different parameters that make the view of entire application, which wouldn't be pragmatic to set every parameter into a the link. I'd like to think there is a better way to link into the applications current state. Why do I ask this. Because, I like to send a link of the current applications state/view, to someone else so we can start from that point and collaborate on what we are seeing. I thought I would mention this to create conversation on this topic. I haven't actually thought to deeply into how I would implement this over an entire application. I will have to get adjusted into the new event system before I approach this. Something to chew on. Brandon http://gwt-examples.googlecode.com --~--~-~--~~~---~--~~ You received 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: Cleaning GWT project with Google plugin
Hi Salvador On Sun, May 17, 2009 at 9:14 PM, Salvador Diaz diaz.salva...@gmail.comwrote: The myproject\war\WEB-INF\classes directory is in fact deleted by Eclipse. When you clean a project with Eclipse, it has to be recompiled, so Eclipse immediately recreates that directory and puts freshly compiled classes in it. You're right, the myproject\war\WEB-INF\classes is indeed re-created by Eclipse. This is observed in Windows Explorer, but the new classes folder is never be shown in Eclipse anymore. As for the myproject\war\myproject, Eclipse doesn't know it has to be cleaned so it doesn't touch it. Normally you can delete it manually, as it is created by the GWT Hosted Mode each time you launch it. It would be very nice if Google plugin can clean these directories too :D Thanks for your advice! -- 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 -~--~~~~--~~--~--~---
[gwt-contrib] Re: gwt TRUNK seems to be to restrictive for what GWT.create can return
I am checking out the new gwt query code now. I was using a custom patched version of gwtquery 0.3 http://code.google.com/p/gwtquery/issues/detail?id=5can=4 So I will just have to re-do this patch before I can continue. Kind Regards Cameron 2009/5/17 Ray Cromwell cromwell...@gmail.com Cameron, Did you check out a recent version of GQuery? I've been checking in a lot of changes recently because I've revamped it for Google I/O re-release. It now implements about 98% of all jQuery functions. I've haven't looked at the older rebind rules, but there should be a fall-thru for non-matched browers to SelectorEngineImplJS. But John could be right, it could be that the fall-thru isn't working and IE8 is resolving to no binding. -Ray On Sat, May 16, 2009 at 7:41 PM, Cameron Braid came...@braid.com.au wrote: I am tryng gwt trunk r5406 and have run into issues with GWT's rebinding. here are some errors from my different modules : [java][ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/gwtquery/gwtquery/0.3-a/gwtquery-0.3-a.jar!/gwtquery/client/SelectorEngine.java' [java] [ERROR] Line 20: Rebind result 'gwtquery.client.impl.SelectorEngineImpl' cannot be abstract [java][ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/com/google/gwt/incubator/gwt-incubator/r1539/gwt-incubator-r1539.jar!/com/google/gwt/gen2/logging/impl/client/ClientConsoleLogHandlerImpl.java' [java] [ERROR] Line 206: Rebind result 'com.google.gwt.gen2.logging.impl.client.ClientConsoleLogHandlerImpl.Impl' must be a class [java][ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/com/extjs/gxt/1.2.2-r1236/gxt-1.2.2-r1236.jar!/com/extjs/gxt/ui/client/widget/form/NumberPropertyEditor.java' [java] [ERROR] Line 29: Rebind result 'com.google.gwt.i18n.client.constants.NumberConstants' must be a class These errors didn't occur using an older GWT trunk version r4619 Cheers Cameron --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: gwt TRUNK seems to be to restrictive for what GWT.create can return
Thanks for the fast reply, and the explanation. Kind Regards Cameron 2009/5/17 John Tamplin j...@google.com On Sat, May 16, 2009 at 10:41 PM, Cameron Braid came...@braid.com.auwrote: I am tryng gwt trunk r5406 and have run into issues with GWT's rebinding. here are some errors from my different modules : [java][ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/gwtquery/gwtquery/0.3-a/gwtquery-0.3-a.jar!/gwtquery/client/SelectorEngine.java' [java] [ERROR] Line 20: Rebind result 'gwtquery.client.impl.SelectorEngineImpl' cannot be abstract [java][ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/com/google/gwt/incubator/gwt-incubator/r1539/gwt-incubator-r1539.jar!/com/google/gwt/gen2/logging/impl/client/ClientConsoleLogHandlerImpl.java' [java] [ERROR] Line 206: Rebind result 'com.google.gwt.gen2.logging.impl.client.ClientConsoleLogHandlerImpl.Impl' must be a class [java][ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/com/extjs/gxt/1.2.2-r1236/gxt-1.2.2-r1236.jar!/com/extjs/gxt/ui/client/widget/form/NumberPropertyEditor.java' [java] [ERROR] Line 29: Rebind result 'com.google.gwt.i18n.client.constants.NumberConstants' must be a class These errors didn't occur using an older GWT trunk version r4619 The first two are probably running into the IE8 changes (where you need the ie8 deferred binding rules for user.agent-sensitive bindings). The NumberConstants change was due to adding runtime locales support, and you should no longer be GWT.create'ing it, but instead use LocaleInfo.getCurrentLocale().getNumberConstants(). If you really must do GWT.create, you can use NumberConstantsImpl but that is an implementation class and may change, and you will lose the ability to use runtime locales. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: gwt TRUNK seems to be to restrictive for what GWT.create can return
Ok, i'll check out the patch. I suspect after Google I/O that the # of users/contributors will go up a lot, and things will be supported a lot better, -Ray On Sun, May 17, 2009 at 2:28 AM, Cameron Braid came...@braid.com.au wrote: I am checking out the new gwt query code now. I was using a custom patched version of gwtquery 0.3 http://code.google.com/p/gwtquery/issues/detail?id=5can=4 So I will just have to re-do this patch before I can continue. Kind Regards Cameron 2009/5/17 Ray Cromwell cromwell...@gmail.com Cameron, Did you check out a recent version of GQuery? I've been checking in a lot of changes recently because I've revamped it for Google I/O re-release. It now implements about 98% of all jQuery functions. I've haven't looked at the older rebind rules, but there should be a fall-thru for non-matched browers to SelectorEngineImplJS. But John could be right, it could be that the fall-thru isn't working and IE8 is resolving to no binding. -Ray On Sat, May 16, 2009 at 7:41 PM, Cameron Braid came...@braid.com.au wrote: I am tryng gwt trunk r5406 and have run into issues with GWT's rebinding. here are some errors from my different modules : [java] [ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/gwtquery/gwtquery/0.3-a/gwtquery-0.3-a.jar!/gwtquery/client/SelectorEngine.java' [java] [ERROR] Line 20: Rebind result 'gwtquery.client.impl.SelectorEngineImpl' cannot be abstract [java] [ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/com/google/gwt/incubator/gwt-incubator/r1539/gwt-incubator-r1539.jar!/com/google/gwt/gen2/logging/impl/client/ClientConsoleLogHandlerImpl.java' [java] [ERROR] Line 206: Rebind result 'com.google.gwt.gen2.logging.impl.client.ClientConsoleLogHandlerImpl.Impl' must be a class [java] [ERROR] Errors in 'jar:file:/media/home/cameronbraid/.m2/repository/com/extjs/gxt/1.2.2-r1236/gxt-1.2.2-r1236.jar!/com/extjs/gxt/ui/client/widget/form/NumberPropertyEditor.java' [java] [ERROR] Line 29: Rebind result 'com.google.gwt.i18n.client.constants.NumberConstants' must be a class These errors didn't occur using an older GWT trunk version r4619 Cheers Cameron --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---