Re: BST Player 1.1 released
Looks very good, thank you !! Oscar On Feb 9, 1:40 pm, sbraheem sbrah...@gmail.com wrote: Hello, I am pleased to announce the release of BST Player API 1.1 - (http:// oss.bramosystems.com/bst-player). The API exposes WMP, QT, Flash, VLC media player plugins as regular GWT widgets. This is a major release with new features and numerous enhancements including: * NativePlayer widget to embed media using HTML 5 video elements. * YouTubePlayer widget to add YouTube videos in GWT apps * GWT 2.0's UiBinder support * Introduces a module to export the player widgets as Javascript object in non-GWT apps * Matrix transformation feature support * Support for Mouse and Keyboard event handlers * and more ... The updated showcase application [...@http://oss.bramosystems.com/bst-player/demo/showcase/index.html] has been tested on Firefox 3.0/3.5, Internet Explorer 7/8, Safari 4 and Chrome 4. As always, your feedback is highly appreciated. Kind regards. Sikiru Braheem. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to place url link in gwt Label
Hi, I have a label that contains some text and part of it must link: For example the whole Label text is : bla bla bla. Reference:link, bla bla bla. I tried : Reference : a href=http://www.google.com;Help Desk/a But gwt doesn't detect it as url, may be i should use HTML? Regards. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Rounded Corner In Gwt Button
For my custom buttons i use Flex Table with 1 row and 3 columns: left, repeat and right, where left and right are images with rounded corners and repeat is 1px width image that is repeated. I also have predefined styles that are placed in enum. The only problem here is that my images are not in bundle, but it can easily be done with bundle. At the and is the css. Here is an example: public class ImageButton extends FlexTable { public enum Style { HEADER, TABLE_CLOSE; private static String fromEnum(Style i) { switch (i) { case HEADER: return header-image-button; case TABLE_CLOSE: return table-close-image-button; default: return header-image-button; } } } private final HTML left = new HTML(); private final HTML middle = new HTML(); private final HTML right = new HTML(); private final CellFormatter cf = getCellFormatter(); public ImageButton(String title, Style style) { this(style); middle.setText(title); } public ImageButton(Style style) { // make all flex table cells like one this.setBorderWidth(0); this.setCellPadding(0); this.setCellSpacing(0); this.setWidget(0, 0, left); // cf.setWidth(0, 0, 6px); this.setWidget(0, 1, middle); middle.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); cf.setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_MIDDLE); cf.setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_CENTER); this.setWidget(0, 2, right); // cf.setWidth(0, 2, 7px); setOverridenStyleName(style); } private void setOverridenStyleName(Style style) { super.setStyleName(Style.fromEnum(style)); switch (style) { case HEADER: setLeftStyleName(bg-left); setRightStyleName(bg-right); setMiddleStyleName(bg-repeat); break; case TABLE_CLOSE: setLeftStyleName(left-table-close-button); setRightStyleName(right-table-close-button); setMiddleStyleName(repeat-table-close-button); break; } } public void setLeftStyleName(String style) { cf.setStyleName(0, 0, style); } public void setMiddleStyleName(String style) { cf.setStyleName(0, 1, style); } public void setRightStyleName(String style) { cf.setStyleName(0, 2, style); } @Override public void setTitle(String title) { middle.setText(title); } @Override public String getTitle() { return middle.getText(); } public void setEnabled(boolean enabled) { DOM.setElementPropertyBoolean(getElement(), disabled, !enabled); if (enabled) { this.removeStyleName(disabled-button); } else { this.addStyleName(disabled-button); } } public boolean isEnabled() { return !DOM.getElementPropertyBoolean(getElement(), disabled); } } CSS: bg-left { background-image: url(left.gif); background-repeat: no-repeat; } .bg-repeat { background-image: url(repeat.gif); background-repeat: repeat-x; } .bg-right { background-image: url(right.gif); background-repeat: no-repeat; } USE IT: ImageButton b1 = new ImageButton(Style.HEADER); Hope this help. On Wed, Feb 10, 2010 at 12:19 PM, pavi praveen.ojh...@gmail.com wrote: Hi all, I am try to make round corner using css But I am not able to do rounded corner. My css style is: .box { background-image: url(/images/nw.gif), url(/images/ne.gif), url(/ images/sw.gif), url(/images/se.gif); background-repeat: no-repeat, no-repeat, no-repeat, no-repeat; } please 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: RootPanel.get().clear() does not clear the page
On Feb 10, 8:49 am, go canal goca...@yahoo.com wrote: Hi, Thanks for your reply. I have not tested but I think getElement().setInnerHTML will work. First, I thought that I can juse use RootPanel.get().clear() to remove everything on the current page; then I hope I can use something like RootPanel.get(id).clear() if I have sometign like this in my html file: div id=id/div But it does not work.. So looks like I need to use setInnerHTML. You should really use the clear() method of your different RootPanels, or you'll leak memory (until the user leaves the page and/or closes his browser window/tab). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: java.io.Serializable not accepted for serialization
Yes it is. Meanwhile We've found the source of problems. We have a dispatcher servlet so that we don't need to register our services in the web.xml file. The code for this servlet was probably taken from an example that was using an old version of GWT that didn't need to pass the SerializationPolicy and SerializationPolicyProvider to the RPC methods. Now the problem is solved. Thanks the same for your help. Andrea On Feb 10, 6:58 am, rjcarr rjc...@gmail.com wrote: Are you sure that the class that you want to serialize (implements Serializable) is within your gwt module package? On Feb 9, 2:25 am, Andrea Polci apo...@gmail.com wrote: Whenever I try to use in my services a class that implements java.io.Serializable and not IsSerializable I get the following runtime error: com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: Type 'com.extjs.gxt.ui.client.data.BaseModel' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer. For security purposes, this type will not be deserialized. I'm using GWT 2.0.1 so Serializable should be supported. I get no compile-time error. The serialization policy file seems to be deployed correctly and contains the class that cannot be deserialized (in the example above com.extjs.gxt.ui.client.data.BaseModel). I checked that I have the right version of gwt-servlet.jar. I don't know what else to try, can someone help me? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to place url link in gwt Label
You can use Html object to make your Label. Philippe On 10 fév, 11:45, mariyan nenchev nenchev.mari...@gmail.com wrote: Hi, I have a label that contains some text and part of it must link: For example the whole Label text is : bla bla bla. Reference:link, bla bla bla. I tried : Reference : a href=http://www.google.com;Help Desk/a But gwt doesn't detect it as url, may be i should use HTML? Regards. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: can not set breakpoint
that's the problem you are missing the ?gwt.codesvr=localhost:9997 from the URL, all the urls need to have that so that your application will comunicate with the eclipse so you'll be able to debug i think that's specified somewhere in the docs. also if you don't have ?gwt.codesvr=localhost:9997 on the url, you won't see the client modfications if you refresh the browser. cheers, take a glance on the documentation for development mode On Feb 10, 9:50 am, go canal goca...@yahoo.com wrote: it ishttp://127.0.0.1:/ rgds, canal From: Jason Parekh jasonpar...@gmail.com To: google-web-toolkit@googlegroups.com Sent: Tue, February 9, 2010 11:38:47 PM Subject: Re: can not set breakpoint Hi Canal, Which URL is your browser pointing at? jason On Mon, Feb 8, 2010 at 8:51 PM, go canal goca...@yahoo.com wrote: I have upgraded JDK to 1.6u18. tried the default project greetService, still the same. rgds, canal From: Jason Parekh jasonpar...@gmail.com To: google-web-toolkit@googlegroups.com Sent: Mon, February 8, 2010 11:34:43 PM Subject: Re: can not set breakpoint Hi Canal, What version of Java are you running? Could you try on a simple project (perhaps the default app created by the wizard)? I'm assuming the breakpoints do not show the checkmark on top of them (when the debugger is connected)? jason On Sun, Feb 7, 2010 at 8:05 PM, canal goca...@yahoo.com wrote: hi, searched the group but still can not make it work - can not set breakpoint in the client code i am using Eclipse 3.5, GWT 2.0.1, with plugin. Chrome; I can not set any breakpoint in the client code - not in the callback, not in the OnModuleLoad. Server code is ok. thanks canal -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to place url link in gwt Label
guess what ... you are right :D On Feb 10, 12:45 pm, mariyan nenchev nenchev.mari...@gmail.com wrote: Hi, I have a label that contains some text and part of it must link: For example the whole Label text is : bla bla bla. Reference:link, bla bla bla. I tried : Reference : a href=http://www.google.com;Help Desk/a But gwt doesn't detect it as url, may be i should use HTML? Regards. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Not able to use External Jar file for DB connection
what JDK do you use ? JDBC4 driver should be used only starting with JDK 1.6, acording to the postgresql site : JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The driver builds, but the majority of new methods are stubbed out. maybe you will consider in using the JDBC3 version in my apps, i put the jar in the war\WEB-INF\lib folder, and the using eclipse I add it to the build path but one more thing ... i just noticed ... why do you have the appengine in a application that will use an normal SGBD ? if i recall well, using appengine you won't be able to connect to the database any way hope any of this helps cheers On Feb 9, 11:24 am, vinod M vinod@gmail.com wrote: HI, Can anyone help me in solving the issue faced while developing the application using Postgres DB with SmartGWT-2.0 and GWT 2.0, failing to establish the connection. Configuration Details Eclipse 3.4 (Ganymede) Gwt plugin Appengine 1.3 GWT 2.0 SmartGwt 2.0 Postgres Sql DB I initially tried setting external library path for the 'postgresql-8.4-701.jdbc4.jar' and tried running the server got this error attached below. Code: Initializing AppEngine server The server is running athttp://localhost:/ java.lang.ClassNotFoundException: org.postgresql.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) I tried putting the same jar file inside the war/WEB-INF/lib and restarted the server, and error log reads below Code: Initializing AppEngine server The server is running athttp://localhost:/ 9 Feb, 2010 7:00:26 AM com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1265698826728000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.zo.zotweb.client.GreetingService.greetServer(java.lang.String)' threw an unexpected exception: java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 581) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 188) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) 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.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 121) 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(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:352) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 396) at org.mortbay.thread.BoundedThreadPool $PoolThread.run(BoundedThreadPool.java:442) Caused by: java.lang.NoClassDefFoundError: java.net.Socket is a restricted
Re: Not able to use External Jar file for DB connection
Forgive me if I am wrong, but I was under the impression that the App Engine *required* you to use the database implementation it provided. Either deselect the app engine option from your project, or abandon any attempts to use an alternate database. On 10 Feb 2010, at 13:31, Ashar Lohmar wrote: what JDK do you use ? JDBC4 driver should be used only starting with JDK 1.6, acording to the postgresql site : JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The driver builds, but the majority of new methods are stubbed out. maybe you will consider in using the JDBC3 version in my apps, i put the jar in the war\WEB-INF\lib folder, and the using eclipse I add it to the build path but one more thing ... i just noticed ... why do you have the appengine in a application that will use an normal SGBD ? if i recall well, using appengine you won't be able to connect to the database any way hope any of this helps cheers On Feb 9, 11:24 am, vinod M vinod@gmail.com wrote: HI, Can anyone help me in solving the issue faced while developing the application using Postgres DB with SmartGWT-2.0 and GWT 2.0, failing to establish the connection. Configuration Details Eclipse 3.4 (Ganymede) Gwt plugin Appengine 1.3 GWT 2.0 SmartGwt 2.0 Postgres Sql DB I initially tried setting external library path for the 'postgresql-8.4-701.jdbc4.jar' and tried running the server got this error attached below. Code: Initializing AppEngine server The server is running athttp://localhost:/ java.lang.ClassNotFoundException: org.postgresql.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) I tried putting the same jar file inside the war/WEB-INF/lib and restarted the server, and error log reads below Code: Initializing AppEngine server The server is running athttp://localhost:/ 9 Feb, 2010 7:00:26 AM com.google.appengine.tools.development.ApiProxyLocalImpl log SEVERE: [1265698826728000] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.zo.zotweb.client.GreetingService.greetServer(java.lang.String)' threw an unexpected exception: java.lang.NoClassDefFoundError: java.net.Socket is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java: 378) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java: 581) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java: 188) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java: 224) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java: 62) 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.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: 51) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: 121) 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(ContextHandler.java: 712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: 70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:352) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at
Re: How to place url link in gwt Label
Hi, i tried it but it didn't work. HTML text = new HTML(Reference : a href=http://www.google.com;Help Desk/a); It still does not render as link... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: problems running application in development mode using -noserver switch and cache.html/nocache.js files not served from the webapp root
do you get a pop-up message that your browser cannot connect to hosted mode? if yes, it might help setting -bindAddress 0.0.0.0 to your host (source: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/e292666b63d182b3/aa53947cd7525cda?lnk=gstq=2.0.1#aa53947cd7525cda) did you download gwt-plugin for firefox? can you try it out in another browser with gwt plug-in? On 7 Feb., 20:52, mooreds moor...@gmail.com wrote: Hi folks, I'm trying to get GWT2.0.1development mode working with the - noserver option. The main issue is that while running in development mode, any changes I make in the GWT java classes are not reflected when I refresh the browser. This is a bit of a nonstandard setup, so let me outline it a bit. We have a number of apps that depend on some other cvs modules: * gwtapp1 * gwtapp2 * gwtlib1 * gwtlib2 All of these depend on code running on the server (json files, RPC) and I couldn't figure out how to get them working with the built in Jetty server. (For one thing, I couldn't figure out how to have the different projects all compile into one WEB-INF/classes directory.) gwtapp1 compiles the GWT into the root directory, and works just fine. gwtapp2 compiles the GWT into /static/gwt/ One other difference that may be relevant is that gwtapp2 uses the cross site linker. However, removing that line from the .gwt.xml file didn't seem to make a difference in the behavior. Another difference is the directory that gwtapp2 compiles into actually has 3 different modules in it (but I'm not trying to touch any of the other modules). It works fine in 'production' mode, when built via ant. But it doesn't work in development mode. Here's the arguments I'm using for the eclipse launcher: -noserver -startupUrlhttp://localhost:8080/HomePage.do com.foo.gwtapp2 (I've tried different URLs, including a static html page) The GWT development mode window pops up just fine, but I never see the 'FF' tab pop up when I click 'launch default browser'. I do see this url in the browser window: http://localhost:8080/HomePage.do?gwt.codesvr=192.168.3.103:9997 I see no messages in the development mode window. However, when I turn the logLevel up to DEBUG (-logLevel DEBUG) I see the 'Loading Modules' line. When I am working with gwtapp1 (which works) I also see a 'Connection received from xxx.xxx.xxx.xxx' message. Before the 'Connection recieved', I see the following TRACE messages when running either app: 00:00:02.078 [TRACE] Invoking Linker RPC policy file manifest 00:00:02.078 [TRACE] Invoking Linker Standard 00:00:02.094 [DEBUG] Attempting to optimize JS 00:00:02.141 [TRACE] Invoking Linker Export CompilationResult symbol maps 00:00:02.141 [TRACE] Invoking Linker Emit compile report artifacts 00:00:02.141 [TRACE] Linking compilation into C:\eclipse-workspace \account\war\com.foo.gwtapp[12] I imagine that the Connection is the issue, but am not quite sure how to debug it. I've installed the Google FF plugin, and am using FF 3.6. This is an old project so it was not created with the google eclipse plugin. Running on eclipse 3.4.2 on Windows XP, if that matters. I've reviewed this FAQ:http://code.google.com/webtoolkit/doc/latest/FAQ_DebuggingAndCompilin... and made sure that I have all the .rpc files in the /static/gwt directory. This directory is browser accessible (ie, when I put a file here:http://localhost:8080/static/gwt/a.txt, I can read it with my browser). I also played around with the -codeServerPort argument, but that didn't seem to make any difference. In the thought that it was perhaps a urlrewrite issue (gwtapp2 does some url rewriting) I put a static html file in the /static/gwt directory, but that still didn't lead to a Connection being made. I have done some searching on the web and in the GWT google group, but haven't found much else. I also didn't find anything when searching through the bug list. What am I missing? Can anyone give me further places I should look or ideas? Thanks, Dan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to place url link in gwt Label
OK, my fault it worked! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Rounded Corner In Gwt Button
There is a way using a button with the sliding door techique [1]. The example does it with a link simulating a button, but it also works with buttons. Please be advised that buttons pose an unforseen behavior when pressed: they displace their content by a few pixels. Unfortunately not all browsers report that state correctly (depends whether the button is clicked with the mouse or the keyboard) and you might be stuck occasionally with a few uggly artifacts. [1] http://www.filamentgroup.com/lab/styling_the_button_element_with_sliding_doors/ On Feb 10, 11:19 am, pavi praveen.ojh...@gmail.com wrote: Hi all, I am try to make round corner using css But I am not able to do rounded corner. My css style is: .box { background-image: url(/images/nw.gif), url(/images/ne.gif), url(/ images/sw.gif), url(/images/se.gif); background-repeat: no-repeat, no-repeat, no-repeat, no-repeat; } please 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: SOP in GWT 2.0
No, same result. On 9 Feb., 22:18, obesga obe...@gmail.com wrote: Making ../myfile.xml you're telling the browser to access file into another server. ¿ Cant you use myfile.xml on the base url of server ? Hope that helps On 8 feb, 23:25, Lothrien sebastian.fra...@pronetwork.info wrote: In development mode I can access the xml file I want to read within the GWT application - everything ok so far. When I compile the app and call it from the file system, this was working in v1.7.1, but now I get an SOP error(!) How can I get around this? public String xmlfile= ../xml_with_content.xml; String xml = GWT.getModuleBaseURL() + xmlfile; RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET,xml); try { requestBuilder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { requestFailed(exception); } public void onResponseReceived(Request request, Response response) { loadXML(response.getText()); } }); } catch (RequestException ex) { requestFailed(ex); }- Zitierten Text ausblenden - - Zitierten Text anzeigen - -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Click handler not called
I found out the problem. When I created the SimpleButtonPresenter in the ContainerPresenter constructor, I created the SimpleButtonView but it was not the one displayed on the screen. The one displayed on the screen was the one created in the ContainerView. The fix: In ContainerPresenter: public interface Display { Widget asWidget(); SimpleButtonPresenter.Display getSimpleButtonDisplay(); } In the constructor simpleButtonPresenter = new SimpleButtonPresenter(eventBus, display.getSimpleButtonDisplay()); In ContainerView: @Override public Display getSimpleButtonDisplay() { return sbv; } On Feb 7, 10:51 am, Sydney sydney.henr...@gmail.com wrote: I have a problem with click handlers that are not called. I use the MVP design explained in the article Large scale application development and MVP. I have a simple view which contains one button. I also have another view that is just a container for that button. It's just to simulate the problem. For each view I have a presenter. In the AppController I have two ways to create the application, test which uses the SimpleButtonPresenter, and container which uses the ContainerPresenter. In the first case the handler is called but in the second case it's not. The only difference between the two cases if that in the second case, the button is inside a container. Do you have an idea where the problem comes from? AppController public class AppController implements Presenter, ValueChangeHandlerString { private final HandlerManager eventBus; private HasWidgets container; public AppController(HandlerManager eventBus) { this.eventBus = eventBus; bind(); } private void bind() { History.addValueChangeHandler(this); } public void go(final HasWidgets container) { this.container = container; if (.equals(History.getToken())) { History.newItem(main); } else { History.fireCurrentHistoryState(); } } public void onValueChange(ValueChangeEventString event) { String token = event.getValue(); if (token != null) { Presenter presenter = null; if (token.equals(main)) { } else if (test.equals(token)) { presenter = new SimpleButtonPresenter(eventBus, new SimpleButtonView()); } else if (container.equals(token)) { presenter = new ContainerPresenter(eventBus, new ContainerView()); } if (presenter != null) { presenter.go(container); } } } } The Views public class SimpleButtonView extends Composite implements SimpleButtonPresenter.Display { private final Button btnClick; public SimpleButtonView() { DecoratorPanel container = new DecoratorPanel(); btnClick = new Button(Click Me); container.add(btnClick); this.initWidget(container); } @Override public Widget asWidget() { return this; } @Override public HasClickHandlers getButton() { return btnClick; } } public class ContainerView extends Composite implements ContainerPresenter.Display { public ContainerView() { DecoratorPanel container = new DecoratorPanel(); SimpleButtonView sbv = new SimpleButtonView(); container.add(sbv); this.initWidget(container); } @Override public Widget asWidget() { return this; } } The Presenters public class SimpleButtonPresenter implements Presenter { public interface Display { HasClickHandlers getButton(); Widget asWidget(); } private final HandlerManager eventBus; private final Display display; public SimpleButtonPresenter(HandlerManager eventBus, Display view) { this.eventBus = eventBus; this.display = view; } @Override public void go(HasWidgets container) { bind(); container.clear(); container.add(display.asWidget()); } public void bind() { display.getButton().addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { System.out.println(Click); } }); } } public class ContainerPresenter implements Presenter { public interface Display { Widget asWidget(); } private final HandlerManager eventBus; private final Display display; private final SimpleButtonPresenter simpleButtonPresenter; public ContainerPresenter(HandlerManager eventBus, Display view) { this.eventBus = eventBus; this.display = view; simpleButtonPresenter = new SimpleButtonPresenter(eventBus, new
Re: Can't get dev mode on external server working (GWT 2.0)
Hi Swami, I was having a similar issue that you are describing. I found that removing the rename-to attribute from the module tag helped. This does mean that when you do a GWT compile it will compile to a folder that has the whole package string of you module xml. So you will have to change your html to reflect that: script type=text/javascript language=javascript src=com.some.package.App/com.some.package.App.nocache.js/script Hope this helps. On Dec 21 2009, 9:58 pm, Swami swami.kev...@gmail.com wrote: App.gwt.xml ?xml version=1.0 encoding=UTF-8? module rename-to='app' !-- Inherit the core Web Toolkit stuff. -- inherits name='com.google.gwt.user.User'/ inherits name='com.google.gwt.xml.XML'/ !-- Inherit the default GWT style sheet. You can change -- !-- the theme of your GWT application by uncommenting -- !-- any one of the following lines. -- inherits name='com.google.gwt.user.theme.standard.Standard'/ !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ -- !-- inherits name='com.google.gwt.user.theme.dark.Dark'/ -- !-- Other module inherits -- !-- Specify the app entry point class. -- entry-point class='org.ishafoundation.app.client.App'/ !-- Specify the paths for translatable code -- source path='client'/ /module App.html !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN !-- The HTML 4.01 Transitional DOCTYPE declaration-- !-- above set at the top of the file will set -- !-- the browser's rendering engine into -- !-- Quirks Mode. Replacing this declaration -- !-- with a Standards Mode doctype is supported, -- !-- but may lead to some differences in layout. -- html head meta http-equiv=content-type content=text/html; charset=UTF-8 !-- -- !-- Consider inlining CSS to reduce the number of requested files -- !-- -- link type=text/css rel=stylesheet href=App.css !-- -- !-- Any title is fine -- !-- -- titleWeb Application Starter Project/title !-- -- !-- This script loads your compiled module. -- !-- If you add any GWT meta tags, they must -- !-- be added before this line. -- !-- -- script type=text/javascript language=javascript src=app/ app.nocache.js/script /head !-- -- !-- The body can have arbitrary html, or -- !-- you can leave the body empty if you want -- !-- to create a completely dynamic UI. -- !-- -- body !-- OPTIONAL: include this if you want history support -- iframe src=javascript:'' id=__gwt_historyFrame tabIndex='-1' style=position:absolute;width:0;height:0;border:0/iframe !-- RECOMMENDED if your web app will not function without JavaScript enabled -- noscript div style=width: 22em; position: absolute; left: 50%; margin- left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif Your web browser must have JavaScript enabled in order for this application to display correctly. /div /noscript h1app Tree Test/h1 div id=tree/ /body /html On Dec 22, 8:27 am, bch...@gmail.com bch...@gmail.com wrote: Can you share your App.html and App.gwt.xml ? On Dec 22, 10:55 am, Swami swami.kev...@gmail.com wrote: If I open that url then I just get the static App.html displayed if I append ?gwt.codesvr=127.0.0.1:9997 to the end of the url I still get the same clearing the cache makes no difference Here's my App.java file package org.ishafoundation.app.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; public class App implements EntryPoint { public void onModuleLoad() { Window.alert(loaded); } } I'm supposed to get a pop-up window On Dec 21, 11:04 pm, Jason Parekh jasonpar...@gmail.com wrote: Ok. What happens when you open that URL in Firefox? Can you try clearing your cache just in case. jason On Mon, Dec 21, 2009 at 12:26 PM, Swami swami.kev...@gmail.com wrote: No, that was a mistake when composing the message I'm afraid. the urls really are the same. but it's just not working http://localhost:8080/exist/app/gwt/App.html On Dec 21, 9:10 pm, Jason Parekh jasonpar...@gmail.com wrote: Could you check your URLs again? The URL given as the startup URL argument in step #2 is missing the app directory, while the URL in step
Re: How to place url link in gwt Label
On Feb 10, 11:45 am, mariyan nenchev nenchev.mari...@gmail.com wrote: Hi, I have a label that contains some text and part of it must link: For example the whole Label text is : bla bla bla. Reference:link, bla bla bla. I tried : Reference : a href=http://www.google.com;Help Desk/a But gwt doesn't detect it as url, may be i should use HTML? Regards. Hi, as you wrote, label doesn't allow rendering HTML, you should use HTML for external link: HTML externalLink = new HTML(a href='http://www.google.com'Help Desk/a); or for internal link Hiperlink = new Hyperlink ( test.getLink(), test.getLink()); Cheers -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Overnight The response could not be deserialized
Hi guys, I have a pretty strange problem. I have a rather simply GAE-App, located here: http://3.latest.honstatslogger.appspot.com/ (I'll try to keep that version so the bug can be inspected in the future) There are two methods on the RPC-Class and one is performing normally: # void addPlayer(final String pPlayerName, final AsyncCallbackBoolean pCallback); # The signature of the RPC that causes the _problem_ is this one: # void getPlayerStats(final String pPlayerName, final AsyncCallbackCollectionPlayerStatsEntry pCallback); # [PlayerStatsEntry is persisted using JDO what worked perfectly fine and still is working perfectly fine (see bottom).] The exception I get on the _client_ side is (due to the GAE-Logs, nothing is crashing on the _server_ side): # com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The response could not be deserialized # I can verify that the problem occuring is not related to a change of the code. (I was asleep when it occurred first) The implementation of the above RPC ends with (Its Scala code but as it worked before it's not a Scala issue): # LOG.warning(Result: + result.toString) return result # To narrow the problem-scope I added a new single dataset to the server, (usually more than one gets returned) with very simple data, so I could easily see a failure in the data-strucutre, but there was none. This is what gets logged to the server (simple generated toString of the class): # Result: [PlayerStatsEntry [AP=1, APEM=1, AR=1, AREM=1, acc_actions=1, acc_amm_solo_count=1, acc_amm_solo_rating=1, acc_amm_team_count=1, acc_amm_team_rating=1, acc_avg_score=1.0, acc_bdmg=1, acc_bdmgexp=1, acc_bgold=1, acc_buybacks=1, acc_concedes=1, acc_concedevotes=1, acc_consumables=1, acc_deaths=1, acc_denies=1, acc_discos=1, acc_em_played=1, acc_exp=1, acc_exp_denied=1, acc_games_played=1, acc_gold=1, acc_gold_spent=1, acc_goldlost2death=1, acc_heroassists=1, acc_herodmg=1, acc_heroexp=1, acc_herokills=1, acc_herokillsgold=1, acc_kicked=1, acc_losses=1, acc_neutralcreepdmg=1, acc_neutralcreepexp=1, acc_neutralcreepgold=1, acc_neutralcreepkills=1, acc_pub_count=1, acc_pub_skill=1, acc_razed=1, acc_secs=1, acc_secs_dead=1, acc_teamcreepdmg=1, acc_teamcreepexp=1, acc_teamcreepgold=1, acc_teamcreepkills=1, acc_wards=1, acc_wins=1, aid=0, key=PlayerStatsEntry(11001), level=1, nickname=xxxyyyxxx, timestamp=1265314522272]] # Perfectly valid data as I can tell you. So I have absolutely no idea what is going wrong here and it would be great if someone could help me on this as there are currently a couple of hundred people waiting on this to be fixed =( Big Thanks in advance! Best Regards, Nicolas -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Composite with MVP
I am new to GWT and currently writing some stub programs to get used to it. I had a look at the MVP Architecture presentation on the website and tried some sample application. I struggling to find out how to position my widget. Overview of my dummy application. This is a filtering application that has filter panel(List of Listboxes) and main panel displays the results of the search criteria. I have written 2 Composite Views and an appcontroller to control the application. 1. FilterView 2. ResultOverviewView table width = 1200px tr td id=filterView align = left valign=top width=20%/ td td id=resultView align = left width = 80% valign=top/td /tr /table How do i force the composite view(ResultOverviewView to display inside the resultView table. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
TreeMapString, ListInterface_For_Custom_Pojo can not be serialized by gwt-rpc in gwt 2.0
While attempting to serialize this type with gwt-rpc in gwt 2.0: SortedMapString, ListCustom_Pojo_Object_Interface and a concrete type of TreeMap, I get this error message at runtime: Type 'Pojo_Object_Concrete_Class' 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.: instance = fPojo_Object_Concrete_Class... Both Custom_Pojo_Object_Interface and Pojo_Object_Concrete_Class implement IsSerializable. is this a bug in GWT 2 or am I doing something wrong? Thanks, David -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT browser plugin + websense
Hi, When I try to install the GWT Developer browser plugin, the installation program tries to connect to tools.google.com and this page is blocked by our websense software at work. I *think* that all the required files are there, because the GwtDevPluginSetup.exe installs a bunch of DLLs in the directory \Document and Settings\username\Local Settings\Application Data \Google\Update The installation fails however when it tries to connect to tools.google.com, presumably to install the update software (which I do not want). Is there a way to tell the installation program to install the plugin anyway and not to try to connect to this web site? Workstation: Windows XP Professional Browser: Internet Explorer 6 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to place url link in gwt Label
On Feb 10, 2:35 pm, mariyan nenchev nenchev.mari...@gmail.com wrote: Hi, i tried it but it didn't work. HTML text = new HTML(Reference : a href=http://www.google.com;Help Desk/a); It still does not render as link... Hi try to this HTML text = new HTML(Reference : a href='http:// www.google.com'Help Desk/a); I changed with ' Cheers -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JLayeredPane in gwt possible?
Hi, I want to reuse code from an older gui. There I used JLayeredPane. Is it possible in gwt to create different Layeres containing each objects? The only solution I could find is using - in one panel - the same position (top,left) of the widgets. But I hope for a solution where the widgets are more separate - thus in different layer. Thanks, Samas -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[ERROR] Unable to find type 'com.mycompany.mydept.client.Calculator'
Hi, I am a new member of this community. I have just started using GWT. I am getting following error while running build script through ant: Buildfile: /home/viks/workspace/Calculator/build.xml libs: javac: [copy] Copying 1 file to /home/viks/workspace/Calculator/war/WEB- INF/classes gwtc: [java] Compiling module com.mydept.mycompany.client.Calculator [java]Finding entry point classes [java] [ERROR] Unable to find type 'com.mycompany.mydept.client.Calculator' [java] [ERROR] Hint: Previous compiler errors may have made this type unavailable [java] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly # Calculator.gwt.xml file is in same package as Calculator.java. Its contents are: module inherits name='com.google.gwt.user.User'/ inherits name=com.google.gwt.i18n.I18N / inherits name='com.gwtext.GwtExt'/ entry-point class='com.mycompany.mydept.client.Calculator'/ stylesheet src=js/ext/resources/css/ext-all.css / script src=js/ext/adapter/ext/ext-base.js / script src=js/ext/ext-all.js / stylesheet src='Calculator.css' / servlet path=/DbaseRPCService class=com.mycompany.mydept.server.DbaseRPCServiceImpl/ /module ## The class Calculator is exactly at the specified package. It is like this: public class Calculator implements EntryPoint { ... ... } ## build.xml is: ?xml version=1.0 encoding=utf-8 ? project name=Calculator default=build basedir=. !-- Arguments to gwtc and devmode targets -- property name=gwt.args value= / !-- Configure path to GWT SDK -- property name=gwt.sdk location=/home/viks/gwt-2.0.1 / property name=libs location=/home/viks/otherLibraries / path id=project.class.path pathelement location=war/WEB-INF/classes/ pathelement location=${gwt.sdk}/gwt-user.jar/ pathelement location=${libs}/gwtext.jar/ pathelement location=${libs}/servlet-api-2.4.jar/ pathelement location=${libs}/mail.jar/ pathelement location=${libs}/activation.jar/ fileset dir=${gwt.sdk} includes=gwt-dev*.jar/ !-- Add any additional non-server libs (such as JUnit) -- fileset dir=war/WEB-INF/lib includes=**/*.jar/ /path target name=libs description=Copy libs to WEB-INF/lib mkdir dir=war/WEB-INF/lib / copy todir=war/WEB-INF/lib file=${gwt.sdk}/gwt-servlet.jar / !-- Add any additional server libs that need to be copied -- /target target name=javac depends=libs description=Compile java source mkdir dir=war/WEB-INF/classes/ javac srcdir=src includes=** encoding=utf-8 destdir=war/WEB-INF/classes source=1.5 target=1.5 nowarn=true debug=true debuglevel=lines,vars,source classpath refid=project.class.path/ /javac copy todir=war/WEB-INF/classes fileset dir=src excludes=**/*.java/ /copy /target target name=gwtc depends=javac description=GWT compile to JavaScript java failonerror=true fork=true classname=com.google.gwt.dev.Compiler classpath pathelement location=src/ path refid=project.class.path/ /classpath !-- add jvmarg -Xss16M or similar if you see a StackOverflowError -- jvmarg value=-Xmx256M/ !-- Additional arguments like -style PRETTY or -logLevel DEBUG -- arg line=${gwt.args}/ arg value=com.mycompany.mydept.client.Calculator/ /java /target target name=devmode depends=javac description=Run development mode java failonerror=true fork=true classname=com.google.gwt.dev.DevMode classpath pathelement location=src/ path refid=project.class.path/ /classpath jvmarg value=-Xmx256M/ arg value=-startupUrl/ arg value=/home/viks/workspace/Calculator/src/com/mydept/ mycompany/public/index.html/ !-- Additional arguments like -style PRETTY or -logLevel DEBUG -- arg line=${gwt.args}/ arg value=com.mycompany.mydept.client.Calculator/ /java /target target name=hosted depends=devmode description=Run development mode (NOTE: the 'hosted' target is deprecated) / target name=build depends=gwtc description=Build this project / target name=war depends=build description=Create a war file zip destfile=Calculator.war basedir=war/ /target target name=clean description=Cleans this project delete dir=war/WEB-INF/classes failonerror=false / delete dir=war/Calculator failonerror=false / /target /project ## Looks like the problem is specific to following 2 lines: [java] [ERROR] Hint: Previous compiler errors may have made this type unavailable [java]
development mode console
Hi all, I'm getting a bit annoyed with the development mode console behavior in Eclipse. It always jumps up when something happens in the GWT application. It jumps back when I close it. If I put my editor full screen, it jumps over my editor. If I switch to another tab, it steals the focus. And it's not all that informative, because it seems to not scroll down whenever something happens. This is not the behavior of a normal tab in Eclipse. Does anyone know of a setting somewhere, somehow to make it not do these things? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
using ImageSource from ClientBundle in CSS file
Hi, I'm trying to get some modular app desgin working using GWT and MVP. But now I'm stuck in some ClientBundle issue. I wanted to create a ClientBundle for my header widget which contains the CSS information and image resources. CSS definitions should be stored in a seperate file called header.css and after working with the Developers Guide - UiBinder I tried the following approach: public interface Resource extends ClientBundle { public interface HeaderCss extends CssResource{ public String headerBanner(); public String menuItem (); public String selected (); public String hovered(); public String langswitch(); public String nav(); } @Source(header.css) public HeaderCss css(); @Source(header_bg.png) public ImageResource headerBackground(); } this interface is included into header.ui.xml by: ui:style src=resource/header.css type=appgui.client.ui.widgets.header.resource.Resource.HeaderCss/ I now want to know how to include ImageResource headerBackground(); in my header.css I tried to do this by using the @sprite annotation as described in GWT CSS CookBook (referenced by http://groups.google.com/group/google-web-toolkit/browse_thread/thread/f3ba1d8dfc9d67f8/b5bf0790aca915ea?lnk=gstq=cssresource#b5bf0790aca915ea) but i couldn't get it working. GWT plugin in eclipse announces [ERROR] [appgui] Unable to find ImageResource method value(headerBackground) in appgui.client.ui.widgets.header.Header_HeaderUiBinderImpl_GenBundle : Could not find no-arg method named headerBackground in type appgui.client.ui.widgets.header.Header_HeaderUiBinderImpl_GenBundle My Header class is set up in the way Developer Guide describes: public class Header extends Composite { private static HeaderUiBinder uiBinder = GWT.create(HeaderUiBinder.class); interface HeaderUiBinder extends UiBinderWidget, Header { } @UiField HeaderCss style; ... public Header(String firstName) { initWidget(uiBinder.createAndBindUi(this)); } ... } header.css: @sprite .headerBanner { gwt-image: 'headerBackground'; height: 100px; width: 100%; margin: 0px; } I think my current Problem is, that I have missunderstood the usage of either @sprite or the ClientBundle or both. Tsukasa -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
installing the Google Web Toolkit Developer Plugin
How can I install the Google Web Toolkit Developer Plugin in a browser on a development machine that is not connected to the internet? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: TreeMapString, ListInterface_For_Custom_Pojo can not be serialized by gwt-rpc in gwt 2.0
Hello David! I don't think it is a bug. How would the gwt compiler know that you want to transfer Pojo_Object_Concrete_Class over RPC. You only declare Custom_Pojo_Object_Interface in your RPC interface. You have to explicitly show the compiler what classes you want to transfer over RPC. I hope this helps Best - István On Tue, Feb 9, 2010 at 11:21 PM, devadvocate david.jonathan.nel...@gmail.com wrote: While attempting to serialize this type with gwt-rpc in gwt 2.0: SortedMapString, ListCustom_Pojo_Object_Interface and a concrete type of TreeMap, I get this error message at runtime: Type 'Pojo_Object_Concrete_Class' 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.: instance = fPojo_Object_Concrete_Class... Both Custom_Pojo_Object_Interface and Pojo_Object_Concrete_Class implement IsSerializable. is this a bug in GWT 2 or am I doing something wrong? Thanks, David -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. istvan.szobosz...@inepex.com | inepex.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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0 Upgrade Problem
I have now a similar problem... I had an enormous bug and I switched to Eclipse EE 64bit. Since then, it's like I only have half of the google plugin, I have no contextual menus when I right click in project explorer and some other minor issues. Christian On Tue, Jan 26, 2010 at 10:51 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: hi, i´m impressed about the quick reply! at first i develop the application on jboss 5.1.0. everything works fine in development mode but since i tried it on the joss i have a couple of problems. so the first application is the name of the application. the second application is the name of the directory where the compiled js files are placed. http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA493... i absolutely aggree with you that my problem is caused by mixing up something :-) in fact i tried mixing GWT, Isomorphic SmartGWT and CometServlet. I have one main GWT Project and a couple of java projects to create some sort of moduled structure. i use smartgwt for the user interface and gwt for the client server communication with the server side servlet. in fact i´m not absolutely clear if my problems are caused by compiling the gwt or the smartgwt parts. but as soon as i can localize the code that causes the problems i will post it here. On 26 Jan., 15:37, Chris Ramsdale cramsd...@google.com wrote: On Tue, Jan 26, 2010 at 6:21 AM, m.mil...@newelements.de m.mil...@newelements.de wrote: No, i definetly mean not the XYZ.nochache.js. Here is a line from my firebug: http://localhost:8080/application/64CE9F3B21EDFDB2ADBA49308C361972.ca. .. this is what gwt tries to load, but the file is definetly reachable under this path: http://localhost:8080/application/application/64CE9F3B21EDFDB2ADBA493. .. Are you trying to run this under an external app server (e.g. Tomcat), or have you simply changed the port that the embedded server uses? If you're deploying your app to an external app server, I can see how you might end up with an application/application path (although I don't know how correct it would be). Let's take a step back, can you describe the directory structure that you see after you run the GWT compiler? i think the gwt compiler has a problem with it´s pathes and the folders within the war file. i have a new problem, when i compile the application and start it at the application server all pathes to the images folder are wrong, but this time the name of the application instance is missing in the image pathes. i´m absolutely sure both problems had nothing to do with the upgrade but are compiler errors. i had similar problems before when ich made an if statement on an Tree. my original code was something like: if ( tree != null ) that caused compiler error that have not been displayed but the XYZ.cache.js couldn´t been found wehn ich changed the line to: if ( tree.getRoot() != null ) the compiled code worked. I was able to successfully run the following code in both Development and Web mode: public class Test implements EntryPoint { public void onModuleLoad() { Tree t = new Tree(); TreeItem ti = null; if (ti != null) { } else { ti = new TreeItem(hello there); } t.addItem(ti); RootPanel.get().add(t); } } Is there something different between your app and the above snippet? So i guess, you google folks have to do a coulpe of fixes to your compiler :-) I think several, mutually exclusive issues are being confused here. Would you mind sending me your project, or a sample project that reproduces the issues you mention above? On 11 Jan., 20:37, Chris Ramsdale cramsd...@google.com wrote: I second Rajeev's comments, there are a couple of oddities that you may experience when upgrading. That said, I'm wondering about the following (@m.militz): 1. I'm assuming you meant XYZ.nocache.js and not XYZ.cache.js. Is this correct? 2. While GWT does produce a .html when you create a new project, it does not create this file every time, and it does not alter it once created. Put another way, I don't believe that GWT is mucking with your Project.html file (not even during upgarde). Is your script tag, within Project.html, incorrect for some reason? What happens if you simply change it to reference module/module.nocache.js? - Chris On Mon, Jan 11, 2010 at 12:33 PM, Rajeev Dayal rda...@google.com wrote: Hi, Have you seen an instance where GWT tries to load the nocache.js file directly from the root of your war folder? What does the HTTP GET request look like? There is definitely a bug in GWT when switching between SDKs. The problem is twofold: 1) The hosted.html file does not get regenerated. The
Re: GWT browser plugin + websense
NVM, I found the solution minutes after posting this message. I checked-out the file gwt-dev-plugin.msi from SVN under plugins/ie/ prebuilt, installed it and it worked. On 9 fév, 10:45, Mart bergmar...@gmail.com wrote: Hi, When I try to install the GWT Developer browser plugin, the installation program tries to connect to tools.google.com and this page is blocked by our websense software at work. I *think* that all the required files are there, because the GwtDevPluginSetup.exe installs a bunch of DLLs in the directory \Document and Settings\username\Local Settings\Application Data \Google\Update The installation fails however when it tries to connect to tools.google.com, presumably to install the update software (which I do not want). Is there a way to tell the installation program to install the plugin anyway and not to try to connect to this web site? Workstation: Windows XP Professional Browser: Internet Explorer 6 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: development mode console
On Wed, Feb 10, 2010 at 6:05 AM, levier levi.mail.l...@gmail.com wrote: Hi all, I'm getting a bit annoyed with the development mode console behavior in Eclipse. It always jumps up when something happens in the GWT application. It jumps back when I close it. If I put my editor full screen, it jumps over my editor. If I switch to another tab, it steals the focus. And it's not all that informative, because it seems to not scroll down whenever something happens. This is not the behavior of a normal tab in Eclipse. Does anyone know of a setting somewhere, somehow to make it not do these things? There are no settings for controlling its behavior at this time. It basically works like a console view in Eclipse. It won't auto-scroll in general, but it should focus you on the first error/warning in the log. How many log entries are showing up for you? What is your log level set to? Please file a bug in the public issue tracker for this issue http://code.google.com/p/google-web-toolkit/issues/list. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Miguel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: installing the Google Web Toolkit Developer Plugin
You can download first the installer package for your browser directly in SVN and copy it on a USB stick. The installer files are located under plugins/your browser/prebuilt. I have not tested it with other browsers than IE though. On 9 fév, 10:37, WaltM wal...@mendenhall.name wrote: How can I install the Google Web Toolkit Developer Plugin in a browser on a development machine that is not connected to the internet? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: SOP in GWT 2.0
Did you tried to see what URL/URI the browser requests before that SOP Exception? Im going through cross-domain comunication right now too .. but i done it through the 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Public module resources and Maven
Hi all, I'm trying to create and use a stand-alone (jar) GWT module including not only .java files, but also some resources (images and CSSes). I declare them as public path... and I make the Maven configuration to include them, i.e.: resource directory./directory includes include war/css/**/*.* /include include war/images/**/*.* /include /includes /resource -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use g:DialogBox UIBinder definition from Java
First, give us your code for you .java and for your .ui.xml. I'll see what I can do for you, I also had some problems first time I tried this. Note that I'm using Gwt-Presenter in my example. Christian On Wed, Feb 10, 2010 at 10:24 AM, Stefano Ciccarelli sciccare...@gmail.comwrote: Solution #1 doesn't work for me. I get this error: Second attempt to set initializer for field f_DialogBox1, from new com.google.gwt.user.client.ui.DialogBox(false, true) to owner.thatsJustMe() Hints or suggestions? On Tue, Feb 9, 2010 at 5:44 PM, Thomas Broyer t.bro...@gmail.com wrote: On Feb 9, 12:00 pm, Ovidiu Gheorghies ogheorgh...@gmail.com wrote: Hello, The DialogBox API (http://google-web-toolkit.googlecode.com/svn/ javadoc/2.0/com/google/gwt/user/client/ui/DialogBox.html) notes that a DialogBox can be defined as a UIBinder template as follows: g:DialogBox autoHide=true modal=true g:captionbCaption text/b/g:caption g:HTMLPanel Body text g:Button ui:field='cancelButton'Cancel/g:Button g:Button ui:field='okButton'Okay/g:Button /g:HTMLPanel /g:DialogBox What is the proper way of using this definition from Java code? Supposing that the above definition is contained in NotificationWindow.ui.xml, the following naive approach to NotificationWindow.java does not work: public class NotificationWindow extends Composite { private static NotificationWindowUiBinder uiBinder = GWT.create(NotificationWindowUiBinder.class); interface NotificationWindowUiBinder extends UiBinderWidget, NotificationWindow {} @UiField DialogBox dialogBox; public NotificationWindow() { initWidget(uiBinder.createAndBindUi(this)); } public void show() { dialogBox.show(); } } If the EntryPoint-derived class calls: (new NotificationWindow()).show(); then the following exception is logged: java.lang.IllegalStateException: This widget's parent does not implement HasWidgets How is the g:DialogBox definition from the DialogBox API used correctly from Java code? There are two possibilities: inheriting DialogBox or having a DialogBox field (but then not inheriting a Widget). Solution #1: inheriting a DialogBox class NotificationWindow extends DialogBox { ... public NotificationWindow() { // we don't care about the returned value, it'll be 'this' uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { // UiBinder will call this to get a DialogBox instance // and this is the DialogBox instance we want to use return this; } ... } Solution #2: not inheriting DialogBox // Note: do NOT inherit Composite, Widget or UIObject! class NotificationWindow { ... private DialogBox dialogBox; public NotificationWindow() { dialogBox = uiBinder.createAndBind(this); } public void show() { dialogBox.show(); } ... } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: IncompatibleRemoteServiceException with -noserver argument in gwt 2.0
Thanks a lot for your help. I figured out that you need to deploy in exploded war when using an external server, since on every start and page refresh DevMode would generate a new rpc policy file in my project which was actually missing in the war on the server and since the problem. On 28 Jan., 17:02, Rajeev Dayal rda...@google.com wrote: Hi, If you want to pick up changes to your server code while the development server is running, you need to deploy your application in exploded-war format to JBoss. When you run GWT in -noserver mode, you should point your -war directory over to your JBoss server's deployment directory - that way, any files generated by GWT will be dumped into your running server's directory. Unfortunately, there is a bug in GWT's RPC system that will prevent the server from picking up changes to the RPC serialization policy file, even if you copy the modified serialization file into the running server's deployment directory: http://code.google.com/p/google-web-toolkit/issues/detail?id=4548 I'd recommend that you star this issue if you want it to be prioritized. Rajeev On Thu, Jan 14, 2010 at 12:38 PM, denis56 denis.ergashb...@gmail.comwrote: His, I have been struggling with com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException (which finds several entries in web) for a while and was able to find a clumsy workaround. Could anyone please suggest a solution in the following case as I believe it may be either my configuration error or gwt bug. Here is a sample project structure to refer to: - java - modules | -- gwtclient There is an ant task that compiles gwt code and puts it generated code under modules/gwtclient, this folder is than zipped as war file and deployed to jboss. It all runs then smoothly in a browser. However should I start DevMode with -noserver option and the -war option pointing at NOT PACKAGED directory modules/gwtclient in the project structure, the following exception com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: Type 'XYZ' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer. For security purposes, this type will not be deserialized. will be thrown. I noticed that on every start DevMode creates new .gwt.rpc file under modules/gwtclient (and not to deployed war) and that the exception disappears if the modules/gwtclient is packaged and redeployed as DevMode runs. From http://groups.google.com/group/google-web-toolkit/browse_thread/threa... I understand that the server (jboss' tomcat?) cannot find suitable .gwt.rpc file and falls back to LegacySerializationPolicy which demands IsSerializable interface. Shouldn't DevMode running with -noserver argument be able create new .gwt.prc files direct in the war file deployed to jboss or not create it at all? Is this a bug or my DevMode configuration mistake? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
XMLParser Help
Hi, Could someone point me to an example (or tutorial) of how to retrieve, parse and display data from a reomte XML doc? I've tried numerous examples from the web with no luck. This time I'd like to try GWT's XMLParser. Thank you, -Russ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use g:DialogBox UIBinder definition from Java
Sorry, I was talking about Thomas Broyer solution #1. Your code (pastebin) is what I was already doing. BTW this is the .java: public final class AboutDialogDisplay { @Inject private AboutDialogDisplay() { uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { return this; } } And this is the .ui.xml: g:DialogBox animationEnabled=true glassEnabled=true modal=true .. /g:DialogBox Thanks Stefano On Wed, Feb 10, 2010 at 4:46 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: First, give us your code for you .java and for your .ui.xml. I'll see what I can do for you, I also had some problems first time I tried this. Note that I'm using Gwt-Presenter in my example. Christian On Wed, Feb 10, 2010 at 10:24 AM, Stefano Ciccarelli sciccare...@gmail.com wrote: Solution #1 doesn't work for me. I get this error: Second attempt to set initializer for field f_DialogBox1, from new com.google.gwt.user.client.ui.DialogBox(false, true) to owner.thatsJustMe() Hints or suggestions? On Tue, Feb 9, 2010 at 5:44 PM, Thomas Broyer t.bro...@gmail.com wrote: On Feb 9, 12:00 pm, Ovidiu Gheorghies ogheorgh...@gmail.com wrote: Hello, The DialogBox API (http://google-web-toolkit.googlecode.com/svn/ javadoc/2.0/com/google/gwt/user/client/ui/DialogBox.html) notes that a DialogBox can be defined as a UIBinder template as follows: g:DialogBox autoHide=true modal=true g:captionbCaption text/b/g:caption g:HTMLPanel Body text g:Button ui:field='cancelButton'Cancel/g:Button g:Button ui:field='okButton'Okay/g:Button /g:HTMLPanel /g:DialogBox What is the proper way of using this definition from Java code? Supposing that the above definition is contained in NotificationWindow.ui.xml, the following naive approach to NotificationWindow.java does not work: public class NotificationWindow extends Composite { private static NotificationWindowUiBinder uiBinder = GWT.create(NotificationWindowUiBinder.class); interface NotificationWindowUiBinder extends UiBinderWidget, NotificationWindow {} @UiField DialogBox dialogBox; public NotificationWindow() { initWidget(uiBinder.createAndBindUi(this)); } public void show() { dialogBox.show(); } } If the EntryPoint-derived class calls: (new NotificationWindow()).show(); then the following exception is logged: java.lang.IllegalStateException: This widget's parent does not implement HasWidgets How is the g:DialogBox definition from the DialogBox API used correctly from Java code? There are two possibilities: inheriting DialogBox or having a DialogBox field (but then not inheriting a Widget). Solution #1: inheriting a DialogBox class NotificationWindow extends DialogBox { ... public NotificationWindow() { // we don't care about the returned value, it'll be 'this' uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { // UiBinder will call this to get a DialogBox instance // and this is the DialogBox instance we want to use return this; } ... } Solution #2: not inheriting DialogBox // Note: do NOT inherit Composite, Widget or UIObject! class NotificationWindow { ... private DialogBox dialogBox; public NotificationWindow() { dialogBox = uiBinder.createAndBind(this); } public void show() { dialogBox.show(); } ... } -- You received 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to
Re: How to use g:DialogBox UIBinder definition from Java
In your code, for solution #1, you need to extends DialogBox, you forgot that. For my solution, I only encapsulate DialogBox within an HTMLPanel an then I added two public function for showing and hiding my dialogbox. (Solution #2) Btw, I found solution #2 less intrusive and more simple. On Wed, Feb 10, 2010 at 10:58 AM, Stefano Ciccarelli sciccare...@gmail.comwrote: Sorry, I was talking about Thomas Broyer solution #1. Your code (pastebin) is what I was already doing. BTW this is the .java: public final class AboutDialogDisplay { @Inject private AboutDialogDisplay() { uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { return this; } } And this is the .ui.xml: g:DialogBox animationEnabled=true glassEnabled=true modal=true .. /g:DialogBox Thanks Stefano On Wed, Feb 10, 2010 at 4:46 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: First, give us your code for you .java and for your .ui.xml. I'll see what I can do for you, I also had some problems first time I tried this. Note that I'm using Gwt-Presenter in my example. Christian On Wed, Feb 10, 2010 at 10:24 AM, Stefano Ciccarelli sciccare...@gmail.com wrote: Solution #1 doesn't work for me. I get this error: Second attempt to set initializer for field f_DialogBox1, from new com.google.gwt.user.client.ui.DialogBox(false, true) to owner.thatsJustMe() Hints or suggestions? On Tue, Feb 9, 2010 at 5:44 PM, Thomas Broyer t.bro...@gmail.comwrote: On Feb 9, 12:00 pm, Ovidiu Gheorghies ogheorgh...@gmail.com wrote: Hello, The DialogBox API (http://google-web-toolkit.googlecode.com/svn/ javadoc/2.0/com/google/gwt/user/client/ui/DialogBox.html) notes that a DialogBox can be defined as a UIBinder template as follows: g:DialogBox autoHide=true modal=true g:captionbCaption text/b/g:caption g:HTMLPanel Body text g:Button ui:field='cancelButton'Cancel/g:Button g:Button ui:field='okButton'Okay/g:Button /g:HTMLPanel /g:DialogBox What is the proper way of using this definition from Java code? Supposing that the above definition is contained in NotificationWindow.ui.xml, the following naive approach to NotificationWindow.java does not work: public class NotificationWindow extends Composite { private static NotificationWindowUiBinder uiBinder = GWT.create(NotificationWindowUiBinder.class); interface NotificationWindowUiBinder extends UiBinderWidget, NotificationWindow {} @UiField DialogBox dialogBox; public NotificationWindow() { initWidget(uiBinder.createAndBindUi(this)); } public void show() { dialogBox.show(); } } If the EntryPoint-derived class calls: (new NotificationWindow()).show(); then the following exception is logged: java.lang.IllegalStateException: This widget's parent does not implement HasWidgets How is the g:DialogBox definition from the DialogBox API used correctly from Java code? There are two possibilities: inheriting DialogBox or having a DialogBox field (but then not inheriting a Widget). Solution #1: inheriting a DialogBox class NotificationWindow extends DialogBox { ... public NotificationWindow() { // we don't care about the returned value, it'll be 'this' uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { // UiBinder will call this to get a DialogBox instance // and this is the DialogBox instance we want to use return this; } ... } Solution #2: not inheriting DialogBox // Note: do NOT inherit Composite, Widget or UIObject! class NotificationWindow { ... private DialogBox dialogBox; public NotificationWindow() { dialogBox = uiBinder.createAndBind(this); } public void show() { dialogBox.show(); } ... } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to
Re: I need SOP disabled in GWT 2.0 built-in web server.
I got the same problem with GWTTestCase. you can solve it like Alex explains on his site: http://development.lombardi.com/?p=15 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to use g:DialogBox UIBinder definition from Java
Oh no his solution #2 isn't like mine at all, lol, but anyway, do you really need @Inject ? There's nothing to inject in your example. On Wed, Feb 10, 2010 at 11:11 AM, Christian Goudreau goudreau.christ...@gmail.com wrote: In your code, for solution #1, you need to extends DialogBox, you forgot that. For my solution, I only encapsulate DialogBox within an HTMLPanel an then I added two public function for showing and hiding my dialogbox. (Solution #2) Btw, I found solution #2 less intrusive and more simple. On Wed, Feb 10, 2010 at 10:58 AM, Stefano Ciccarelli sciccare...@gmail.com wrote: Sorry, I was talking about Thomas Broyer solution #1. Your code (pastebin) is what I was already doing. BTW this is the .java: public final class AboutDialogDisplay { @Inject private AboutDialogDisplay() { uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { return this; } } And this is the .ui.xml: g:DialogBox animationEnabled=true glassEnabled=true modal=true .. /g:DialogBox Thanks Stefano On Wed, Feb 10, 2010 at 4:46 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: First, give us your code for you .java and for your .ui.xml. I'll see what I can do for you, I also had some problems first time I tried this. Note that I'm using Gwt-Presenter in my example. Christian On Wed, Feb 10, 2010 at 10:24 AM, Stefano Ciccarelli sciccare...@gmail.com wrote: Solution #1 doesn't work for me. I get this error: Second attempt to set initializer for field f_DialogBox1, from new com.google.gwt.user.client.ui.DialogBox(false, true) to owner.thatsJustMe() Hints or suggestions? On Tue, Feb 9, 2010 at 5:44 PM, Thomas Broyer t.bro...@gmail.comwrote: On Feb 9, 12:00 pm, Ovidiu Gheorghies ogheorgh...@gmail.com wrote: Hello, The DialogBox API (http://google-web-toolkit.googlecode.com/svn/ javadoc/2.0/com/google/gwt/user/client/ui/DialogBox.html) notes that a DialogBox can be defined as a UIBinder template as follows: g:DialogBox autoHide=true modal=true g:captionbCaption text/b/g:caption g:HTMLPanel Body text g:Button ui:field='cancelButton'Cancel/g:Button g:Button ui:field='okButton'Okay/g:Button /g:HTMLPanel /g:DialogBox What is the proper way of using this definition from Java code? Supposing that the above definition is contained in NotificationWindow.ui.xml, the following naive approach to NotificationWindow.java does not work: public class NotificationWindow extends Composite { private static NotificationWindowUiBinder uiBinder = GWT.create(NotificationWindowUiBinder.class); interface NotificationWindowUiBinder extends UiBinderWidget, NotificationWindow {} @UiField DialogBox dialogBox; public NotificationWindow() { initWidget(uiBinder.createAndBindUi(this)); } public void show() { dialogBox.show(); } } If the EntryPoint-derived class calls: (new NotificationWindow()).show(); then the following exception is logged: java.lang.IllegalStateException: This widget's parent does not implement HasWidgets How is the g:DialogBox definition from the DialogBox API used correctly from Java code? There are two possibilities: inheriting DialogBox or having a DialogBox field (but then not inheriting a Widget). Solution #1: inheriting a DialogBox class NotificationWindow extends DialogBox { ... public NotificationWindow() { // we don't care about the returned value, it'll be 'this' uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { // UiBinder will call this to get a DialogBox instance // and this is the DialogBox instance we want to use return this; } ... } Solution #2: not inheriting DialogBox // Note: do NOT inherit Composite, Widget or UIObject! class NotificationWindow { ... private DialogBox dialogBox; public NotificationWindow() { dialogBox = uiBinder.createAndBind(this); } public void show() { dialogBox.show(); } ... } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more
Re: How to use g:DialogBox UIBinder definition from Java
I'm already doing like you, but I'd like to try the solution #1 explained by Thomas Broyer, so the code is from that test. The class already extends DialogBox and I get the error reported, the extends is missing because I done something wrong with cutpaste. I need @Inject because that class is the Display injected in a Presenter. I want to try that solution because I prefer to extends DialogBox. On Wed, Feb 10, 2010 at 5:16 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: Oh no his solution #2 isn't like mine at all, lol, but anyway, do you really need @Inject ? There's nothing to inject in your example. On Wed, Feb 10, 2010 at 11:11 AM, Christian Goudreau goudreau.christ...@gmail.com wrote: In your code, for solution #1, you need to extends DialogBox, you forgot that. For my solution, I only encapsulate DialogBox within an HTMLPanel an then I added two public function for showing and hiding my dialogbox. (Solution #2) Btw, I found solution #2 less intrusive and more simple. On Wed, Feb 10, 2010 at 10:58 AM, Stefano Ciccarelli sciccare...@gmail.com wrote: Sorry, I was talking about Thomas Broyer solution #1. Your code (pastebin) is what I was already doing. BTW this is the .java: public final class AboutDialogDisplay { @Inject private AboutDialogDisplay() { uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { return this; } } And this is the .ui.xml: g:DialogBox animationEnabled=true glassEnabled=true modal=true .. /g:DialogBox Thanks Stefano On Wed, Feb 10, 2010 at 4:46 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: First, give us your code for you .java and for your .ui.xml. I'll see what I can do for you, I also had some problems first time I tried this. Note that I'm using Gwt-Presenter in my example. Christian On Wed, Feb 10, 2010 at 10:24 AM, Stefano Ciccarelli sciccare...@gmail.com wrote: Solution #1 doesn't work for me. I get this error: Second attempt to set initializer for field f_DialogBox1, from new com.google.gwt.user.client.ui.DialogBox(false, true) to owner.thatsJustMe() Hints or suggestions? On Tue, Feb 9, 2010 at 5:44 PM, Thomas Broyer t.bro...@gmail.comwrote: On Feb 9, 12:00 pm, Ovidiu Gheorghies ogheorgh...@gmail.com wrote: Hello, The DialogBox API (http://google-web-toolkit.googlecode.com/svn/ javadoc/2.0/com/google/gwt/user/client/ui/DialogBox.html) notes that a DialogBox can be defined as a UIBinder template as follows: g:DialogBox autoHide=true modal=true g:captionbCaption text/b/g:caption g:HTMLPanel Body text g:Button ui:field='cancelButton'Cancel/g:Button g:Button ui:field='okButton'Okay/g:Button /g:HTMLPanel /g:DialogBox What is the proper way of using this definition from Java code? Supposing that the above definition is contained in NotificationWindow.ui.xml, the following naive approach to NotificationWindow.java does not work: public class NotificationWindow extends Composite { private static NotificationWindowUiBinder uiBinder = GWT.create(NotificationWindowUiBinder.class); interface NotificationWindowUiBinder extends UiBinderWidget, NotificationWindow {} @UiField DialogBox dialogBox; public NotificationWindow() { initWidget(uiBinder.createAndBindUi(this)); } public void show() { dialogBox.show(); } } If the EntryPoint-derived class calls: (new NotificationWindow()).show(); then the following exception is logged: java.lang.IllegalStateException: This widget's parent does not implement HasWidgets How is the g:DialogBox definition from the DialogBox API used correctly from Java code? There are two possibilities: inheriting DialogBox or having a DialogBox field (but then not inheriting a Widget). Solution #1: inheriting a DialogBox class NotificationWindow extends DialogBox { ... public NotificationWindow() { // we don't care about the returned value, it'll be 'this' uiBinder.createAndBindUi(this); } @UiFactory DialogBox thatsJustMe() { // UiBinder will call this to get a DialogBox instance // and this is the DialogBox instance we want to use return this; } ... } Solution #2: not inheriting DialogBox // Note: do NOT inherit Composite, Widget or UIObject! class NotificationWindow { ... private DialogBox dialogBox; public NotificationWindow() { dialogBox = uiBinder.createAndBind(this); } public void show() { dialogBox.show(); } ... } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to
Re: XMLParser Help
If you wa On 10 Feb., 16:56, Russ r...@epcinternet.com wrote: Hi, Could someone point me to an example (or tutorial) of how to retrieve, parse and display data from a reomte XML doc? I've tried numerous examples from the web with no luck. This time I'd like to try GWT's XMLParser. Thank you, -Russ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XMLParser Help
If you want to map the XML to model classes you can take a look at http://code.google.com/p/piriti/. It's an XML mapper for GWT which can take data from the XML and inject it into your model classes. HTH Cheers Harald On 10 Feb., 16:56, Russ r...@epcinternet.com wrote: Hi, Could someone point me to an example (or tutorial) of how to retrieve, parse and display data from a reomte XML doc? I've tried numerous examples from the web with no luck. This time I'd like to try GWT's XMLParser. Thank you, -Russ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Deploying to jboss
In the older versions of GWT I created build.xml scripts and ran ant to create war files to deploy to jboss. Do I still have to do this with the new (2.0) architecture? I tried copying the war directory (generated by eclipse plugins for compilation) into jboss/server/default/deploy/project but I got errors. My project runs fine in the embedded jetty server. Is there a simple script or command I can execute to do this? My project is not set up as a Google App Engine project... does it need to be? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XMLParser Help
Thanks, but I'm really just looking for a basic tutorial or example on how to grab remote XML data using GWT's com.google.gwt.xml.client.XMLParser Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT enum comparison
Hello All, I have an enum in which I'm trying to use it's natural ordering. In the javadocs for the java enum I get that it's based on the order the enum constants are declared so if I declare an animal enum as: DOG, CAT; then using DOG.compareTo(CAT) will tell me that dog comes before cat. Where if i declare them as: CAT, DOG; then using DOG.compareTo(CAT) will tell me that cat comes before dog. My question is, Does the GWT compiled version of Java's Enum support this same feature? Thanks in advance JAVADOC FOR REFERENCE: public final int compareTo(E o) Compares this enum with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. Enum constants are only comparable to other enum constants of the same enum type. The natural order implemented by this method is the order in which the constants are declared. Specified by: compareTo in interface ComparableE extends EnumE Parameters: o - the object to be compared. Returns: a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XMLParser Help
In the server impl file: @Override *public* String getMapURL(String theURL) { URL url = *null*; String s = *null*; String retstr = ; *try* { url = *new* URL(theURL); BufferedReader reader = *new* BufferedReader(*new*InputStreamReader(url.openStream())); *while* ((s = reader.readLine()) != *null*) { retstr += s + \n; } *return* retstr; } *catch* (MalformedURLException e) { e.printStackTrace(); } *catch* (IOException e) { e.printStackTrace(); } *return* retstr; } } Call from the client with the name of the URL that you want. On the client side, you can parse with stuff similar to this: *protected* MapWidget createMapWidget(String mapString, *int* width, *int*height, TextArea ta) { Document doc = XMLParser.*parse*(mapString); Element root = doc.getDocumentElement(); NodeList tempNodes = root.getElementsByTagName(temp); String s = *new* String(); AreaWidget[] areas = *new* AreaWidget[tempNodes.getLength()]; *for* (*int* i=0; itempNodes.getLength(); i++) { Element tempElement = (Element) tempNodes.item(i); String theTemp = getElementText(tempElement, number); String theDescription = getElementText(tempElement, description); String theXStart = getElementText(tempElement, xstart); theXStart = String.*valueOf*(Math.*round*(Float.*parseFloat*(theXStart) * width)); String theXStop = getElementText(tempElement, xstop); theXStop = String.*valueOf*(Math.*round*(Float.*parseFloat*(theXStop) * width)); String theYStart = getElementText(tempElement, ystart); theYStart = String.*valueOf*(Math.*round*(Float.*parseFloat*(theYStart) * height)); String theYStop = getElementText(tempElement, ystop); theYStop = String.*valueOf*(Math.*round*(Float.*parseFloat*(theYStop) * height)); String theArea = theXStart + , + theYStart + , + theXStop + , + theYStop; s += theTemp + \n; s += theDescription + \n; s += theXStart += \n; s += theXStop += \n; s += theYStart += \n; s += theYStop += \n; s += theArea += \n; areas[i] = *new* AreaWidget(rect, theArea, theTemp, *new*SolarSystemCommand(theTemp)); } ta.setText(s); MapWidget map = *new* MapWidget(areas); *return* map; } *private* String getElementText( Element item, String value) { String result = ; NodeList itemList = item.getElementsByTagName(value); *if* (itemList.getLength() 0 itemList.item(0).hasChildNodes()) { result = itemList.item(0).getFirstChild().getNodeValue(); } *return* result; } In this example, I am parsing an XML file that describes an image map to be applied to a jpg which I retrieve. The XML contains entries like this: temperatures temp number044/number descriptionTest *Temp* Sensor OTA 4,3: TTS(4,3)/description xstart0.508/xstart xstop0.566/xstop ystart0.477/ystart ystop0.532/ystop /temp temp number081/number descriptionTest *Temp* Sensor OTA 7,5: TTS(7,5)/description xstart0.731/xstart xstop0.795/xstop ystart0.332/ystart ystop0.387/ystop /temp temp number066/number descriptionTest *Temp* Sensor OTA 3,1: TTS(3,1)/description xstart0.434/xstart xstop0.496/xstop ystart0.622/ystart ystop0.685/ystop /temp . /temperatures The rectangles are percentages offsets from the top left corner of the image (values range between 0 and 1)... by multiplying by the size of the image (width and height) you can create an image map. On Wed, Feb 10, 2010 at 9:59 AM, Russ r...@epcinternet.com wrote: Thanks, but I'm really just looking for a basic tutorial or example on how to grab remote XML data using GWT's com.google.gwt.xml.client.XMLParser Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
copypaste and TextBox
Hi, Which of the gwt 2.0 style event Handlers recognize pasting text into a TextBox? I have ChangeHandler, KeyUpHandler and MouseUpHandlers installed on a TextBox but no joy. I am trying to accomplish the following: I have a TextBox group together with a button. In the start state the TextBox is empty and the button is disabled. If I type in the box the KeyUpHandler seems to know this and I can enable the button if the value is what I think it should be. I have yet to find the magic for using the mouse to paste text into the box and have that trigger the enable-button condition. ideas? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Client Bundle and Image Internationalization
Seems to work in my other project that have tomcat as server... but not on the one that have a php server. Any idea how to fix this ? Christian On Tue, Feb 9, 2010 at 9:00 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: It seem that only the default value is used. I have three files : image.png, image_en_CA.png and image_fr_CA.png. Everything is working fin in dev mode, but when it come to publish, only image.png is taken into account. Maybe it's because I have PHP server side ? Can anyone help me ? Christian On Tue, Feb 9, 2010 at 8:02 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: It doesn't work after build ! My images are a mess and I can't even change de locale, what am I missing ? Christian On Mon, Feb 8, 2010 at 4:24 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: Ok... it's working in dev mode, I don't know why it didnt when going live, I'll do some more test and come back later On Mon, Feb 8, 2010 at 12:02 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: There's an example of what I have : Inside the client bundle : ImageResource example(); and in my directory I have : exemple.png exemple_fr_CA.png exemple_en_CA.png and when I set the local to fr_CA, I have exemple.png instead... On Sun, Feb 7, 2010 at 10:20 PM, Christian Goudreau goudreau.christ...@gmail.com wrote: I know how to implements localizable images with Image bundle, but how does it works with Client Bundle ? I found nothing about that in the documentation and I was wondering what was the best way to acheive this with Gwt 2.0. Thx Christian -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to get unpublished events from a SuggestBox?
Okay, as I think about it, this approach won't work anyway, because I don't want to change the drop down menu here. I only want to fill in the suggestion textbox, like the Google suggestbox does. So short of cloning the class and all its support (yuck) I guess this ends up being a feature request for the base class. It's a tiny change to the underlying code, but I can't see a way to create the effect from the outside. Still very curious about why the suggestbox wasn't seeing my event though. I even tried suggestBox.fireEvent() on it, and it seemed to have no effect. Anybody know how to do this 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: XMLParser Help
http://code.google.com/p/google-web-toolkit/source/browse/#svn/trunk/samples/simplexml http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/simplexml/src/com/google/gwt/sample/simplexml/client/SimpleXML.java Yours, Arpad -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: copypaste and TextBox
Ok, yikes. I created the following tiny sample to try and find out which events fire when. I did have a handler for *every* possible TextBox event but the mouse over and move events just flooded everything -- I removed those. Now I load the test. I select some text that is outside of the text box and move the cursor to the text box. I click in the textbox to gain focus and the event flooding starts again. I click to paste-in the copied text and more event flooding happens but no text is actually pasted. I will keep pruning down on event handlers. package test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.FocusEvent; import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.event.dom.client.KeyPressEvent; import com.google.gwt.event.dom.client.KeyPressHandler; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.event.dom.client.MouseDownEvent; import com.google.gwt.event.dom.client.MouseDownHandler; import com.google.gwt.event.dom.client.MouseUpEvent; import com.google.gwt.event.dom.client.MouseUpHandler; import com.google.gwt.event.dom.client.MouseWheelEvent; import com.google.gwt.event.dom.client.MouseWheelHandler; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; public class Test implements EntryPoint { public void onModuleLoad() { final Button sendButton = new Button(Send); final TextBox nameField = new TextBox(); sendButton.setEnabled(false); nameField.addBlurHandler(new BlurHandler(){ @Override public void onBlur(BlurEvent event) { Window.alert(event.toDebugString()); }}); nameField.addChangeHandler(new ChangeHandler(){ @Override public void onChange(ChangeEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addFocusHandler(new FocusHandler(){ @Override public void onFocus(FocusEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addKeyDownHandler(new KeyDownHandler(){ @Override public void onKeyDown(KeyDownEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addKeyPressHandler(new KeyPressHandler(){ @Override public void onKeyPress(KeyPressEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addKeyUpHandler(new KeyUpHandler(){ @Override public void onKeyUp(KeyUpEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addMouseDownHandler(new MouseDownHandler(){ @Override public void onMouseDown(MouseDownEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addMouseUpHandler(new MouseUpHandler(){ @Override public void onMouseUp(MouseUpEvent
Re: Get data of widgets in a Panel or dynamically determine their class
you can try checking widget.isAttached on all the widgets. the one widget that is added will return you a true. now that you know the widget you can retrieve the data entered. hope it helps Sudeep On Wed, Feb 10, 2010 at 9:23 PM, mrubioroy mrubio...@gmail.com wrote: Hi all, I'm dynamically adding different widgets (TextBox, CheckBox or TextArea) to a Panel, depending on the columns found in an SQL table. Once the different fields are filled up by the user and the Save button is clicked, the code must collect all the introduced data and send it to server side. The problem I have is: How do I access data on every widget without knowing what class is each one? That is, I can have access to any widget in the Panel, using the getWidget method: myPanel.getWidget(i) But how do I access data? I've tried something like TextBox myWidget; myWidget = (TextBox) myPanel.getWidget(i); String data = myWidget.getText(); But this generates an exception if the Widget is of type CheckBox, because it cannot be cast to TextBox class. If I could determine the class of myPanel.getWidget(i), then I would use some if's to cast that to whatever class it's needed. Thanks Miguel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0 required Tomcat version?
Let me clarify, I'll be using GWT RPC feature for server side communicaiton. On Feb 10, 12:44 pm, dhoffer dhoff...@gmail.com wrote: What's the oldest version of Tomcat that will run GWT 2.0? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Does Image not serialize? How to transfer image back to client?
Hello everybody, I am new to GWT and want to have a service that transfers an Image object (com.google.gwt.user.client.ui.Image) back to the client. (Using GWT 2.0.0 with Eclipse Galileo and Eclipse GWT plugin). On the client, I have the following service method: import com.google.gwt.user.client.ui.Image; Image getImage(); and the following service async method: import com.google.gwt.user.client.ui.Image; void getImage(AsyncCallbackImage callback); On the server, I have the following service implementation: import com.google.gwt.user.client.ui.Image; @Override public Image getEventTimeline() { // 1) code to generate image from data // 2) create new image and return to client Image image = new Image(test.png); return image; } When I compile the code, I get the following error: [ERROR] com.google.gwt.user.client.ui.Image is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.google.gwt.user.client.ui.Image) [ERROR] com.google.gwt.user.client.ui.Image has no available instantiable subtypes. (reached via com.google.gwt.user.client.ui.Image) [ERROR]subtype com.google.gwt.user.client.ui.Image is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.google.gwt.user.client.ui.Image) This suggests that an Image cannot be serialized. I have two questions about this: 1) Isn't every Google object serializable by default. Otherwise, what is the point of having a separate image class in GWT? 2) What is the proper way of doing this? I want to create the image server-sided every time a user clicks a button and return it back to the user where it is supposed to be displayed in a panel. Any suggestions? Thanks a lot, Ralf -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to define and read Global JavaScript Variable in GWT
Is there a way to define a global javascript variable in GWT? I was able to define one in a sample.js file and then read the same using a JSNI native method. But was wondering if there is a way to this purely in Java (GWT) . My goal is to be able to have a global object that can be shared between multiple gwt apps which are modules inside the same project. Thanks Ashish -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to define and read Global JavaScript Variable in GWT
In Java we would define static variables to do something like this. Is that the correct approach I can take here as well? thanks On Wed, Feb 10, 2010 at 11:51 AM, Ashish Khivesara ashish.khives...@gmail.com wrote: Is there a way to define a global javascript variable in GWT? I was able to define one in a sample.js file and then read the same using a JSNI native method. But was wondering if there is a way to this purely in Java (GWT) . My goal is to be able to have a global object that can be shared between multiple gwt apps which are modules inside the same project. Thanks Ashish -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to declare dependent style names with UiBinder
I'm facing a similar problem. Is there any UIBinder team members on this forum? This is definitely a legitimate use case. On Jan 13, 5:06 pm, driftplaces driftpla...@googlemail.com wrote: I have a simpleUiBinderwidget containing a TextArea: !DOCTYPE ui:UiBinderSYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinderxmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui g:TextArea visibleLines=3 / /ui:UiBinder I want to control the background color of this textarea for writeable and read only states. GWT uses the -readonlystylenamedecorator to achieve this. So I try this: !DOCTYPE ui:UiBinderSYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinderxmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style .textBoxStyle { background-color:yellow; } .textBoxStyle-readonly { background-color:lightgray; } /ui:style g:TextArea styleName={style.textBoxStyle} visibleLines=3 / /ui:UiBinder Obviously this won't work becausestylenames are obfuscated for CssResources resulting in something like this: .G1x26wpeN { background-color:yellow } .G1x26wpeO { background-color: lightgray; } The result HTML for writeable textarea looks like this: textarea tabindex=0 class=G1x26wpeN rows=3/ The read only textarea looks like this: textarea tabindex=0 class=G1x26wpeN G1x26wpeN-readonly readonly= rows=3/ How do I declare thestyleso GWT will obfuscate the primary part but not the -readonly decdorator? I know that I can disable the obfuscation for the entirestylename. But I'd like to keep the obfuscation while making use of the decorators. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Does Image not serialize? How to transfer image back to client?
The trick I have used is to encode the image in Base64, and then send the image as a String in the return. public String getDither(int steps, double spiralDistance, double magnitude) { ... make the image ( a spiral dither pattern) and save to disk return Base64.encodeFromFile(myFile.png); } On Wed, Feb 10, 2010 at 12:50 PM, Ralf B ralf.bie...@gmail.com wrote: Hello everybody, I am new to GWT and want to have a service that transfers an Image object (com.google.gwt.user.client.ui.Image) back to the client. (Using GWT 2.0.0 with Eclipse Galileo and Eclipse GWT plugin). On the client, I have the following service method: import com.google.gwt.user.client.ui.Image; Image getImage(); and the following service async method: import com.google.gwt.user.client.ui.Image; void getImage(AsyncCallbackImage callback); On the server, I have the following service implementation: import com.google.gwt.user.client.ui.Image; @Override public Image getEventTimeline() { // 1) code to generate image from data // 2) create new image and return to client Image image = new Image(test.png); return image; } When I compile the code, I get the following error: [ERROR] com.google.gwt.user.client.ui.Image is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.google.gwt.user.client.ui.Image) [ERROR] com.google.gwt.user.client.ui.Image has no available instantiable subtypes. (reached via com.google.gwt.user.client.ui.Image) [ERROR]subtype com.google.gwt.user.client.ui.Image is not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or 'java.io.Serializable' nor does it have a custom field serializer (reached via com.google.gwt.user.client.ui.Image) This suggests that an Image cannot be serialized. I have two questions about this: 1) Isn't every Google object serializable by default. Otherwise, what is the point of having a separate image class in GWT? 2) What is the proper way of doing this? I want to create the image server-sided every time a user clicks a button and return it back to the user where it is supposed to be displayed in a panel. Any suggestions? Thanks a lot, Ralf -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem with Thread in GWT2.0
Thanks a lot for you all I currently stopped at timer's solution - just for quickly gett the working app, and further I planned to use GWTeventservice library - it's a very useful feature. On 10 фев, 22:49, KeremTiryaki keremtiry...@gmail.com wrote: final Timer t=new Timer() { int i=0; @Override public void run() { greetingService.getDataHit( new AsyncCallbackInteger() { public void onFailure(Throwable caught) { hitLabel.setText(SERVER_ERROR); } public void onSuccess(Integer result) { hitLabel.setText(result+ and increasing ...); } }); i++; if(i8){ t.cancel(); } } }; t.scheduleRepeating(800); If I understood truly this code may help to solve your problem. This is getting an integer result from server 8 times in time interval 800 miliseconds... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: copypaste and TextBox
Try it like this: package test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; public class Test implements EntryPoint { public void onModuleLoad() { final Button sendButton = new Button(Send); sendButton.setEnabled(false); final TextBox nameField = new TextBox() { public void onBrowserEvent(Event event) { GWT.log(event.getType(), null); } }; nameField.sinkEvents(0x7fff); RootPanel.get(nameFieldContainer).add(nameField); RootPanel.get(sendButtonContainer).add(sendButton); } } You want the ONPASTE event: http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/Event.html On Feb 10, 10:55 am, seven.reeds seven.re...@gmail.com wrote: Ok, yikes. I created the following tiny sample to try and find out which events fire when. I did have a handler for *every* possible TextBox event but the mouse over and move events just flooded everything -- I removed those. Now I load the test. I select some text that is outside of the text box and move the cursor to the text box. I click in the textbox to gain focus and the event flooding starts again. I click to paste-in the copied text and more event flooding happens but no text is actually pasted. I will keep pruning down on event handlers. package test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.FocusEvent; import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.event.dom.client.KeyPressEvent; import com.google.gwt.event.dom.client.KeyPressHandler; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.event.dom.client.MouseDownEvent; import com.google.gwt.event.dom.client.MouseDownHandler; import com.google.gwt.event.dom.client.MouseUpEvent; import com.google.gwt.event.dom.client.MouseUpHandler; import com.google.gwt.event.dom.client.MouseWheelEvent; import com.google.gwt.event.dom.client.MouseWheelHandler; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; public class Test implements EntryPoint { public void onModuleLoad() { final Button sendButton = new Button(Send); final TextBox nameField = new TextBox(); sendButton.setEnabled(false); nameField.addBlurHandler(new BlurHandler(){ @Override public void onBlur(BlurEvent event) { Window.alert(event.toDebugString()); }}); nameField.addChangeHandler(new ChangeHandler(){ @Override public void onChange(ChangeEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addFocusHandler(new FocusHandler(){ @Override public void onFocus(FocusEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addKeyDownHandler(new KeyDownHandler(){ @Override public void onKeyDown(KeyDownEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addKeyPressHandler(new KeyPressHandler(){
Re: Read XML file on server using ServletContext.getResource() never works for me
Unfortunately that doesn't get results that are any better. What's the configuration that you're referring to? I just use the following public class DataServiceImpl extends RemoteServiceServlet implements DataService { public String getData() { ServletContext context = getServletContext(); ServletContext context = getServletContext(); InputStream t1, t2, t3, t4, t5, t6, t7; InputStream isr; InputStream stream; String paths = Dummy start value; try { //This is lifted straight from the google groups answer, what is the configuration? //Tried on 2/10, all of these get null too stream = getServletContext().getResourceAsStream(/); paths = context.getResourcePaths(/).toString(); //Gets: /, / MyApp.css, /MyApp.html, /WEB-INF/... isr = context.getResourceAsStream(/); t1 = context.getResourceAsStream(/MyApp.css); t2 = context.getResourceAsStream(/MyApp.html); t3 = context.getResourceAsStream(MyApp.css); t4 = context.getResourceAsStream(MyApp.html); t5 = context.getResourceAsStream(/WEB-INF/); t6 = context.getResourceAsStream(WEB-INF/); t7 = context.getResourceAsStream(WEB-INF); } catch (Exception e) { System.out.println(Problem!); } } } Am I doing something wrong in how I get the context? I could understand if I was doing something totally wrong, but again, the getPaths call lists exactly what I expect. I'm also working on a Mac, if anyone's heard of that making any difference. Thanks again. On Feb 10, 12:32 am, Joe Cole profilercorporat...@gmail.com wrote: From memory we had heaps of trouble using getResource, and ended up using getResourceAsStream. Give that a go? InputStream stream = configuration.getServletContext().getResourceAsStream(location); On Feb 10, 6:09 pm, Lucas86 lucaslo...@gmail.com wrote: I've been trying toreadanXMLin my RPC servlet and I'm having trouble reading the file in development mode using ServletContext.getResource(). This is my first try, and I think I must be missing something simple but I haven't been able to find what the missing piece is. Every path I've passed to getResource has returned null, but when I call getResourcePaths() on the same context I get a full list of expected paths. When I any of these paths to getResource, it still returns null. ==Not complete code, but just copied from my running project== ServletContext context = getServletContext(); String paths = context.getResourcePaths(/ myapp/).toString(); //Returns a list, including /myapp/ hosted.html java.net.URL testUrl = context.getResource(/myapp/hosted.html); // Returns null (Not really what I'm looking for, but I need to get it finding something first) I realize this isn't strictly a GWT question, but that's where I'm working and I've heard so many unhelpful not-quite-related solutions (that usually just say use getResource) that I really wanted to ask here in case there are any special cases when working with the imbedded jetty server in GWT 2.0. Does anyone know why getResourcePaths sees what I'm looking for but the same paths fail when passed to getResource? Thanks for any 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: copypaste and TextBox
Quirksmode.org is a good resource for this kind of thing. Here's a test page for the onpaste, beforepaste, ... events: http://www.quirksmode.org/dom/events/tests/cutcopypaste.html Please consider, that this doesn't work on all browsers! You can find a (not completely up-to-date) overview here: http://www.quirksmode.org/dom/events/cutcopypaste.html HTH Chris On Feb 10, 9:25 pm, Jim Douglas jdoug...@basis.com wrote: Try it like this: package test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; public class Test implements EntryPoint { public void onModuleLoad() { final Button sendButton = new Button(Send); sendButton.setEnabled(false); final TextBox nameField = new TextBox() { public void onBrowserEvent(Event event) { GWT.log(event.getType(), null); } }; nameField.sinkEvents(0x7fff); RootPanel.get(nameFieldContainer).add(nameField); RootPanel.get(sendButtonContainer).add(sendButton); } } You want the ONPASTE event: http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g... On Feb 10, 10:55 am, seven.reeds seven.re...@gmail.com wrote: Ok, yikes. I created the following tiny sample to try and find out which events fire when. I did have a handler for *every* possible TextBox event but the mouse over and move events just flooded everything -- I removed those. Now I load the test. I select some text that is outside of the text box and move the cursor to the text box. I click in the textbox to gain focus and the event flooding starts again. I click to paste-in the copied text and more event flooding happens but no text is actually pasted. I will keep pruning down on event handlers. package test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.FocusEvent; import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; import com.google.gwt.event.dom.client.KeyPressEvent; import com.google.gwt.event.dom.client.KeyPressHandler; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.event.dom.client.MouseDownEvent; import com.google.gwt.event.dom.client.MouseDownHandler; import com.google.gwt.event.dom.client.MouseUpEvent; import com.google.gwt.event.dom.client.MouseUpHandler; import com.google.gwt.event.dom.client.MouseWheelEvent; import com.google.gwt.event.dom.client.MouseWheelHandler; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; public class Test implements EntryPoint { public void onModuleLoad() { final Button sendButton = new Button(Send); final TextBox nameField = new TextBox(); sendButton.setEnabled(false); nameField.addBlurHandler(new BlurHandler(){ @Override public void onBlur(BlurEvent event) { Window.alert(event.toDebugString()); }}); nameField.addChangeHandler(new ChangeHandler(){ @Override public void onChange(ChangeEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { // TODO Auto-generated method stub Window.alert(event.toDebugString()); }}); nameField.addFocusHandler(new FocusHandler(){ @Override public void onFocus(FocusEvent event) { // TODO Auto-generated method stub
Re: copypaste and TextBox
nameField.sinkEvents(Event.ONPASTE); On Feb 10, 1:21 pm, Seven Reeds seven.re...@gmail.com wrote: My understanding is faulty. The final keword gave me grief so I moved the button and textbox definitions outside. I am only seeing change BrowserEvents being triggered. I am using GWT 2.0, eclipse 3.5 with the GWT plugin. I am on the most recent or a very recent Ubuntu box and am displaying this test in a firefox 3.5.7 browser. So, the app starts with an empty textbox and disabled button. I use the mouse to select some text and then either I: - move the mouse to the textbox and just paste or - move the mouse to the textbox, click the textbox and then paste In either case onBrowserEvent is not triggered... as far as I can tell. After the paste, if I click outside the textbox then I get a change event alert message from onBrowserEvent. The new test is: public class Test implements EntryPoint { Button sendButton = new Button(Send); TextBox nameField = null; public void onModuleLoad() { nameField = new TextBox() { public void onBrowserEvent(Event event) { Window.alert(event.getType()); if (event.getTypeInt() == Event.ONPASTE) { if (nameField.getValue().equals()) { sendButton.setEnabled(false); } else { sendButton.setEnabled(true); } } } }; sendButton.setEnabled(false); nameField.addChangeHandler(new ChangeHandler(){ @Override public void onChange(ChangeEvent event) { if (nameField.getValue().equals()) { sendButton.setEnabled(false); } else { sendButton.setEnabled(true); } } }); RootPanel.get(nameFieldContainer).add(nameField); RootPanel.get(sendButtonContainer).add(sendButton); } } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: copypaste and TextBox
Oh! Those links are brilliant! Thank you. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JBOSS deployment from GWT Eclipse projects
Okay, this is ulitmately easy... Step 1. Recursively copy your war directory to project.war in jboss/server/default/deploy You HAVE to name it with the .war or JBOSS becomes TERRIBLY confused. Step 2. For some reason, database connectivity (for me, at least) broke in JBOSS. I needed to copy mysql-connector-java-3.0.17-ga-bin.jar into jboss/server/lib This lets JBOSS see the database connectivity in a way it understands. I don't understand, but hey, it works. Of course, if you use Oracle you'll probably copy a different file.. I hope that this saves someone time in case they have to do it themselves. Oh, when you start your project don't set it up as for GAE (Google App Engine)... I think this might cause problems. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
logdir parameter in GWT2
i have been trying to set the logdir parameter in GWT but nothing is logging out? i have tried several combinations of relative and absolute paths, with and without filenames but no luck. can anyone help? i'm using the latest google eclipse plugin. many thanks, alan. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to get unpublished events from a SuggestBox?
There was a SuggestBox enhancement in trunk last month that abstracts out a SuggestionDisplay. You should be able to implement a SuggestionDisplay that gives you the access you need. On Wed, Feb 10, 2010 at 1:21 PM, phb ghuenem...@gmail.com wrote: Okay, as I think about it, this approach won't work anyway, because I don't want to change the drop down menu here. I only want to fill in the suggestion textbox, like the Google suggestbox does. So short of cloning the class and all its support (yuck) I guess this ends up being a feature request for the base class. It's a tiny change to the underlying code, but I can't see a way to create the effect from the outside. Still very curious about why the suggestbox wasn't seeing my event though. I even tried suggestBox.fireEvent() on it, and it seemed to have no effect. Anybody know how to do this 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Any Google Wave developers in this group?
Sky, maybe you should check again :) I have just released WaveConnector - a turnkey solution for developing wave gadgets using GWT and testing them in hosted mode. Please head over to my blog at http://thezukunft.com or the project page at http://code.google.com/p/waveconnector-gwt/ for details. Developing a Wave Gadget is as easy as downloading a zip archive :D Also, there are some people on the Wave Dev group that would also be interested in a Wave+GWT group. I think I'll try to start something like that tomorrow. (and then I won't have to cross-post as much, sorry for that) Cheers, Jonas On Feb 9, 2:58 pm, Sky myonceinalifet...@gmail.com wrote: I also hope to incorporate wave into my current GWT projects ^_^ It mostly depends on how complete it is. Last I checked (a good number of months ago) the Wave API was very much in it's infancy. I'm going to revisit it soon! On Feb 9, 8:58 am, Christian Goudreau goudreau.christ...@gmail.com wrote: Yes I am too ! Christian On Tue, Feb 9, 2010 at 9:57 AM, Duong BaTien duong.bat...@gmail.com wrote: Yes. We use GWT, GAE, and Wave Duong BaTien DBGROUPS and BudhNet On Tue, 2010-02-09 at 00:32 -0800, dougx wrote: Yes. I use GWT for all my wave code; please post if you create a specific group for wave related GWT stuff... ~ Doug. On Feb 9, 1:57 pm, Jonas Huckestein jonas.huckest...@me.com wrote: Hi guys, I was wondering if there were enough wave developers around here that use gwt so that we could start our own group. I feel that in both the Wave API group and in this one messages on that subject tend to go unnoticed. Anybody interested? I am about to publish my own mock implementation of the Wave API for GWT that I made to locally test my gadgets, but I guess I might not be the only one. Cheers, Jonas -- Jonas Huckestein http://thezukunft.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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: can not set breakpoint
oh yes, finally it works ! thank you so much for your help ! rgds, canal From: Ashar Lohmar asharloh...@gmail.com To: Google Web Toolkit google-web-toolkit@googlegroups.com Sent: Wed, February 10, 2010 9:17:15 PM Subject: Re: can not set breakpoint that's the problem you are missing the ?gwt.codesvr=localhost:9997 from the URL, all the urls need to have that so that your application will comunicate with the eclipse so you'll be able to debug i think that's specified somewhere in the docs. also if you don't have ?gwt.codesvr=localhost:9997 on the url, you won't see the client modfications if you refresh the browser. cheers, take a glance on the documentation for development mode On Feb 10, 9:50 am, go canal goca@yahoo.com wrote: it ishttp://127.0.0.1:/ rgds, canal From: Jason Parekh jasonpar@gmail.com To: google-web-toolkit@googlegroups.com Sent: Tue, February 9, 2010 11:38:47 PM Subject: Re: can not set breakpoint Hi Canal, Which URL is your browser pointing at? jason On Mon, Feb 8, 2010 at 8:51 PM, go canal goca...@yahoo.com wrote: I have upgraded JDK to 1.6u18. tried the default project greetService, still the same. rgds, canal From: Jason Parekh jasonpar...@gmail.com To: google-web-toolkit@googlegroups.com Sent: Mon, February 8, 2010 11:34:43 PM Subject: Re: can not set breakpoint Hi Canal, What version of Java are you running? Could you try on a simple project (perhaps the default app created by the wizard)? I'm assuming the breakpoints do not show the checkmark on top of them (when the debugger is connected)? jason On Sun, Feb 7, 2010 at 8:05 PM, canal goca...@yahoo.com wrote: hi, searched the group but still can not make it work - can not set breakpoint in the client code i am using Eclipse 3.5, GWT 2.0.1, with plugin. Chrome; I can not set any breakpoint in the client code - not in the callback, not in the OnModuleLoad. Server code is ok. thanks canal -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google..com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT enum comparison
On 10 fév, 18:05, bconoly bcon...@gmail.com wrote: Hello All, I have an enum in which I'm trying to use it's natural ordering. In the javadocs for the java enum I get that it's based on the order the enum constants are declared so if I declare an animal enum as: DOG, CAT; then using DOG.compareTo(CAT) will tell me that dog comes before cat. Where if i declare them as: CAT, DOG; then using DOG.compareTo(CAT) will tell me that cat comes before dog. My question is, Does the GWT compiled version of Java's Enum support this same feature? Yes http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/super/com/google/gwt/emul/java/lang/Enum.java#80 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: using ImageSource from ClientBundle in CSS file
On 10 fév, 14:57, Tsukasa hara...@googlemail.com wrote: Hi, I'm trying to get some modular app desgin working using GWT and MVP. But now I'm stuck in some ClientBundle issue. I wanted to create a ClientBundle for my header widget which contains the CSS information and image resources. CSS definitions should be stored in a seperate file called header.css and after working with the Developers Guide - UiBinder I tried the following approach: public interface Resource extends ClientBundle { public interface HeaderCss extends CssResource{ public String headerBanner(); public String menuItem (); public String selected (); public String hovered(); public String langswitch(); public String nav(); } @Source(header.css) public HeaderCss css(); @Source(header_bg.png) public ImageResource headerBackground(); } this interface is included into header.ui.xml by: ui:style src=resource/header.css type=appgui.client.ui.widgets.header.resource.Resource.HeaderCss/ I now want to know how to include ImageResource headerBackground(); in my header.css AFAICT, you can only use ui:image within ui:style, because UiBinder will create a ClientBundle for the ui.xml, and you can (AFAIK) only use an ImageResource that is in the same ClientBundle as your CssResource. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Any Google Wave developers in this group?
add me to the wave + gwt + gae/j bucket. On Tue, Feb 9, 2010 at 4:57 PM, Jonas Huckestein jonas.huckest...@me.comwrote: Hi guys, I was wondering if there were enough wave developers around here that use gwt so that we could start our own group. I feel that in both the Wave API group and in this one messages on that subject tend to go unnoticed. Anybody interested? I am about to publish my own mock implementation of the Wave API for GWT that I made to locally test my gadgets, but I guess I might not be the only one. Cheers, Jonas -- Jonas Huckestein http://thezukunft.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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Brett Morgan http://domesticmouse.livejournal.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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
TabLayoutPanel doesn't work
I used this code from GWT's TabLayoutPanel documentation, created a UiBinder widget, added it to RootLayoutPanel, but all I got is a almost-blank page with the word able on the top-left corner... g:TabLayoutPanel barUnit='PX' barHeight='3' g:tab g:header size='7'bHTML/b header/g:header g:Labelable/g:Label /g:tab g:tab g:customHeader size='7' g:LabelCustom header/g:Label /g:customHeader g:Labelbaker/g:Label /g:tab /g:TabLayoutPanel I am already using standards mode (this is my doctype: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd;) I wonder what's going on here? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: TabLayoutPanel doesn't work
Try setting the height of TabLayoutPanel as 100% Also, to debug Panel positioning layout issues it may also help to set a border-width border-style ... ( that has worked for me most of the times) Hope this helps Prashant On 11-02-2010 10:34, Kevin Qiu wrote: I used this code from GWT's TabLayoutPanel documentation, created a UiBinder widget, added it to RootLayoutPanel, but all I got is a almost-blank page with the word able on the top-left corner... g:TabLayoutPanel barUnit='PX' barHeight='3' g:tab g:header size='7'bHTML/b header/g:header g:Labelable/g:Label /g:tab g:tab g:customHeader size='7' g:LabelCustom header/g:Label /g:customHeader g:Labelbaker/g:Label /g:tab /g:TabLayoutPanel I am already using standards mode (this is my doctype:!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd;) I wonder what's going on here? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: [gwt-contrib] Re: GWT 2.0.1 breaks incubator 2.0 ... is a new release emminent ?
I didn't get the chance to test it out, due to corporate red tape :-( David On Tue, Feb 9, 2010 at 3:51 PM, John LaBanca jlaba...@google.com wrote: I'll take a look and make sure we can use the incubator jar with GWT 2.0. Thanks, John LaBanca jlaba...@google.com On Tue, Feb 9, 2010 at 8:35 AM, newnoise tommmuel...@googlemail.com wrote: acutally i get the errors in the version downloaded today also. On 8 Feb., 16:09, John LaBanca jlaba...@google.com wrote: Wow, 2010 already. Fixed. Thanks, John LaBanca jlaba...@google.com On Sat, Feb 6, 2010 at 8:52 AM, jim n northrup.ja...@gmail.com wrote: can you name it 2010x please? On Feb 4, 8:19 am, Ray Ryan rj...@google.com wrote: And the jar is posted. All better? On Thu, Feb 4, 2010 at 7:15 AM, Ray Ryan rj...@google.com wrote: Sorry, we'll get a 2.0.1 incubator jar up today. On Thu, Feb 4, 2010 at 7:04 AM, stuckagain david.no...@gmail.com wrote: Hi, The changes to CurrencyData and CurrencyList as described in the release note of GWT 2.0.1 has impact on the current GWT incubator CurrencyWidget. Is there a new release planned ? It seems to be fixed in the trunk of incubator. This is the compilation error. [ERROR] Errors in 'jar:file:/W:/rlsCOTS/gwtincubator/JAVA/lib/gwt- incubator.jar!/com/google/gwt/widgetideas/client/CurrencyWidget.java' [java] [ERROR] Line 46: The import com.google.gwt.i18n.client.impl.CurrencyData cannot be resolved [java] [ERROR] Line 47: The import com.google.gwt.i18n.client.impl.CurrencyList cannot be resolved [java] [ERROR] Line 107: CurrencyData cannot be resolved to a type [java] [ERROR] Line 122: CurrencyData cannot be resolved to a type [java] [ERROR] Line 122: CurrencyList cannot be resolved [java] [ERROR] Line 123: CurrencyData cannot be resolved to a type [java] [ERROR] Line 124: CurrencyData cannot be resolved to a type [java] [ERROR] Line 181: CurrencyData cannot be resolved to a type David -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adds hovering style to StackLayoutPanel (issue 4561).
Reviewers: , Please review this at http://gwt-code-reviews.appspot.com/143801 Affected files: M user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java M user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome.css M user/src/com/google/gwt/user/theme/chrome/public/gwt/chrome/chrome_rtl.css M user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark.css M user/src/com/google/gwt/user/theme/dark/public/gwt/dark/dark_rtl.css M user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard.css M user/src/com/google/gwt/user/theme/standard/public/gwt/standard/standard_rtl.css -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RFC: sharded linking
I've replied before but don't see it here, if it turns up ignore this dupe. I don't maintain any linkers but I have experimented with multi- machine builds. The current Precompile, CompilePerms, and Link implementation has the nice feature that the CompilePerms step does not require access to the source code being compiled. This makes it very, very much easier to deploy additional CompilePerms workers as they don't need to check out source code etc. I like the plan for being able to perform some linking in parallel but I wouldn't like to lose the ability to deploy a useful CompilePerms worker that does not need source code access. If performing Java parsing, creating AST and generating artifacts is something that may need to be parallelized for some builds then I'd like it if that was done in an additional step so that people could choose whether or not to run that on multiple machines while still being able to run the CompilePerms steps on multiple machines. On Feb 9, 4:31 pm, Lex Spoon sp...@google.com wrote: This is a design doc about speeding up the link phase of GWT. If you don't maintain a linker, and if you don't have a multi-machine GWT build, then none of this should matter to you. If you do maintain a linker, let's make sure your linker can be updated with the proposed changes. If you do have a multi-machine build, or if you have some ideas about them, then perhaps you can help us get the best speed benefit possible out of this. I want to speed up linking for multi-machine builds in two ways: 1. Allow more parts of linking to run in parallel. In particular, anything that happens once per permutation and does not need information from other permutations can run in parallel. As an example, the iframe linker chunks the JavaScript of each permutation into multiple script tags. That work can happen in parallel once the linker API supports it. 2. Link does a lot of Java serialization for its artifacts, but the majority of the artifacts in a compile are emitted artifacts that have no structure. They are just a named bag of bits, from the compiler's perspective. It would help if such artifacts did not need a round of Java serialization on the Link node and could instead be bulk copied. === Transition === The compiler will support two compilation modes: maximal sharding and simulated sharding. Maximal sharding is used when all linkers support it and the Precompile/CompilePerms/Link entry points are used. Simulated sharding is used when either some linker can't shard or when the Compiler entry point is used. Linkers individually indicate whether they implement the sharding or non-sharding API. This allows linkers to be updated one by one and to leave the non-sharding API behind once they do. It does not cause trouble with other linkers, because in practice linkers are highly independent. I've looked at as many linkers as I could find to verify this. Occasionally one linker depends on another; in such a case they'll have to be updated in tandem, but the need for that should be rare. By default, a linker is assumed to want the legacy non-sharding API. For such linkers, it isn't safe to assume it generators or its associated artifacts can be safely serialized and then deserialized on a different computer. The non-sharding API will be deprecated. After the sharding API has been out for one GWT release cycle, support for non-shardable linkers will be dropped. === Maximal sharding === Currently, Precompile parses Java into ASTs and runs generators. CompilePerms then runs one copy for each permutation, in parallel. Each instance optimizes the AST for one permutation and then converts it into JavaScript plus some additional artifacts. Finally, Link takes the JavaScript and all the produced artifacts, runs the individual linkers, and produces the final output. In summary, the three stages are: current Precompile: - parse Java and run generators - output: number of permutations, AST, generated artifacts current CompilePerms: - input: permutation id, AST - compile one permutation to JavaScript - output: JavaScript, generated artifacts current Link: - input: JavaScript from all permutations, generated artifacts - run linkers on all artifacts - emit EmittedArtifacts into the final output With maximal sharding, Precompile does no work except to count the number of permutations. Each CompilePerms instance parses Java ASTs, run generators, and optimizes for a specific permutation. Additionally, each CompilePerms instance also runs the shardable part of linkers on the results for that permutation. It then thins the artifacts (see below) and emits them. Finally, Link takes these results from the CompilePerms instances, runs the final, non-shardable part of each linker, and emits all the artifacts designated as emitted artifacts. In summary, the maximal-sharding staging looks like this: new Precompile:
[gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
Yes, many times its too hard to customize things. Sometimes it make sense to use private or package protected. But i think the HandlerManager gets used so widely that it should be customizable On 9 Feb., 23:57, Nathan Wells nwwe...@gmail.com wrote: As a developer I absolutely agree with Mr. Ryan here... I hope that this isn't taken the wrong way, but it's so difficult to customize any given tool that GWT hands us. The eventual answer always seems to be make a custom build which is extremely hard to sell to anyone other than a GWT developer. For additional related information, see the following issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=3628 On Feb 9, 10:14 am, Ray Ryan rj...@google.com wrote: On Tue, Feb 9, 2010 at 9:09 AM, jlaba...@google.com wrote: Warning: better arguments against setHandlerManager below: My concern is that it is too easy to add handlers to a Widget and then set a new HandlerManager, expecting the old handlers to be transferred to the new HandlerManager. What would be the correct thing to do here? We can't transfer handlers because the HandlerRegistrations are linked to the old HandlerManager. Why would I expect that? I'd use such a call expecting it to allow me to swap different sets of handlers around, e.g. a widget that has two very different modes (edit v. nav). Also, we've been trying to move to a model where we add Event Handlers in a widget's constructor instead of overriding onBrowserEvent(). Those handlers will be lost when we switch to a new HandlerManager, unless we unregister the old ones and register new ones. That complicates the widget creation process. I hope you mean add event handling capabilities at constructor time, not actual handler instances. If you mean the latter, that's a dreadful idea. I still don't buy this argument. If I swap it out, I can swap it in. If we require that the user specify the one and only HandlerManager when the first handler is added, then we avoid these problems. I really think this is over protective, and the kind of thing that makes our widgets too hard to customize. http://gwt-code-reviews.appspot.com/138801 -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RFC: sharded linking
I may have misunderstood the proposal but I've experimented a little with multi machine builds so I'll comment based on that. One very nice feature of the current system is that the CompilePerms step does not need access to the source code being compiled. This is a significant benefit as it makes it very easy to setup a new machine to perform CompilePerms work. Without this each CompilePerms machine would have to checkout the source to compile, a significant amount of work and potentially difficult to configure. My experiments showed most of the time being spent in the current Precompile step, but that is because I was not generating a large number of permutations. I imagine the use case for multi machine builds is that you're doing a build for QA or release that needs to include all languages etc, certainly 10s of permutations. One big machine with access to the source to run Precompile in parallel on multiple pages and then being able to simply make available lots of dumb CompilePerms workers that need just GWT installed would be a big advantage here. Or, Precompile different pages on different machines (using some out of band distribution system) and then use a farm of dumb workers to CompilePerms. Individual developers probably use dev mode or just build a single language. Making it possible to run portions of the linkers as part of CompilePerms would certainly be a benefit and I'm all for the reduced serialization plan. On Feb 9, 4:31 pm, Lex Spoon sp...@google.com wrote: This is a design doc about speeding up the link phase of GWT. If you don't maintain a linker, and if you don't have a multi-machine GWT build, then none of this should matter to you. If you do maintain a linker, let's make sure your linker can be updated with the proposed changes. If you do have a multi-machine build, or if you have some ideas about them, then perhaps you can help us get the best speed benefit possible out of this. I want to speed up linking for multi-machine builds in two ways: 1. Allow more parts of linking to run in parallel. In particular, anything that happens once per permutation and does not need information from other permutations can run in parallel. As an example, the iframe linker chunks the JavaScript of each permutation into multiple script tags. That work can happen in parallel once the linker API supports it. 2. Link does a lot of Java serialization for its artifacts, but the majority of the artifacts in a compile are emitted artifacts that have no structure. They are just a named bag of bits, from the compiler's perspective. It would help if such artifacts did not need a round of Java serialization on the Link node and could instead be bulk copied. === Transition === The compiler will support two compilation modes: maximal sharding and simulated sharding. Maximal sharding is used when all linkers support it and the Precompile/CompilePerms/Link entry points are used. Simulated sharding is used when either some linker can't shard or when the Compiler entry point is used. Linkers individually indicate whether they implement the sharding or non-sharding API. This allows linkers to be updated one by one and to leave the non-sharding API behind once they do. It does not cause trouble with other linkers, because in practice linkers are highly independent. I've looked at as many linkers as I could find to verify this. Occasionally one linker depends on another; in such a case they'll have to be updated in tandem, but the need for that should be rare. By default, a linker is assumed to want the legacy non-sharding API. For such linkers, it isn't safe to assume it generators or its associated artifacts can be safely serialized and then deserialized on a different computer. The non-sharding API will be deprecated. After the sharding API has been out for one GWT release cycle, support for non-shardable linkers will be dropped. === Maximal sharding === Currently, Precompile parses Java into ASTs and runs generators. CompilePerms then runs one copy for each permutation, in parallel. Each instance optimizes the AST for one permutation and then converts it into JavaScript plus some additional artifacts. Finally, Link takes the JavaScript and all the produced artifacts, runs the individual linkers, and produces the final output. In summary, the three stages are: current Precompile: - parse Java and run generators - output: number of permutations, AST, generated artifacts current CompilePerms: - input: permutation id, AST - compile one permutation to JavaScript - output: JavaScript, generated artifacts current Link: - input: JavaScript from all permutations, generated artifacts - run linkers on all artifacts - emit EmittedArtifacts into the final output With maximal sharding, Precompile does no work except to count the number of permutations. Each CompilePerms instance parses Java ASTs, run generators,
[gwt-contrib] Re: Change RichTextAreaImpl and subclasses to not be coupled to Widget/RichTextArea
Reviewers: jgw, jlabanca, http://gwt-code-reviews.appspot.com/139801/diff/1/3 File user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java (right): http://gwt-code-reviews.appspot.com/139801/diff/1/3#newcode96 Line 96: if (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)(elem.__listener)) { On 2010/02/09 19:47:05, jlabanca wrote: Why is this needed again? Is it possible that the listener is in a different module? This check will in most cases not be needed. However GWT is doing this check also on the other cases where it is accessing the __listener attribute (DOMImplStandard for example). When you create the RichTextAreaImpl in module one and a second module sets up the attribute on the iframe element, you will need this check (you should normally not od that). If you think we should not do this safty check, we can remove it here. Description: At the moment you cannot use the RichTextAreaImpl class without the Widget class. If you have a custom class that implements the EventListener interface and sets up the __listener attribute that gets used with the RichTextAreaImpl you will get an execption. This patch changes the RichTextAreaImpl classes to not be coupled to Widget but be bound to the EventListener interface. It also decouples it from the RichTextArea class. The only reason the RichTextArea is linked is because of the initialize event. With this changes you are able to use the wonderful RichTextAreaImpl classes in any custom EventListener and any custom class that implements HasInitializeHandlers. Please review this at http://gwt-code-reviews.appspot.com/139801 Affected files: user/src/com/google/gwt/user/client/ui/RichTextArea.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImpl.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplSafari.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
The danger is that if you add handlers, and than later in your code call setHandlerManager with a new HandlerManager. If we dont check for a prior existing HandlerManager, all old HandlerRegistration's will be lost. If you dont know what happened, you will search forever why your old handlers are not working. You wont have the problem with a createHandlerManager method. On 9 Feb., 17:55, Ray Ryan rj...@google.com wrote: If you're right that swapping HMs midstream is a bad idea, I think you need a better argument than it's a bad idea. What's the actual danger? If I'm making my own HM I'm already pretty savvy. Why tie my hands? But yes, if you win that point, I agree with the change to replace setHM(HM) with HM createHM() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
On 2010/02/09 16:46:27, Ray Ryan wrote: Sorry, I came in mid-conversation. My -1 was in defense of setHandlerManager(), seeing no harm in allowing a widget to swap around its HM if it wants to. I'm totally in favor of allowing a custom HM to be used. For the ListModel also an own HandlerRegistration (ListRegistration) and an own HandlerManager will be needed. I think it is a good point to open it up for widgets too. I will change the patchfile to use a createHandlerManager method. http://gwt-code-reviews.appspot.com/138801 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Patch for RichTextEditor
Sebastian, Sorry it's taken so long for anyone to respond. This sounds like useful functionality, and I would suggest creating an issue ( http://code.google.com/p/google-web-toolkit/issues/) and a patch for public discussion (http://gwt-code-reviews.appspot.com/). That way it will be easier for people to try out your patch and refine it. Cheers, joel. On Fri, Jan 22, 2010 at 9:55 AM, Sebastian use...@laliluna.de wrote: Hello, I was missing the ability to format a block with h1 - h6 tags. I researched the topic and build a patch which allows to insert block tags. It makes use of the FormatBlock command. I would like to ask, if you are interested in the patch and discuss the coding decision I took. 1) I couldn't find any guidance on testing. I have tested with Safari 4, Firefox 3.5, IE 6, IE 8 and IE 8 in IE 7 mode. 2) Currently only the tags h1 to h6, pre, address and p work stable across browsers. To limit the choice of tags, I have created an enum to limit the possible values. public static enum BlockTag { H1, H2, H3, H4, H5, H6, PRE, ADDRESS, P; final String OPEN = ; final String CLOSE = ; public String toTag() { return OPEN+name()+CLOSE; } } The advantage is that you cannot provide the wrong tags. The disadvantage is that you cannot provide tags which are for example supported in newer browser versions. The rest of the tag is just a new method in RichTextAreaImplStd. public void formatBlock(RichTextArea.BlockTag blockTag) { execCommand(FormatBlock, blockTag.toTag()); } Shall I leave it that way or turn it into a String parameter? 3) Should I create a bug tracking entry for this? If somebody is interested, here are some links, I found interesting while exploring the topic. http://discerning.com/topics/software/ttw.html http://help.dottoro.com/ljcvtcaw.php http://www.quirksmode.org/dom/execCommand.html Best Regards Sebastian Hennebrueder -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
Sven, you're arguing both sides here. You want things to be more customizable in general, but with your specific patch you're trying to be as restrictive as you can to achieve your personal goal. I'm assuming that if we provide an unrestricted setHandlerManager we would also provide a getHandlerManager. It doesn't seem like rocket science to expect someone to check for an existing one if before clobbering it. I'm also assuming that these methods are protected, not part of every widget's public api. I also would argue against providing both createHM and setHM. Redundant API is confusing API, another unfortunate trait of our widget set. Lazy creation can happen in the default implementation of getHM. A custom widget author could override that method to maintain laziness, or call setHM from their constructor to keep ours from ever seeing the light of day. On Tue, Feb 9, 2010 at 9:11 AM, Sven Brunken sven.brun...@googlemail.comwrote: The danger is that if you add handlers, and than later in your code call setHandlerManager with a new HandlerManager. If we dont check for a prior existing HandlerManager, all old HandlerRegistration's will be lost. If you dont know what happened, you will search forever why your old handlers are not working. You wont have the problem with a createHandlerManager method. On 9 Feb., 17:55, Ray Ryan rj...@google.com wrote: If you're right that swapping HMs midstream is a bad idea, I think you need a better argument than it's a bad idea. What's the actual danger? If I'm making my own HM I'm already pretty savvy. Why tie my hands? But yes, if you win that point, I agree with the change to replace setHM(HM) with HM createHM() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
My last two cents: This discussion is a classic example of why the GWT widgets are so locked down. GWT Contributors, do you trust yourselves or don't you? On Wed, Feb 10, 2010 at 7:27 AM, Andi Mullaraj andimulla...@gmail.comwrote: Hi Ray, all, I believe changing HMs mid stream is dangerous: 1. Say your (nav edit) widget fires events that are common to both modes (i.e. a simple onOpen) and the widget is by default in nav mode 2 Say A registers an onOpen handler (which gets added to hm1 -- the default HM) then later switches to edit mode (and hm2 kicks in) 3. A will not see the onOpen events while on edit mode! If your nav edit widet stays always in one mode, then createHM would do the trick. But if it switches modes you have to make sure there is no overlapping sets of events ... Andi On Tue, Feb 9, 2010 at 11:55 AM, Ray Ryan rj...@google.com wrote: If you're right that swapping HMs midstream is a bad idea, I think you need a better argument than it's a bad idea. What's the actual danger? If I'm making my own HM I'm already pretty savvy. Why tie my hands? But yes, if you win that point, I agree with the change to replace setHM(HM) with HM createHM() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
On 10 Feb., 16:28, Ray Ryan rj...@google.com wrote: Sven, you're arguing both sides here. You want things to be more customizable in general, but with your specific patch you're trying to be as restrictive as you can to achieve your personal goal. Both patches have the same restriction, once a handlermanager is set or the default one created, there is no way back to change it. I am also ok with a setHandlerManager without restrictions. But than people will have the problem that they will loose handlerregistrations, if they dont know what they are doing (and yes, there are these people). I wanted to make this patch as much fool proof as possible. It should be customaziable, but in a way, that you cannot brake it. I dont think that you really need to change the handlermanager during runtime after you set the first one. You also cannot change the element of a widget once you set the first one. I'm assuming that if we provide an unrestricted setHandlerManager we would also provide a getHandlerManager. It doesn't seem like rocket science to expect someone to check for an existing one if before clobbering it. I'm also assuming that these methods are protected, not part of every widget's public api. Yes sure, protected. They should not be public. I also would argue against providing both createHM and setHM. Redundant API is confusing API, another unfortunate trait of our widget set. Lazy creation can happen in the default implementation of getHM. A custom widget author could override that method to maintain laziness, or call setHM from their constructor to keep ours from ever seeing the light of day. I dont want to add boths. There is no need for it. One approach is more than sufficient. With both ways you would be able to change the default handlermanager (which is the goal in the end). On Tue, Feb 9, 2010 at 9:11 AM, Sven Brunken sven.brun...@googlemail.comwrote: The danger is that if you add handlers, and than later in your code call setHandlerManager with a new HandlerManager. If we dont check for a prior existing HandlerManager, all old HandlerRegistration's will be lost. If you dont know what happened, you will search forever why your old handlers are not working. You wont have the problem with a createHandlerManager method. On 9 Feb., 17:55, Ray Ryan rj...@google.com wrote: If you're right that swapping HMs midstream is a bad idea, I think you need a better argument than it's a bad idea. What's the actual danger? If I'm making my own HM I'm already pretty savvy. Why tie my hands? But yes, if you win that point, I agree with the change to replace setHM(HM) with HM createHM() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RFC: sharded linking
What you describe, Alex, is available via the Compiler entry point, though it hasn't been particularly well documented. There is a PermutationWorkerFactory that can create CompilePerms workers. The default worker factory spawns Java VMs on the same machine, but it is possible to write a replacement worker that uses ssh or whatnot to do the work on a separate machine. The way to plug in a replacement worker factory is to set the Java property gwt.jjs.permutationWorkerFactory . That said, I thought the reason for existence of Precompile, CompilePerms, and Link is to get the best build time but at the expense of needing extra configuration. We are finding that by spending a few seconds copying source code over, we save 10+ minutes in Precompile and 10+ minutes in Link. Is copying source code so inconvenient that it would be worth having a slower build? I would have thought any of the following would work to move source code from one machine to another: 1. rsync 2. jar + scp 3. svn up on the slave machines Do any of those seem practical for your situation, Alex? Overall, it's easy to provide an extra build staging as an option, but we support a number of build stagings already Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
On Wed, Feb 10, 2010 at 10:27 AM, Andi Mullaraj andimulla...@gmail.comwrote: I believe changing HMs mid stream is dangerous: 1. Say your (nav edit) widget fires events that are common to both modes (i.e. a simple onOpen) and the widget is by default in nav mode 2 Say A registers an onOpen handler (which gets added to hm1 -- the default HM) then later switches to edit mode (and hm2 kicks in) 3. A will not see the onOpen events while on edit mode! If your nav edit widet stays always in one mode, then createHM would do the trick. But if it switches modes you have to make sure there is no overlapping sets of events ... Another option to achieve this with potentially less danger is to maintain a stack of HandlerManagers. If one HM doesn't handle an event, it goes down to the next one. Then, if you want to have some modal event handling logic, you push a new HM on the stack with its own set of event handlers. When you are done with the modal logic, you pop it off the stack. Event types not handled by the modal event handler fall through to the main one, so in your example onOpen would still get handled properly. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
I still think my proposal solves this for both cases. We add a protected createHandlerManager, which is more restrictive because it is only called once per widget. We also make getHandlerManager() protected, which allows users to replace the HandlerManager if they really want to by overriding getHandlerManager to return one of many. It would be up to the developer to add a setHandlerManager() method in their own widgets that would change the return value of getHandlerManager(), so its intentionally more difficult and therefore forces the developer to think about it a little more. Thanks, John LaBanca jlaba...@google.com On Wed, Feb 10, 2010 at 10:44 AM, Sven Brunken sven.brun...@googlemail.comwrote: On 10 Feb., 16:28, Ray Ryan rj...@google.com wrote: Sven, you're arguing both sides here. You want things to be more customizable in general, but with your specific patch you're trying to be as restrictive as you can to achieve your personal goal. Both patches have the same restriction, once a handlermanager is set or the default one created, there is no way back to change it. I am also ok with a setHandlerManager without restrictions. But than people will have the problem that they will loose handlerregistrations, if they dont know what they are doing (and yes, there are these people). I wanted to make this patch as much fool proof as possible. It should be customaziable, but in a way, that you cannot brake it. I dont think that you really need to change the handlermanager during runtime after you set the first one. You also cannot change the element of a widget once you set the first one. I'm assuming that if we provide an unrestricted setHandlerManager we would also provide a getHandlerManager. It doesn't seem like rocket science to expect someone to check for an existing one if before clobbering it. I'm also assuming that these methods are protected, not part of every widget's public api. Yes sure, protected. They should not be public. I also would argue against providing both createHM and setHM. Redundant API is confusing API, another unfortunate trait of our widget set. Lazy creation can happen in the default implementation of getHM. A custom widget author could override that method to maintain laziness, or call setHM from their constructor to keep ours from ever seeing the light of day. I dont want to add boths. There is no need for it. One approach is more than sufficient. With both ways you would be able to change the default handlermanager (which is the goal in the end). On Tue, Feb 9, 2010 at 9:11 AM, Sven Brunken sven.brun...@googlemail.comwrote: The danger is that if you add handlers, and than later in your code call setHandlerManager with a new HandlerManager. If we dont check for a prior existing HandlerManager, all old HandlerRegistration's will be lost. If you dont know what happened, you will search forever why your old handlers are not working. You wont have the problem with a createHandlerManager method. On 9 Feb., 17:55, Ray Ryan rj...@google.com wrote: If you're right that swapping HMs midstream is a bad idea, I think you need a better argument than it's a bad idea. What's the actual danger? If I'm making my own HM I'm already pretty savvy. Why tie my hands? But yes, if you win that point, I agree with the change to replace setHM(HM) with HM createHM() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RFC: sharded linking
On Wed, Feb 10, 2010 at 10:45 AM, Lex Spoon sp...@google.com wrote: What you describe, Alex, is available via the Compiler entry point, though it hasn't been particularly well documented. There is a PermutationWorkerFactory that can create CompilePerms workers. The default worker factory spawns Java VMs on the same machine, but it is possible to write a replacement worker that uses ssh or whatnot to do the work on a separate machine. The way to plug in a replacement worker factory is to set the Java property gwt.jjs.permutationWorkerFactory . That said, I thought the reason for existence of Precompile, CompilePerms, and Link is to get the best build time but at the expense of needing extra configuration. We are finding that by spending a few seconds copying source code over, we save 10+ minutes in Precompile and 10+ minutes in Link. Is copying source code so inconvenient that it would be worth having a slower build? I would have thought any of the following would work to move source code from one machine to another: 1. rsync 2. jar + scp 3. svn up on the slave machines Do any of those seem practical for your situation, Alex? Overall, it's easy to provide an extra build staging as an option, but we support a number of build stagings already What does make it difficult is that you can't have a pool of worker machines that can build any project that are asked of them without copying the sources to the worker for each request. For a large project, this can get problematic especially when you have to send the transitive dependencies. Besides, what is gained by having the user have to arrange this copying themselves rather than the current method of sending it as part of the compile process? For example, distributed C/C++ compilers send the preprocessed source to the worker nodes, so they don't have to have the source or the same include files, we currently send the AST which is a representation of the source, etc. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
I forgot about that nuance of your proposal. I like. @jat: the stack idea is nifty, but expanding the scope of the patch even worse than I am. And JL's proposal would let one implement that. On Wed, Feb 10, 2010 at 7:56 AM, John LaBanca jlaba...@google.com wrote: I still think my proposal solves this for both cases. We add a protected createHandlerManager, which is more restrictive because it is only called once per widget. We also make getHandlerManager() protected, which allows users to replace the HandlerManager if they really want to by overriding getHandlerManager to return one of many. It would be up to the developer to add a setHandlerManager() method in their own widgets that would change the return value of getHandlerManager(), so its intentionally more difficult and therefore forces the developer to think about it a little more. Thanks, John LaBanca jlaba...@google.com On Wed, Feb 10, 2010 at 10:44 AM, Sven Brunken sven.brun...@googlemail.com wrote: On 10 Feb., 16:28, Ray Ryan rj...@google.com wrote: Sven, you're arguing both sides here. You want things to be more customizable in general, but with your specific patch you're trying to be as restrictive as you can to achieve your personal goal. Both patches have the same restriction, once a handlermanager is set or the default one created, there is no way back to change it. I am also ok with a setHandlerManager without restrictions. But than people will have the problem that they will loose handlerregistrations, if they dont know what they are doing (and yes, there are these people). I wanted to make this patch as much fool proof as possible. It should be customaziable, but in a way, that you cannot brake it. I dont think that you really need to change the handlermanager during runtime after you set the first one. You also cannot change the element of a widget once you set the first one. I'm assuming that if we provide an unrestricted setHandlerManager we would also provide a getHandlerManager. It doesn't seem like rocket science to expect someone to check for an existing one if before clobbering it. I'm also assuming that these methods are protected, not part of every widget's public api. Yes sure, protected. They should not be public. I also would argue against providing both createHM and setHM. Redundant API is confusing API, another unfortunate trait of our widget set. Lazy creation can happen in the default implementation of getHM. A custom widget author could override that method to maintain laziness, or call setHM from their constructor to keep ours from ever seeing the light of day. I dont want to add boths. There is no need for it. One approach is more than sufficient. With both ways you would be able to change the default handlermanager (which is the goal in the end). On Tue, Feb 9, 2010 at 9:11 AM, Sven Brunken sven.brun...@googlemail.comwrote: The danger is that if you add handlers, and than later in your code call setHandlerManager with a new HandlerManager. If we dont check for a prior existing HandlerManager, all old HandlerRegistration's will be lost. If you dont know what happened, you will search forever why your old handlers are not working. You wont have the problem with a createHandlerManager method. On 9 Feb., 17:55, Ray Ryan rj...@google.com wrote: If you're right that swapping HMs midstream is a bad idea, I think you need a better argument than it's a bad idea. What's the actual danger? If I'm making my own HM I'm already pretty savvy. Why tie my hands? But yes, if you win that point, I agree with the change to replace setHM(HM) with HM createHM() -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- I wish this were a Wave -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RFC: sharded linking
there's a fairly large repository based elephant in the room named maven. On Feb 10, 2010, at 7:58 AM, John Tamplin wrote: On Wed, Feb 10, 2010 at 10:45 AM, Lex Spoon sp...@google.com wrote: What you describe, Alex, is available via the Compiler entry point, though it hasn't been particularly well documented. There is a PermutationWorkerFactory that can create CompilePerms workers. The default worker factory spawns Java VMs on the same machine, but it is possible to write a replacement worker that uses ssh or whatnot to do the work on a separate machine. The way to plug in a replacement worker factory is to set the Java property gwt.jjs.permutationWorkerFactory . That said, I thought the reason for existence of Precompile, CompilePerms, and Link is to get the best build time but at the expense of needing extra configuration. We are finding that by spending a few seconds copying source code over, we save 10+ minutes in Precompile and 10+ minutes in Link. Is copying source code so inconvenient that it would be worth having a slower build? I would have thought any of the following would work to move source code from one machine to another: 1. rsync 2. jar + scp 3. svn up on the slave machines Do any of those seem practical for your situation, Alex? Overall, it's easy to provide an extra build staging as an option, but we support a number of build stagings already What does make it difficult is that you can't have a pool of worker machines that can build any project that are asked of them without copying the sources to the worker for each request. For a large project, this can get problematic especially when you have to send the transitive dependencies. Besides, what is gained by having the user have to arrange this copying themselves rather than the current method of sending it as part of the compile process? For example, distributed C/C++ compilers send the preprocessed source to the worker nodes, so they don't have to have the source or the same include files, we currently send the AST which is a representation of the source, etc. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7542 committed - Adding null checks to all History methods to ensure that History is en...
Revision: 7542 Author: gwt.mirror...@gmail.com Date: Wed Feb 10 08:08:40 2010 Log: Adding null checks to all History methods to ensure that History is enabled. http://gwt-code-reviews.appspot.com/138805 http://code.google.com/p/google-web-toolkit/source/detail?r=7542 Added: /trunk/user/test/com/google/gwt/user/HistoryDisabledTest.gwt.xml /trunk/user/test/com/google/gwt/user/client/HistoryDisabledTest.java /trunk/user/test/com/google/gwt/user/client/impl /trunk/user/test/com/google/gwt/user/client/impl/HistoryImplDisabled.java Modified: /trunk/user/src/com/google/gwt/user/client/History.java /trunk/user/test/com/google/gwt/user/UISuite.java === --- /dev/null +++ /trunk/user/test/com/google/gwt/user/HistoryDisabledTest.gwt.xml Wed Feb 10 08:08:40 2010 @@ -0,0 +1,22 @@ +!-- -- +!-- Copyright 2010 Google Inc. -- +!-- Licensed under the Apache License, Version 2.0 (the License); you-- +!-- may not use this file except in compliance with the License. You may -- +!-- may obtain a copy of the License at-- +!-- -- +!-- http://www.apache.org/licenses/LICENSE-2.0 -- +!-- -- +!-- Unless required by applicable law or agreed to in writing, software-- +!-- distributed under the License is distributed on an AS IS BASIS, -- +!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- +!-- implied. License for the specific language governing permissions and -- +!-- limitations under the License. -- +module + inherits name=com.google.gwt.user.User/ + + !-- Replaces HistoryImpl with one that is disabled and does not -- + !-- initialize. -- + replace-with class=com.google.gwt.user.client.impl.HistoryImplDisabled +when-type-is class=com.google.gwt.user.client.impl.HistoryImpl/ + /replace-with +/module === --- /dev/null +++ /trunk/user/test/com/google/gwt/user/client/HistoryDisabledTest.java Wed Feb 10 08:08:40 2010 @@ -0,0 +1,90 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.user.client; + +import com.google.gwt.event.logical.shared.ValueChangeEvent; +import com.google.gwt.event.logical.shared.ValueChangeHandler; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.junit.client.GWTTestCase; + +/** + * Tests for {...@link History} when History is disabled. Most of these tests are + * just assuring that we don't hit an NPE or JS error. + */ +public class HistoryDisabledTest extends GWTTestCase { + + @Override + public String getModuleName() { +return com.google.gwt.user.HistoryDisabledTest; + } + + @SuppressWarnings(deprecation) + public void testAddHistoryListener() { +HistoryListener listener = new HistoryListener() { + public void onHistoryChanged(String historyToken) { + } +}; +History.addHistoryListener(listener); +History.removeHistoryListener(listener); + } + + public void testAddValueChangeHandler() { +HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandlerString() { + public void onValueChange(ValueChangeEventString event) { + } +}); +assertNull(reg); + } + + public void testFireCurrentHistoryState() { +HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandlerString() { + public void onValueChange(ValueChangeEventString event) { +fail(Handler should not have been added.); + } +}); +assertNull(reg); +History.fireCurrentHistoryState(); + } + + @SuppressWarnings(deprecation) + public void testOnHistoryChanged() { +HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandlerString() { + public void onValueChange(ValueChangeEventString event) { +fail(Handler should not have been added.); + } +}); +assertNull(reg); +History.onHistoryChanged(test); + } + + public void testGetToken() { +assertEquals(, History.getToken()); + } + + public void
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
On Wed, Feb 10, 2010 at 10:56 AM, John LaBanca jlaba...@google.com wrote: We also make getHandlerManager() protected, which allows users to replace the HandlerManager if they really want to by overriding getHandlerManager to return one of many. It would be up to the developer to add a setHandlerManager() method in their own widgets that would change the return value of getHandlerManager(), so its intentionally more difficult and therefore forces the developer to think about it a little more. The javadoc for getHandlerManager would have to say that the result can't be cached and should be called each time you need one. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RFC: sharded linking
On Wed, Feb 10, 2010 at 11:01 AM, James Northrup northrup.ja...@gmail.comwrote: there's a fairly large repository based elephant in the room named maven. I'm not sure what that has to do with sharding a compile of a GWT application across a build farm. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7543 committed - HTTPRequest has been deprecated since GWT 1.5 in exchange for RequestB...
Revision: 7543 Author: gwt.mirror...@gmail.com Date: Wed Feb 10 08:14:42 2010 Log: HTTPRequest has been deprecated since GWT 1.5 in exchange for RequestBuilder. This patch removes it completely. http://gwt-code-reviews.appspot.com/139804/show http://code.google.com/p/google-web-toolkit/source/detail?r=7543 Deleted: /trunk/user/src/com/google/gwt/user/client/HTTPRequest.java /trunk/user/src/com/google/gwt/user/client/impl/HTTPRequestImpl.java /trunk/user/test/com/google/gwt/http/client/HTTPRequestTest.java Modified: /trunk/tools/api-checker/config/gwt20_21userApi.conf /trunk/user/test/com/google/gwt/http/HTTPSuite.java === --- /trunk/user/src/com/google/gwt/user/client/HTTPRequest.java Fri Oct 16 14:48:33 2009 +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2007 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the License); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.google.gwt.user.client; - -/** - * This class allows you to make asynchronous HTTP requests to the originating - * server. - * - * @deprecated As of GWT 1.5, replaced by - * {...@link com.google.gwt.http.client.RequestBuilder RequestBuilder}. - */ -...@deprecated -public class HTTPRequest { - - /** - * Makes an asynchronous HTTP GET to a remote server. - * - * @param url the absolute url to GET - * @param handler the response handler to be notified when either the request - * fails, or is completed successfully - * @return codefalse/code if the invocation fails to issue - */ - public static boolean asyncGet(String url, ResponseTextHandler handler) { -return asyncGetImpl(null, null, url, handler); - } - - /** - * Makes an asynchronous HTTP GET to a remote server. - * - * @param url the absolute url to GET - * @param handler the response handler to be notified when either the request - * fails, or is completed successfully - * @return codefalse/code if the invocation fails to issue - */ - public static boolean asyncGet(String user, String pwd, String url, - ResponseTextHandler handler) { -return asyncGetImpl(user, pwd, url, handler); - } - - /** - * Makes an asynchronous HTTP POST to a remote server. - * - * @param url the absolute url to which the POST data is delivered - * @param postData the data to post - * @param handler the response handler to be notified when either the request - * fails, or is completed successfully - * @return codefalse/code if the invocation fails to issue - */ - public static boolean asyncPost(String url, String postData, - ResponseTextHandler handler) { -return asyncPostImpl(null, null, url, postData, handler); - } - - /** - * Makes an asynchronous HTTP POST to a remote server. - * - * @param url the absolute url to which the POST data is delivered - * @param postData the data to post - * @param handler the response handler to be notified when either the request - * fails, or is completed successfully - * @return codefalse/code if the invocation fails to issue - */ - public static boolean asyncPost(String user, String pwd, String url, - String postData, ResponseTextHandler handler) { -return asyncPostImpl(user, pwd, url, postData, handler); - } - - private static native boolean asyncGetImpl(String user, String pwd, String url, - ResponseTextHandler handler) /*-{ -var xmlHttp = @com.google.gwt.xhr.client.XMLHttpRequest::create()(); -try { - xmlHttp.open(GET, url, true); - xmlHttp.setRequestHeader(Content-Type, text/plain; charset=utf-8); - xmlHttp.onreadystatechange = $entry(function() { -if (xmlHttp.readyState == 4) { - $wnd.setTimeout(function() { -xmlHttp.onreadystatechange = @com.google.gwt.user.client.impl.HTTPRequestImpl::nullFunc; - }, 0); - handl...@com.google.gwt.user.client.responsetexthandler::onCompletion(Ljava/lang/String;)(xmlHttp.responseText || ); -} - }); - xmlHttp.send(''); - return true; -} catch (e) { - xmlHttp.onreadystatechange = @com.google.gwt.user.client.impl.HTTPRequestImpl::nullFunc; - return false; -} - }-*/; - - private static native boolean asyncPostImpl(String user, String pwd, String url, - String postData, ResponseTextHandler handler) /*-{ -var xmlHttp = @com.google.gwt.xhr.client.XMLHttpRequest::create()(); -try { -
[gwt-contrib] [google-web-toolkit] r7544 committed - tr...@7542 was merged into this branch...
Revision: 7544 Author: jlaba...@google.com Date: Wed Feb 10 08:16:46 2010 Log: tr...@7542 was merged into this branch Adding null checks to all History methods to ensure that History is enabled. svn merge -c7542 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7544 Added: /releases/2.0/user/test/com/google/gwt/user/HistoryDisabledTest.gwt.xml /releases/2.0/user/test/com/google/gwt/user/client/HistoryDisabledTest.java /releases/2.0/user/test/com/google/gwt/user/client/impl /releases/2.0/user/test/com/google/gwt/user/client/impl/HistoryImplDisabled.java Modified: /releases/2.0/branch-info.txt /releases/2.0/user/src/com/google/gwt/user/client/History.java /releases/2.0/user/test/com/google/gwt/user/UISuite.java === --- /dev/null +++ /releases/2.0/user/test/com/google/gwt/user/HistoryDisabledTest.gwt.xml Wed Feb 10 08:16:46 2010 @@ -0,0 +1,22 @@ +!-- -- +!-- Copyright 2010 Google Inc. -- +!-- Licensed under the Apache License, Version 2.0 (the License); you-- +!-- may not use this file except in compliance with the License. You may -- +!-- may obtain a copy of the License at-- +!-- -- +!-- http://www.apache.org/licenses/LICENSE-2.0 -- +!-- -- +!-- Unless required by applicable law or agreed to in writing, software-- +!-- distributed under the License is distributed on an AS IS BASIS, -- +!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- +!-- implied. License for the specific language governing permissions and -- +!-- limitations under the License. -- +module + inherits name=com.google.gwt.user.User/ + + !-- Replaces HistoryImpl with one that is disabled and does not -- + !-- initialize. -- + replace-with class=com.google.gwt.user.client.impl.HistoryImplDisabled +when-type-is class=com.google.gwt.user.client.impl.HistoryImpl/ + /replace-with +/module === --- /dev/null +++ /releases/2.0/user/test/com/google/gwt/user/client/HistoryDisabledTest.java Wed Feb 10 08:16:46 2010 @@ -0,0 +1,90 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.user.client; + +import com.google.gwt.event.logical.shared.ValueChangeEvent; +import com.google.gwt.event.logical.shared.ValueChangeHandler; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.junit.client.GWTTestCase; + +/** + * Tests for {...@link History} when History is disabled. Most of these tests are + * just assuring that we don't hit an NPE or JS error. + */ +public class HistoryDisabledTest extends GWTTestCase { + + @Override + public String getModuleName() { +return com.google.gwt.user.HistoryDisabledTest; + } + + @SuppressWarnings(deprecation) + public void testAddHistoryListener() { +HistoryListener listener = new HistoryListener() { + public void onHistoryChanged(String historyToken) { + } +}; +History.addHistoryListener(listener); +History.removeHistoryListener(listener); + } + + public void testAddValueChangeHandler() { +HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandlerString() { + public void onValueChange(ValueChangeEventString event) { + } +}); +assertNull(reg); + } + + public void testFireCurrentHistoryState() { +HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandlerString() { + public void onValueChange(ValueChangeEventString event) { +fail(Handler should not have been added.); + } +}); +assertNull(reg); +History.fireCurrentHistoryState(); + } + + @SuppressWarnings(deprecation) + public void testOnHistoryChanged() { +HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandlerString() { + public void onValueChange(ValueChangeEventString event) { +fail(Handler should not have been added.); +