Re: How do I call a stateless session bean (EJB) from my RPC service?
Update: A full JNDI lookup is working, but why do I not get a reference using the annotations? If I have SomeBean --Bean Implementation SomeRef -- Remote Interface SomeRefLocal -- Local Interface then @EJB SomeRef ref; should work to get the remote interface, right? -Steffen- On 25 Mrz., 21:39, stsc...@schliwinski.de wrote: Hi Gregor, thanks for this extensive answer. I deployed a very simple sample application to JBoss but for any reason I cannot access myEJBfrom my RPC service. Neither with the @EJBannotation nor with the @Resource SessionContext ctx statement. That's what my service implementation looks like: package de.stsch.j2ee.gwt.server; import javax.annotation.Resource; import javax.ejb.EJB; import javax.ejb.SessionContext; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import de.stsch.j2ee.ejb.StSch; import de.stsch.j2ee.gwt.client.GwtClientSrc; public class GwtClientSrcImpl extends RemoteServiceServlet implements GwtClientSrc { @EJB StSch bean; @Resource SessionContext ctx; @Override public String getName() { StringBuffer sb = new StringBuffer(); if (ctx == null) { sb.append(ctx is null); } else { sb.append(ctx is not null); } if (bean == null) { sb.append(, bean is null); } else { sb.append(, bean is not null); } return sb.toString(); } } And it always returns that both ctx and bean is null :-( Any idea why? -Steffen- On 25 Mrz., 16:26, gregor greg.power...@googlemail.com wrote: Hi Steffen, The simplest way to do this is to add your GWT app as a module (WAR) to your EAR. The GWT RPC servlets will then have direct access to your session beans local interfaces (which you must define BTW). If you cannot do this for some reason, the situation is a bit trickier. Your standalone Java client probably uses RMI to call your session beans? Is so, then it is calling the beans remote interfaces and call parameters/return values are serialized over the wire. AFAIK you cannot call the local interface of a session bean from a class outside its EAR. You can always use JNDI to look up the remote interfaces of your session beans from a separate GWT module's RPC servlets (which mimics what happens with the Java client) but this involves your app server serializing and deserializing all objects passed betweeen the GWT app and the enterprise app, i.e. the app server will be serializing to itself, which is a serious performance drain you will want to avoid. BTW I think the reason why this is so is that each EAR or WAR deployed on your app server is allocated it's own classloader, so in this situation your session beans are not directly visible by reference to your GWT module classes and visa versa, so they must be called remotely (which means serialization). One way around this is to set up yourEJBapplication as a Resource Adapter ARchive (RAR). This is not normally used in applications as such, and is usually associated with some external data source common to a number of applications in an enterprise situation (a bit like a database, it's comparable to a JDBC). Normally vendors use it, for example Apache Jackrabbit uses a RAR. However this complicates things, and I am not sure you will get optimal performance out of it anyway (although I am not sure, I use RAR's but have never written one myself), but it will probably perform better than using remote interfaces to your session beans. http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic... For these reasons, unless you have the strongest possible reasons for not doing so, I think your best bet is to include your GWT module in your main enterpise application (so it is a WAR inside the EAR) and then you will be able to call your session beans directly from GWT RPC servlets using their local interfaces. This should give you the best performance from the simplest code. regards gregor On Mar 25, 2:15 pm, stsch stsc...@schliwinski.de wrote: In Eclipse I have one project (j2eeEjb) containing the Enterprise Java Beans, one projects (j2eeClient) contains the corresponding Remote Interfaces and one project (j2eeEar) only assembles everything into an ear-file. The resulting ear-file contains 2 jar-files, j2eeEjb.jar and j2eeClient.jar; this is the corresponding application.xml of the ear- file ?xml version=1.0 encoding=ASCII? application xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:application=http:// java.sun.com/xml/ns/javaee/application_5.xsd
Re: How to disable/enable widget components?
[code] RadioButton radio1 = new RadioButton(group1, disabled radio); radio1.setEnabled(false); [/code] I think that would do for you ;) On Thursday 26 March 2009 06:12:14 Vikas wrote: Hi All, I want to disable/enable RadioButton on some action, how to do this? I don't want to hide/unhide. Thanks in advance, Vikas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
RPC Performance/Response Problem
First of all: Hi to everyone! I'm new to GWT and just programming my first app. Since i've some experience in Java it's not a big problem, but in this case i am stuck and hopefully someone can help me. In my app i make a RPC: On server side i get some data out of a database and save it into an array of type String. Up to 10.000 Strings atm, later on maybe up to 50.000. It is no problem so far. The server is handling this really fast. I measured 5 RPCs with about 500 Strings each and it took less time than 200 milliseconds each (SQL Statement + creating the array). The problem now is: I have to wait 5 SECONDS to get the results of the RPC (the String[] created on the server) on the client side so i can do something with them. Regarding the overall time i measured, these 5 seconds are more than 75% of the time which my app needs. Is it possible that the serialization and deserialization takes that much time? I don't think so and i have no clue where this 5 seconds come from. If someone has any ideas, solutions, suggestions on this problem i would appreciate any help! Thanks in advance, -Lord-67 P.s.: Of course i searched for a solution for this problem for hours, if i somehow just typed the wrong keywords to get the fitting results, just let me know and post a 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Setting FocusPanel as a cell to FlexTable and DragAndDrop for FlexTable
Hi, I have a FlexTable which contains FocusPanel as a cell.. I am having DragAndDrop functionality for the FlexTable. It's working fine.. But I want the additional functionality too that determine which cell is clicked.. I added TableListener to the FlexTable.. When I click at the corner of the cell then it's working.. But if I click in the middle of the row anywhere then it's not working.. I tried to add ClickListener to the FocusPanel which I am setting as a cell to the FlexTable.. But it's also giving the same problem.. Is there any other method for this? Can anyone help? thanks, Priya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: RPC Performance/Response Problem
On Thu, Mar 26, 2009 at 9:46 AM, -Lord-67 -lord...@web.de wrote: First of all: Hi to everyone! I'm new to GWT and just programming my first app. Since i've some experience in Java it's not a big problem, but in this case i am stuck and hopefully someone can help me. In my app i make a RPC: On server side i get some data out of a database and save it into an array of type String. Up to 10.000 Strings atm, later on maybe up to 50.000. It is no problem so far. The server is handling this really fast. I measured 5 RPCs with about 500 Strings each and it took less time than 200 milliseconds each (SQL Statement + creating the array). The problem now is: I have to wait 5 SECONDS to get the results of the RPC (the String[] created on the server) on the client side so i can do something with them. Regarding the overall time i measured, these 5 seconds are more than 75% of the time which my app needs. Is it possible that the serialization and deserialization takes that much time? I don't think so and i have no clue where this 5 seconds come from. If someone has any ideas, solutions, suggestions on this problem i would appreciate any help! Seems your bootleneck is in the browser. Javascript is not very fast. Try Chrome and if it is faster you can blame javascript . You can make chunks of 1000 Strings and update the UI in steps. The overwall performance (throughput) will be worse, but the speed perception will be much better (latency), --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Building toCollege-net Web site
Hello Being new to GWT, I wanted to follow the application toCollege.net Unfortunately, I couldn't build it, I'm following the Building toCollege.net pdf document, I checked out the code using svn, no problem. But when I try mvn compile, I got this unexpected exception: [ERROR] Exception in thread main java.lang.NoClassDefFoundError: com/ google/gwt/dev/GWTCompiler Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.GWTCompiler at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) Any ideas?? thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Creating images and/or writing text vertically
here is a little bit more complex problem.. I'm using canvas and would like to label some elements (ImageElement) vertically - text rotated 90 degrees left. 1. I found no possibility to do that directly. 2. The next idea was to create an image on the fly with the rendered text and then to rotate the image. Is this possible? Since it's inside canvas I can not use the Image class just ImageElement. Is there a way to accomplish my idea? thanks, robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Problem with french special character in GWT
Hi, I have a simple GWT application which takes String and gives me reverse of the string. Problem here is that when i send the String to servlet and try to print it there ? is printed on tomcat instead of special characters for french. Same is happening with Russian characters. But i am getting correctly reversed string at client side when display result as a popup. Can any one explain me why is it behaving so? Will it get stored in database properly if i want to do so? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
ScrollPanel problem in Chrome/Safari
Hello everyone. I have this situation: ___ |ScrollPanel | | __ | | | AbsolutePanel| | | | | | | | ___ | | | | | cell selector| | | | | |__ | | | | | | | | | | | | |_| | |__| When the users clicks the absolute panel (which has a background image simulating a grid) the cell selector is moved in order to visually- simulate the cell selection. It works fine on firefox and IE, but on webkit-based browsers when the ScrollPanel has been scrolled and I click on the absolutePanel, it automatically scrolls back the scrollPanel to [0,0]. Any ideas? It is a bug in GWT or I must compute the [top,left] of the cell selector in a different way? Here is how I compute the cell selector's top and left: [code] public void clickAction(Event event){ int x = DOM.eventGetClientX(event) - DOM.getAbsoluteLeft(getElement()) + DOM.getElementPropertyInt(getElement(), scrollLeft) + Window.getScrollLeft(); int y = DOM.eventGetClientY(event) - DOM.getAbsoluteTop(getElement()) + DOM.getElementPropertyInt(getElement(), scrollTop) + Window.getScrollTop(); Calendario.eventsContainer.setWidgetPosition (Calendario.eventAreaSelector, x - (x % CalUtils.getDayWidth()), y - (y % CalUtils.UNIT_HEIGHT)); } [/code] Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Flash with GWT
Hi All, I have a web page where i am using Flash and GWT both, i am using GWT's popup thing. Non flash screen part of the page shows the popup correctly but the screen part where flash is, it hides the popup under it. I can see that the potion of popup which should be on the top of Flash part is hidden and the otehr part is visible as there is no flash on that part. I remember that in JS/CSS we used to use z-index kind of this to make such ordering of JS object, but how to do that with flash. Any comments/Suggestion? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: problems in IE6 modifying DOM nodes
For anyone that's interested, the problem is solved by using the correct document object. I started by using elem.ownerDocument instead of document. However, I've found some gwt-docs that say you should use $doc instead of document. On Mar 20, 2:49 pm, johnpearcey john.pear...@gmail.com wrote: This looks a little like a GWT compiler bug but I'm not sure. All methods that manipulate a DOM node fail in IE6 where native script calls are made. They work fine in Firefox and hosted mode. I am obtaining scripts from a database and running it using eval(). At first I suspected a compiler optimisation bug but have since found that a more straightforward call will not work on IE6. For example: public static native void eval_js( Node elem, String evalCode )/*-{ elem.appendChild( document.createTextNode(Math.random()) ); }-*/; Under IE6, catching the exception in GWT gives the following information: (Error): Invalid argument. number -2147024809 description: Invalid argument. Firefox and GWT hosted mode both work fine. The node concerned is correctly attached both physically and logically. It seems that any attempt to break into native script calls give the same problem. Interestingly enough the following call works fine: alert( elem.nodeType ); It seems as if the node is read-only??? Has anyone experienced this? I've been working one this for two days now and have run out of work-around 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How do I call a stateless session bean (EJB) from my RPC service?
yes it should, equally @EJB SomeRefLocal localRef should too. On Mar 26, 7:18 am, stsc...@schliwinski.de wrote: Update: A full JNDI lookup is working, but why do I not get a reference using the annotations? If I have SomeBean --Bean Implementation SomeRef -- Remote Interface SomeRefLocal -- Local Interface then @EJB SomeRef ref; should work to get the remote interface, right? -Steffen- On 25 Mrz., 21:39, stsc...@schliwinski.de wrote: Hi Gregor, thanks for this extensive answer. I deployed a very simple sample application to JBoss but for any reason I cannot access myEJBfrom my RPC service. Neither with the @EJBannotation nor with the @Resource SessionContext ctx statement. That's what my service implementation looks like: package de.stsch.j2ee.gwt.server; import javax.annotation.Resource; import javax.ejb.EJB; import javax.ejb.SessionContext; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import de.stsch.j2ee.ejb.StSch; import de.stsch.j2ee.gwt.client.GwtClientSrc; public class GwtClientSrcImpl extends RemoteServiceServlet implements GwtClientSrc { @EJB StSch bean; @Resource SessionContext ctx; @Override public String getName() { StringBuffer sb = new StringBuffer(); if (ctx == null) { sb.append(ctx is null); } else { sb.append(ctx is not null); } if (bean == null) { sb.append(, bean is null); } else { sb.append(, bean is not null); } return sb.toString(); } } And it always returns that both ctx and bean is null :-( Any idea why? -Steffen- On 25 Mrz., 16:26, gregor greg.power...@googlemail.com wrote: Hi Steffen, The simplest way to do this is to add your GWT app as a module (WAR) to your EAR. The GWT RPC servlets will then have direct access to your session beans local interfaces (which you must define BTW). If you cannot do this for some reason, the situation is a bit trickier. Your standalone Java client probably uses RMI to call your session beans? Is so, then it is calling the beans remote interfaces and call parameters/return values are serialized over the wire. AFAIK you cannot call the local interface of a session bean from a class outside its EAR. You can always use JNDI to look up the remote interfaces of your session beans from a separate GWT module's RPC servlets (which mimics what happens with the Java client) but this involves your app server serializing and deserializing all objects passed betweeen the GWT app and the enterprise app, i.e. the app server will be serializing to itself, which is a serious performance drain you will want to avoid. BTW I think the reason why this is so is that each EAR or WAR deployed on your app server is allocated it's own classloader, so in this situation your session beans are not directly visible by reference to your GWT module classes and visa versa, so they must be called remotely (which means serialization). One way around this is to set up yourEJBapplication as a Resource Adapter ARchive (RAR). This is not normally used in applications as such, and is usually associated with some external data source common to a number of applications in an enterprise situation (a bit like a database, it's comparable to a JDBC). Normally vendors use it, for example Apache Jackrabbit uses a RAR. However this complicates things, and I am not sure you will get optimal performance out of it anyway (although I am not sure, I use RAR's but have never written one myself), but it will probably perform better than using remote interfaces to your session beans. http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic... For these reasons, unless you have the strongest possible reasons for not doing so, I think your best bet is to include your GWT module in your main enterpise application (so it is a WAR inside the EAR) and then you will be able to call your session beans directly from GWT RPC servlets using their local interfaces. This should give you the best performance from the simplest code. regards gregor On Mar 25, 2:15 pm, stsch stsc...@schliwinski.de wrote: In Eclipse I have one project (j2eeEjb) containing the Enterprise Java Beans, one projects (j2eeClient) contains the corresponding Remote Interfaces and one project (j2eeEar) only assembles everything into an ear-file. The resulting ear-file contains 2 jar-files, j2eeEjb.jar and j2eeClient.jar; this is the corresponding application.xml of the ear- file ?xml version=1.0 encoding=ASCII? application
Re: como agregar imagen bmp en backround
gracias On 18 mar, 11:06, El Mentecato Mayor rogelio.flo...@gmail.com wrote: Pacholi, En tu página principal, simplemente usa un estilo CSS en el Panel que uses ahí que tenga una imagen de fondo, luego cambias en las demás páginas, si cambias el Panel, entonces se irá, si no, entonces simplemente cambias el estilo CSS por uno que no tenga esa imagen (usando .setStyleName(tu-estilo)) en el Panel o widget al que le quieras cambiar el estilo (imagen). On Mar 16, 4:59 pm, Pacholi aguirre.a.marc...@gmail.com wrote: necesito agregar imagen que se cargue una sola vez en pagina principal, luego la navegar por las demas paginas que omita esta imagen de fondo,.- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Cypal Studio v2 - care for a spin?
Great new ! Work nicely for me (window) tonight I will test under linux and mac os x. * During the launch it would be nice to add tools.jar (jdk) to be able to compile jsp. * A more maven layout option would be also a good think I suppose. Thx for cypal. On Wed, Mar 25, 2009 at 7:14 PM, Prakash G.R. grprak...@gmail.com wrote: Hi All, GWT 1.6 is about to be released and it has got lot of changes, which renders the existing Cypal Studio 1.0 incompatible. I've to go back to my drawing board for V 2. Few weekends and few more longer nights, now the code compiles. So here is the alpha released today. Important points to note: (*) Cypal Studio is no longer a WTP Facet. Which also means that there is no dependency on EMF/WTP. All you need is Eclipse SDK (3.4 or above) (*) Not all the features are working and its guaranteed to crash your Eclipse. I would advise you use it with a temporary workspace (*) Download link: http://cypal-studio.googlecode.com/files/in.cypal.studio.for.gwt-2.alpha..zip (*) Raise bugs here: http://code.google.com/p/cypal-studio/issues/list Download; unzip to eclipse/dropins folder; set the GWT version in the preference page; create a new GWT project; start playing around. And more importantly, when you are done, do give me your feedback on the changes! - Prakash “People are meant to be loved and things are meant to be used. But unfortunately, people are being used and things are being loved” -- It is better to have a known enemy than a forced ally - Napoleon Bonaparte --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
deferred binding
I have been trying to find out if there is a way to use deferred binding to load code that has been compiled at different times. Most of the documentation is about a single compiler pass over the code. The reason I need this is because I am writing a framework that can host components in a type of builder application, a bit like say Visual Basic would be able to load ActiveX controls onto a pallet for a developer to use. It seems like dynamic binding is what I require and I have read that it is not available. I can already call JavaScript methods (using overlays etc) from my application which requests them from a remote database and loads them at runtime. This works great but of course, since I have to write the first set of components myself, I really want to use the GWT and not hand write them all in JS. I would also prefer my development team to use GWT as well. Is anything like this possible. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
how to easily plug-in a mock remote service
Hello, I would like to unit test my application plugging a mock remote service implementation. As far as I know in version 1.5 that is being used, hosted mode uses servlet path=/myService class=test.myServiceImpl / line in module.gwt.xml file to refer to the right servlet. Who knows if if there is a programmable way so that in a junit set-up method one could specify that another (mock) service should be used, without having to replace the appropriate line in xml? thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Event listening on ListBox in a CaptipnPanel's Legend
Hello! A CaptionPanel can contains HTML in its legend. I hve to add a ListBox- Element there. But I have to listen on it (change- events). How do I have to add the ListBox as a part of the legend- Element to the Caption so that I still can listen on its events? Thank you very much! -Danny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Two TabPanels, different CSS styles
Thanks a lot Gregor. I was struggling with remove the default styles from the tabpanel. This is very helpful. On Feb 27, 7:12 am, gregor greg.power...@googlemail.com wrote: CSS is often hierarchical in GWT widgets. You have a primary style name and then additional secondary styles that are swapped out according to user actions (like select, hover etc). With a Tab panel the tabs are controlled by the TabBar class, and you can see it has a primary style gwt-TabBar and a selection of additional styles. .gwt-TabBar { } .gwt-TabBar .gwt-TabBarFirst { } .gwt-TabBar .gwt-TabBarRest { } .gwt-TabBar .gwt-TabBarItem { } .gwt-TabBar .gwt-TabBarItem-selected { } To custom style TabBars differently all you have to do is copy this template CSS and replace gwt-TabBar with my-TabBar. Then you set the style as: myTabPanel.getTabBar().setPrimaryStyleName(my-TabBar); Do not change the gwt- part of the secondary style names as the internal TabBar code won't recognize them. E.g. you end up with .my-TabBar .gwt-TabBarItem-selected { } So you can have as many different styles for the same GWT widget class within the same application as you like. On Feb 27, 4:25 am, Ananda ananda.hayavadh...@googlemail.com wrote: I belive you can do it.. Use the different style name , it will work Regards, AR -Original Message- From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Master Shake Sent: Friday, February 27, 2009 8:18 AM To: Google Web Toolkit Subject: Two TabPanels, different CSS styles Is there a way to have different css styles for two of the same GWT composite types (i.e. TabPanels) in the same document? I have two TabPanels and I want one TabPanel to have larger tabs... Thanks, -ms --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: deferred binding
There's nothing preventing you from writing the code in GWT. However, AFAIK, there's no support for dynamically loading GWT modules. You have to write your own framework for now as far as I know to do this dynamically. On Thu, Mar 26, 2009 at 9:34 AM, johnpearcey john.pear...@gmail.com wrote: I have been trying to find out if there is a way to use deferred binding to load code that has been compiled at different times. Most of the documentation is about a single compiler pass over the code. The reason I need this is because I am writing a framework that can host components in a type of builder application, a bit like say Visual Basic would be able to load ActiveX controls onto a pallet for a developer to use. It seems like dynamic binding is what I require and I have read that it is not available. I can already call JavaScript methods (using overlays etc) from my application which requests them from a remote database and loads them at runtime. This works great but of course, since I have to write the first set of components myself, I really want to use the GWT and not hand write them all in JS. I would also prefer my development team to use GWT as well. Is anything like this possible. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT Serialization ???
Hi, I am new to GWT and I have been playing around with GWT. Now I want to retrieve via hibernate using a RemoteService call ths content from a database. I have already a jar (provided by the db guys) where the domain is reflected. The problem I have is when I use it I always receive serialization problems form some classes of the domain. I know that if I extend my entity classes wit IsSerializable than the serialization works fine and I have no problem. I have been reading around and found that if you add your class to the *.gwt.rpc file than this would to the trick, well for me it didn't work, still serialization problem. I googled and found the Gilead project (former hibernate4gwt), what I don't like is that I have to extend my entity classes, but I am not allowed I am not maintining the db classes. So I am a bit stuck and after googling for last few days I didn't manage to find a proper solution. How can I get rid of the serialization problem, any suggestions are welcome? Thanks, Jero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Serialization ???
If you don't have access to the source for your hibernate objects, then you'll need to create DTOs (data transfer objects) that are essentially identical to your hibernate objects. You can then manually marshal the values, or use a bean mapping library such as Dozer to do the work automagically. I generally use this technique even when I have the source for my server side objects as most of my objects have information that is not appropriate to send to the client anyway. -jason On Mar 26, 2009, at 7:41 AM, jero wrote: Hi, I am new to GWT and I have been playing around with GWT. Now I want to retrieve via hibernate using a RemoteService call ths content from a database. I have already a jar (provided by the db guys) where the domain is reflected. The problem I have is when I use it I always receive serialization problems form some classes of the domain. I know that if I extend my entity classes wit IsSerializable than the serialization works fine and I have no problem. I have been reading around and found that if you add your class to the *.gwt.rpc file than this would to the trick, well for me it didn't work, still serialization problem. I googled and found the Gilead project (former hibernate4gwt), what I don't like is that I have to extend my entity classes, but I am not allowed I am not maintining the db classes. So I am a bit stuck and after googling for last few days I didn't manage to find a proper solution. How can I get rid of the serialization problem, any suggestions are welcome? Thanks, Jero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
calling RPC service from Java using GWT 1.5
Hi I'm trying to do what's stated in the subject. I thought I could use javaongems to do that with the following code : - import org.javaongems.core.jclient.Gwt; import com.google.gwt.user.client.rpc.ServiceDefTarget; public class JavaRpcClient { static public void main(String[] args) throws Exception { Object myService = Gwt.create(my.package.MyService.class); ((ServiceDefTarget) rpc).setServiceEntryPoint(http:// service-url.com); [...] } } - However when I try and run this code, I get : Exception in thread main java.lang.NoClassDefFoundError: com/google/ gwt/user/server/rpc/impl/ServerSerializableTypeOracle at org.javaongems.core.jclient.Gwt.create(Gwt.java:29) at org.bioversityinternational.webmgis.server.rpcclient.JavaRpcClient.main (JavaRpcClient.java:14) My guess is, ServerSerializableTypeOracle is an old class which is not any more distributed with GWT (the javaongems jar I found is almost 2.5 years old). Well all this makes sense, but now my question is, is there an alternative? Thanks in advance, Guilhem --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: RPC Performance/Response Problem
Have you tried using a List instead of an array? On Mar 26, 2:46 am, -Lord-67 -lord...@web.de wrote: First of all: Hi to everyone! I'm new to GWT and just programming my first app. Since i've some experience in Java it's not a big problem, but in this case i am stuck and hopefully someone can help me. In my app i make a RPC: On server side i get some data out of a database and save it into an array of type String. Up to 10.000 Strings atm, later on maybe up to 50.000. It is no problem so far. The server is handling this really fast. I measured 5 RPCs with about 500 Strings each and it took less time than 200 milliseconds each (SQL Statement + creating the array). The problem now is: I have to wait 5 SECONDS to get the results of the RPC (the String[] created on the server) on the client side so i can do something with them. Regarding the overall time i measured, these 5 seconds are more than 75% of the time which my app needs. Is it possible that the serialization and deserialization takes that much time? I don't think so and i have no clue where this 5 seconds come from. If someone has any ideas, solutions, suggestions on this problem i would appreciate any help! Thanks in advance, -Lord-67 P.s.: Of course i searched for a solution for this problem for hours, if i somehow just typed the wrong keywords to get the fitting results, just let me know and post a 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-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Flash with GWT
There's not much you can do about this :) This happens for the same reason that dropdown menus burn through 'popunders' like you describe. Try creating a new popup class that uses an IFRAME to show your element, and then it won't burn through to the second iframe. Sucks, yes. On Mar 26, 6:28 am, ping2ravi ping2r...@gmail.com wrote: Hi All, I have a web page where i am using Flash and GWT both, i am using GWT's popup thing. Non flash screen part of the page shows the popup correctly but the screen part where flash is, it hides the popup under it. I can see that the potion of popup which should be on the top of Flash part is hidden and the otehr part is visible as there is no flash on that part. I remember that in JS/CSS we used to use z-index kind of this to make such ordering of JS object, but how to do that with flash. Any comments/Suggestion? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: IE vertical scrollbar triggers a horizontal scrollbar
hi tony, thank you. i had also found that solution programatically: DOM.setStyleAttribute(scrollPanel.getElement(), overflowX, hidden); but there is catch: that way, vertical scrollbar steals from widgets area. one needs to place proper padding to rightside. On Mar 25, 6:57 pm, Tony Strauss tony.stra...@designingpatterns.com wrote: We've had this issue too (in IE6 and IE7). Our solution was to set the 'overflow' to 'hidden' in the ScrollPanel's CSS: .designingpatterns-Table-Grid-ScrollPanel { overflow-x: hidden !important; overflow-y: auto !important; } The '!important' annotation is necessary. Tony -- Tony Strauss Designing Patterns, LLChttp://www.designingpatterns.comhttp://blogs.designingpatterns.com On Mar 25, 12:07 am, r a f t hakan.erya...@gmail.com wrote: hello, i have some content widget, which is placed into a pixel sized ScrollPanel. the widget easily fits into ScrollPanel by its width. in IE6 when widget's height is more than ScrollPanel, vertical scroll bar appears, which in turn (i guess so) triggers horizontal scrollbar to create space for vertical scrollbar. when widget is shorter by height no scrollbar appears. i tried both setting width of widget to 100% and remain it unset. in firefox it works as expected (no horizontal scrollbar). i didn't test it for other IE versions any ideas how to fix this ? setting width of widget to 90% or some pixel width may help (didnt try), but i prefer them as last choices as they depend on scrollbar width. thanks, r a f t --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: calling RPC service from Java using GWT 1.5
On Thu, Mar 26, 2009 at 10:22 AM, gui@gmail.com gui@gmail.com wrote: I'm trying to do what's stated in the subject. I thought I could use javaongems to do that with the following code : - import org.javaongems.core.jclient.Gwt; import com.google.gwt.user.client.rpc.ServiceDefTarget; public class JavaRpcClient { static public void main(String[] args) throws Exception { Object myService = Gwt.create(my.package.MyService.class); ((ServiceDefTarget) rpc).setServiceEntryPoint(http:// service-url.com); [...] } } - However when I try and run this code, I get : Exception in thread main java.lang.NoClassDefFoundError: com/google/ gwt/user/server/rpc/impl/ServerSerializableTypeOracle at org.javaongems.core.jclient.Gwt.create(Gwt.java:29) at org.bioversityinternational.webmgis.server.rpcclient.JavaRpcClient.main (JavaRpcClient.java:14) My guess is, ServerSerializableTypeOracle is an old class which is not any more distributed with GWT (the javaongems jar I found is almost 2.5 years old). Well all this makes sense, but now my question is, is there an alternative? You may want to search the archives of this list for some keywoards relevant to what you're trying to do. Every now and then someone asks, and the answer is always you can't get there from here. GWT's RPC wire format is optimized for web-browser to web-server communication. There are all kinds of implementation details that assume the client is GWT-compiled Javascript. Hosted mode is Java-on-a-JVM, so it's obviously possible to do what you're trying to do, but the overhead is not worth it for real Java applications (you'd have to either run hosted mode or re-implement the client-side RPC goo). You need to refactor your server to be able to handle the same request from two or more different kinds of clients and funnel all the requests through the same business logic. Complicating your clients by making them speak GWT RPC is the path to insanity. Ian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Flash with GWT
Hello, If the transparent option is applied on the flash object, than it will have the same z-order as its containing dom element. You can also use the swfobject's gwt wrapper to add flash components to your site. Best - István On Thu, Mar 26, 2009 at 6:29 PM, lukehashj bobwazn...@gmail.com wrote: There's not much you can do about this :) This happens for the same reason that dropdown menus burn through 'popunders' like you describe. Try creating a new popup class that uses an IFRAME to show your element, and then it won't burn through to the second iframe. Sucks, yes. On Mar 26, 6:28 am, ping2ravi ping2r...@gmail.com wrote: Hi All, I have a web page where i am using Flash and GWT both, i am using GWT's popup thing. Non flash screen part of the page shows the popup correctly but the screen part where flash is, it hides the popup under it. I can see that the potion of popup which should be on the top of Flash part is hidden and the otehr part is visible as there is no flash on that part. I remember that in JS/CSS we used to use z-index kind of this to make such ordering of JS object, but how to do that with flash. Any comments/Suggestion? -- Üdvözlettel Best Regards - István Szoboszlai ist...@szoboszlai.eu Tel: 0036305658018 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Flash with GWT
wmode = opaque does the trick in some situations. you need to add it both as a param and in the embed though. n. On Thu, Mar 26, 2009 at 1:28 PM, ping2ravi ping2r...@gmail.com wrote: Hi All, I have a web page where i am using Flash and GWT both, i am using GWT's popup thing. Non flash screen part of the page shows the popup correctly but the screen part where flash is, it hides the popup under it. I can see that the potion of popup which should be on the top of Flash part is hidden and the otehr part is visible as there is no flash on that part. I remember that in JS/CSS we used to use z-index kind of this to make such ordering of JS object, but how to do that with flash. Any comments/Suggestion? -- --- Ave bossa nova, similis bossa seneca --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Event listening on ListBox in a CaptipnPanel's Legend
Is it possible to do this? 2009/3/26 Danny Schimke schimk...@googlemail.com Hello! A CaptionPanel can contains HTML in its legend. I hve to add a ListBox- Element there. But I have to listen on it (change- events). How do I have to add the ListBox as a part of the legend- Element to the Caption so that I still can listen on its events? Thank you very much! -Danny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: extending RichTextArea
Hi I'am still working on the project. I'am having any difficulties: 1) I can not control the position of the cursor within the RichTextArea. I's there any native javascript method to move the corsor for example to the end of the text in the area? 2) Suppose i typed while in the text area. I want to paint that word. Can i paint only that word without paint the others word in the richTextArea?? 3) I have seen tha TextArea implements some functions to control the position of the cursor. Why RichTextArea does not?? 4) the last problem: when i call the method setText(String text) on a RichTextArea the cursor is the moved to th beginning of the text in the area. Is there a way to call setText and than have te cursor at the end of the text in the area?? thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How can I combine 2 projects into one with gwt 1.6+?
Hi Brandon, I'm not clear why you would need to compile the sub modules independently from the main module. The GWT compiler performs a monolithic compilation for each module it compiles, therefore the submodules would be completely independent from the main module if they were compiled separately. It seems like if you want to reuse those submodules, the best way would be to reference them from your main project (linking source in Eclipse, for example), and adding the submodules to your main GWT compilation target as shown in the ant snippet. If you have server-side classes that you want to compile separately and include in the main project, you should probably set up a build target that will javac those classes and copy them over to the main GWT project directory. The gwtc target would then be dependent on that step before being able to perform its own GWT compilation. Putting into context of your next goals, 3. would be solved by what was described in the last paragraph. 1. and 2. might not need to be explicit goals since compiling separately probably won't be of much value for what I think you're trying to do. Although I may have misundertstood the purposes for goals 1 2. Hope that helps, -Sumit Chandel On Sun, Mar 22, 2009 at 4:01 PM, branflake2267 branflake2...@gmail.comwrote: Hi Sumit Chandel, Thanks for taking the time to answer my questions! The Ant setup is heading in the right direction for me. I haven't figured out how to include other modules in ant. I have figured out how to include them in the debug configurations, and libraries in eclipse. I would prefer to use the jar, but I am building both modules actively, and compiling into a jar and including it would take longer to develop the project. http://code.google.com/p/gwt-examples/wiki/module_inherit - my docs so far in including gwt source modules/projects. Here are my projects I am experimenting on, and must figure out how to include them so I can move on. http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/Navigation- main project http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/gwt-System - common widgets My Goals: 1. configure ant to compile gwt like hosted mode - compile both the main module and the sub modules 2. copy the module to the main project 3. copy the compiled classes of the other project to the main module You guys are doing an excelent job with GWT!!! Thanks, Brandon On Mar 5, 1:34 am, Sumit Chandel sumitchan...@google.com wrote: Hi Brandon, I think the typical way to reuse an existing GWT module in another is to package that module into a JAR file (source included) and then refer to the module from main project in its module XML file, as you did above. You would then add that JAR to any launch or compilation scripts so that all references would be resolved while running hosted mode or the GWT compiler. In the same way, you would refer to this JAR in your ant build.xml file for gwtc or hosted mode startup targets. You could also refer to the GWT module's source folder and classpath directly, as you did in your Eclipse configurations. This should also work in Ant by defining the appropriate path element. Something like the snippet below should do the trick: path id=apple.class.path fileset dir=../Apple/src/com/gawkat/gwt/apple/client include name=**/*.java/ /fileset /path 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=apple.class.path/ pathelement location=${gwt.home}/${gwt.dev.jar}/ /classpath jvmarg value=-Xmx256M/ arg value=com.gawkat.gwt.Test/ /java /target This would be in addition to other path elements you would need to define to build your project. Hope that helps, -Sumit Chandel On Wed, Mar 4, 2009 at 8:23 AM, branflake2267 branflake2...@gmail.com wrote: How do I include the classpath for another module so ant will build? - My main module com.gawkat.gwt.Test - In Text.gwt.xml file I include inherits name='com.gawkat.gwt.Apple'/ - I have added Apple projects classpath and src folder to Test Debug Configurations classpath and hosted mode will build the projects. So How can I get Ant to Compile it? Run As Build.xml in com.gawkat.gwt.Test : Buildfile: /home/branflake2267/workspace2/Test/build.xml libs: javac: gwtc: [java] Loading module 'com.gawkat.gwt.Test' [java]Loading inherited module 'com.gawkat.gwt.Apple' [java] [ERROR] Unable to find 'com/gawkat/gwt/ Apple.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? [java][ERROR] Line 15: Unexpected exception while processing element 'inherits'
Re: How Can I Rebuild A Library From Source In Eclipse?
Hi Superman859, I'm not sure how to build the OFC GWT project from source, but chances are it follows the same build rules for building GWT from source. No guarantees on that, but if you want to first know how to build GWT from source so that you can get started building OFC GWT with that, check out the docs below: Making GWT Better: http://code.google.com/webtoolkit/makinggwtbetter.html#workingoncode Hope that helps, -Sumit Chandel On Sun, Mar 22, 2009 at 3:37 PM, Superman859 russ.d.hollo...@gmail.comwrote: I use Eclipse for GWT, and I'm trying to use a third party library (OFC GWT) for charting. The most recent version of source code in Subversion repository seems to have the changes I require, but the downloadable JAR file doesn't have those changes in it yet. Can someone explain how I can take the source code and compile it to a usable JAR library for GWT? I can't seem to find this information anywhere, but it would be highly useful as I often want to fix a bug or two in some libraries when I try to fix them, but I do not know how to compile / generate the JAR library afterwards to test out and use my adjustments. In Eclipse, I know there is an Export - Jar File option. However, when I use this on the project, the 'resources' box on the left is empty, and no files will be added to the JAR file. I'm not sure if this is because there is no Main method (it isn't a typical Java program), or what it has to do with as I have never created a JAR library before. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: do i have to make showcase as a module and inherit this module in my projecc
Hi Coonay, The Showcase sample application is a GWT module, in the sense that it defines its own module XML file describing its GWT application structure. You could JAR it up and reference it with an inherits tag in your own module XML file to reuse its widgets, but I think that's far more effort than is necessary if all you want to do is reuse the RichTextToolbar. If that is indeed all you want to do, I would suggest simply copying the source code into your project and reusing it that way. You will need to do some minor tweaks to the source to adapt it to your project, but they should all be pretty straightforward changes to make. If you have any trouble, feel free posting up here to troubleshoot. Hope that helps, -Sumit Chandel On Sun, Mar 22, 2009 at 9:39 PM, Coonay fla...@gmail.com wrote: i wanna test RichTextToolbar Widget, some of my module config in the xml is : !-- Inherit the core Web Toolkit stuff.-- inherits name='com.google.gwt.user.User'/ !-- 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'/ -- inherits name=com.google.gwt.core.Core/ inherits name=com.google.gwt.i18n.I18N/ but there is always an error in development shell console:No source code is available for type RichTextToolbar; did you forget to inherit a required module? In order to use showcase example do i have to make showcase as a module and inherit this module in my projecct? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How Can I Rebuild A Library From Source In Eclipse?
The GWT compiler requires the source (.java) files, and hosted mode works with bytecode (.class), so it is generally as simple as packaging all of the source and bytecode files into the jar. have a look at the gwt-user.jar for an example of what that looks like. The other option is to simply import the svn checkout (source) into eclipse, and use that with your project directly. Sometimes this is an easier route to go anyway, especially if you are modifying the source regularly. -jason On Mar 22, 2009, at 4:37 PM, Superman859 wrote: I use Eclipse for GWT, and I'm trying to use a third party library (OFC GWT) for charting. The most recent version of source code in Subversion repository seems to have the changes I require, but the downloadable JAR file doesn't have those changes in it yet. Can someone explain how I can take the source code and compile it to a usable JAR library for GWT? I can't seem to find this information anywhere, but it would be highly useful as I often want to fix a bug or two in some libraries when I try to fix them, but I do not know how to compile / generate the JAR library afterwards to test out and use my adjustments. In Eclipse, I know there is an Export - Jar File option. However, when I use this on the project, the 'resources' box on the left is empty, and no files will be added to the JAR file. I'm not sure if this is because there is no Main method (it isn't a typical Java program), or what it has to do with as I have never created a JAR library before. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Connecting to site 127.0.0.1
One workaround could be to change GWT port on every run, using command line option -port 8889 (e.g. making 10 scripts, each with different port). On Mar 24, 3:50 am, Sunny sunny...@gmail.com wrote: I have been using TCPView (http://technet.microsoft.com/en-us/ sysinternals/bb897437.aspx) and found that sometimes after closing a GWT instance, even though the java process has ended theres still a port in TIME_WAIT under a system process. All I can do is wait for it to finish waitingbut maybe this might give someone some hints. http://www.sunny.id.au/gwt/processes.jpg On Mar 9, 11:19 am, Ralph ralphchel...@gmail.com wrote: Having the same problem here. Isn't there a way to improve the script running the hosted. Like use a different port when is used, or close previous instance before opening a new one, or make sure that the previous run released the port before running a new instance. Hope someone has a solution. On Feb 15, 10:29 pm, sunny...@gmail.com sunny...@gmail.com wrote: This one has been bugging me for a while now, and I haven't seen anything around like this one. I have a Eclipse+Cypal Studio project that has grown to a reasonable size, and while testing I still use the GWT hosted mode to run. My machine doesn't have anything else running on port , but occasionally when I start the project, the hosted browser's status bar just says Connecting to site at 127.0.0.1 but nothing happens (browser window is blank). I'd have to close GWT and restart it for it to work (sometimes 5 or 6 times before it works). I have no clue what would be causing this or even where to start to look to try and fix it. This project uses Hibernate and GWT-Ext, if that helps at all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Compiling servlet classes
Hi, I'm a new java and GWT programmer. I'm trying to build a GWT Hello World using an RPC. I've tried to compile my servlet class (the service implementation) with javac, but the error message says it's impossible to find the client-side package (the service) ... Could you please explain me how to compile the servlet classes ? Thanks a lot, Best regards Mathieu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Back Refresh button handling
I'm in a similar predicament, perhaps you might have an idea of what to do. When the user closes the browser window, I want the application to logout his/her session automatically so as to free up memory on the server from their session. So I use the onWindowClosed() function to take care of this... But when the page is refreshed, the session gets logged out as well through the same function. This is something I want to stop from happening. Any suggestions? On Mar 15, 9:26 am, Rohit rohitsmart...@gmail.com wrote: Hi There is no way in GWT to distinguish betweenRefreshbuttonclick and Window closebuttonclick. But you can trackrefreshbuttonwith a little trick. You should use a time cookie which will expire after some time. So whenrefreshbuttonis pressed, in on module load of entry point , track the value of this cokkie, if this cookie is still alive, this meansrefreshbuttonis pressed. The time this cookie will expired should be considered. It should be very little. Second for history, you should save your information in Session on window close and then ifrefreshbuttonis pressed, get your information from this session. Thanks and regards Rohit On Mar 14, 2:30 am, levi.bracken levi.brac...@gmail.com wrote: You can restore state, but it's a bit more work than just using GWT History. Basically you'll need to come up with some way of modifying the url search parameter (stuff after the #) to include some info so that you can bring the userbackinto the same state as they were before. For example, if your application has a number of screens and they were on screen foo, which was loading with properties for an item with id 10 then you'd need that information in the Url. ex: http://yourApp.com/gwtHostPage.html#screen=foo_id=10 You could also put a conversation id in the url param and then keep the fine details cached on the server, but that makes the state/data more transient. If you go with an option like this though it can help make your pages open and work in other tabs and even make points in your application bookmark'able'. Now for the easy answer, yes you can just prevent the user from carelessly clickingrefresh. Fortunately there isn't a way to trap somebody on a webpage (think about how bad the web would be). But, you can use the WindowCloseListener to present a user with a confirmation before they close the window, navigate to a new page, or hitrefresh. It'd look something like this (not tested): / Window.addWindowCloseListener( new WindowCloseLisener(){ public String onWindowClosing(){ return Are you sure you want to leave this application?; } public void onWindowClosed(){ // Cleanup if need be }}); On Mar 13, 2:52 pm, dodo rajd...@gmail.com wrote: GWT provides History.onHistoryChange event to handle history but how can we restore application state when a user clicks onRefreshbutton? For example the user performed multiple actions on the web site and then clickedrefreshbutton. Now how using GWT History class we can restore the same state? Another question, is there a way to trap Refresh click before actually the app refreshes and can be cancel the event? Rajesh- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
data table widget
Is there a UI widget for gwt similar to Cocoa's NSTableView? Basically, you get a table of a predefined number of rows and columns. Scrolling is built-in. As the user scrolls, a method is called to request data for the table cells that are visible at that moment. Thank you, justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Help! My Generators don't work for Web Mode :(
Hi Sumit here are the generator rule and the generator class: rule: generate-with class=br.com.gwt.symbiosis.rebind.generator.BoundModelGenerator when-type-assignable class=br.com.gwt.symbiosis.client.bind.BindingModel / /generate-with generate-with class=br.com.gwt.symbiosis.rebind.generator.BoundViewGenerator when-type-assignable class=br.com.gwt.symbiosis.client.bind.BindingView / /generate-with View generator class: public class BoundViewGenerator extends Generator { private static final String MODEL_INTERFACE = br.com.gwt.symbiosis.client.bind.BindingModel; private static final String SOURCES_PROPERTY_CHANGES = br.com.gwt.symbiosis.client.event.SourcesPropertyChanges; public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException { TypeOracle oracle = context.getTypeOracle(); JClassType type = oracle.findType(typeName); JClassType modelType = oracle.findType(MODEL_INTERFACE); BoundModelClass modelClass = new BoundModelClass(type); modelClass.setModelType(modelType); BindTypeManager bindManager = BindTypeManager.getInstance(); for(JField field : type.getFields()){ JClassType fieldClass = field.getType().isClassOrInterface(); for(String className : bindManager.getAvailableTypes()){ JClassType bindClass = oracle.findType(className); if(fieldClass.isAssignableTo(bindClass)){ for(ListenerTemplate template : bindManager.getTemplatesForType (className)){ modelClass.associateFieldListener(field, template); } } } } String packageName = modelClass.getPackageName(); String newLine = System.getProperty(line.separator); String finalViewClassName = Bound_+modelClass.getClassName() +_View; PrintWriter printer = context.tryCreate(logger, packageName, finalViewClassName); if (printer == null){ System.out.println(printer == null); return null; } ClassSourceFileComposerFactory composer = null; composer = new ClassSourceFileComposerFactory(packageName, finalViewClassName); composer.setSuperclass(type.getSimpleSourceName()); composer.addImport(SOURCES_PROPERTY_CHANGES); SourceWriter sourceWriter = composer.createSourceWriter(context, printer); Bound_ViewTemplate template = Bound_ViewTemplate.create(newLine); System.out.println(template.generate(modelClass)); sourceWriter.println(template.generate(modelClass)); context.commit(logger, printer); return packageName + . + finalViewClassName; } } Model generator class: public class BoundModelGenerator extends Generator { private static final String SOURCES_PROPERTY_CHANGES = br.com.gwt.symbiosis.client.event.SourcesPropertyChanges; private static final String PROPERTY_CHANGE_SUPPORT = br.com.gwt.symbiosis.client.event.PropertyChangeSupport; private static final String PROPERTY_CHANGE_LISTENER = br.com.gwt.symbiosis.client.event.PropertyChangeListener; private static final String BOUND_PREFIX = Bound_; public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException { TypeOracle oracle = context.getTypeOracle(); JClassType type = oracle.findType(typeName); BoundModelClass modelClass = new BoundModelClass(type); String generatedClass = new Bound_ModelTemplate().generate (modelClass); System.out.println(generatedClass); String packageName = modelClass.getPackageName(); String generatedClassName = BOUND_PREFIX+modelClass.getClassName(); PrintWriter printer = context.tryCreate(logger, packageName, generatedClassName); if (printer == null){ return null; } ClassSourceFileComposerFactory composer = null; composer = new ClassSourceFileComposerFactory(packageName, generatedClassName); composer.setSuperclass(type.getSimpleSourceName()); composer.addImplementedInterface(SOURCES_PROPERTY_CHANGES); composer.addImport(PROPERTY_CHANGE_LISTENER); composer.addImport(PROPERTY_CHANGE_SUPPORT); composer.addImport(SOURCES_PROPERTY_CHANGES);
Re: GWT project creation indefinetly creates folder recursively
Hey hey, I have run into the same, glorious, problem. Unfortunately, I have no idea how deep the rabbit hole goes. Any help with deleting this directory greatly appreciated On Mar 3, 11:29 am, quinn.rob...@gmail.com quinn.rob...@gmail.com wrote: I have recently experienced the same problem, and have filed an issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=3429q=r... This is very frustrating for people like me who are evaluating the possible use of this technology and yet cannot even get started due to some bug that creates an enormous number of recursive directories that cannot be deleted due to the Windows API limitations on filename size. On Jan 8, 10:26 am, Eric Ayers zun...@google.com wrote: Hi Don Raj, This is the first report I've heard of this. Would you mind filing an issue in the GWT issue tracker? http://code.google.com/p/google-web-toolkit/issues/list Besides the usual stuff (GWT version, OS version, shell), if you can include the command lines you are using or any insight as to why this might be happening on your machine it would be greatly appreciated. Thanks, -Eric. On Thu, Jan 8, 2009 at 8:09 AM, Raj raj...@gmail.com wrote: Oh goodness, I got some company on this issue, its the latest GWT version and OS is Vista, initially I was confused and thought the script was still running as I was not able to delete the top project folder in C drive but problem is the script had ran once and had created unlimited project name folder recursively, I guess it would have gone as deep as 1 folders because for a folder size of 6kb my whole workspace grew to size more than 500MB. Vista can't delete folders which are deep inside and I tried to map them as shared folder and delete it but after 5 attempts (which I guess would have been 100 folders deep) I quit, because its not worth without knowing the depth of the root folder. Apart from the actual cause of this issue, if anyone knows some utilities to delete or browse through deep folders would be helpful. Thanks. --Raj On Jan 7, 10:38 am, Don dgp...@gmail.com wrote: I experienced this same problem using the latest GWT (1.5.3) for windows and Eclipse Ganymede. I also followed the GWT instructions for creating a brand new GWT project using Eclipse. The project name used in both the projectCreator and applicationCreator scripts was the same. After attempting the import of the new project into Eclipse, I found the infinitely recursive folder chain with projectName \projectName\projectName\projectName\... inside of the Eclipse workspace. Hopefully someone knows the solution to this problem. It is very frustrating... BTW, the too-long filename fix is to go down into the projectName folders and share a folder way down in the path with full permissions. Then map a drive to that folder. This will shorten the path so that you can work with it. You may have to do this more than once. You can also rename the folders to a single letter to shorten the path. I was able to manually delete it using the above methods. On Jan 5, 12:37 pm, TBirch tjfbi...@bellsouth.net wrote: I have had this happen to me twice lately trying to import an existing project into eclipse. On the first machine, it ran till the machine ran out of memory. Then, vista could not delete the files as the path was too long. I had to restore the system. The second time on another machine I noticed it was happening and I canceled the import before it that far along. I am very hesitant to import at this point. On Jan 5, 9:47 am, Isaac Truett itru...@gmail.com wrote: Raj, What version of GWT are you using? Also, can you describe what you mean by unlimited recursive files in your project? Thanks, Isaac On Sat, Jan 3, 2009 at 3:09 AM, Raj raj...@gmail.com wrote: Hi, I'm trying to setup GWT in my machine and followed the steps given in the instruction and created an eclipse project using projectCreator, I was little amazed to see the project size of more than 500MB while importing it into eclipse but only to find the script has created unlimited recursive files inside MyProject folder, the worst part is its getting created again automatically after deleting it and even after restarting the machine. How to stop this script from executing? Did anyone got this error before? Any help would be appreciated. Thanks. --Raj -- Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send
Re: How to disable/enable widget components?
Thanks...This works fine, On Mar 26, 12:48 pm, Nicanor Babula nicanor.bab...@gmail.com wrote: [code] RadioButton radio1 = new RadioButton(group1, disabled radio); radio1.setEnabled(false); [/code] I think that would do for you ;) On Thursday 26 March 2009 06:12:14 Vikas wrote: Hi All, I want to disable/enable RadioButton on some action, how to do this? I don't want to hide/unhide. Thanks in advance, Vikas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to show waiting status in GWT web apps?
Thanks for hint... I tried to with RPC, works fine... On Mar 25, 12:38 pm, alex.d alex.dukhov...@googlemail.com wrote: You put some Label(Loading...) where you want to have it, make it visible when you are fetching data(before an RPC-call), and invisible when you are ready (in onSuccess() and onFailure()) ;-) On 25 Mrz., 08:07, Vikas vikas.m.ya...@gmail.com wrote: Hi All, In my GWT web application, while fetching data it takes some time, so for that period I want to show some waiting message like Fetching record... similar to gmail for e.g. when we click on inbox it shows Loading... status on first line till all mails fetched. How to achive this in GWT? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT project creation indefinetly creates folder recursively
I noted this in the ticket itself as well, but I made a little batch file that uses recursion (sort of) to delete those longfilename directories. Hope it helps for someone: http://traveltrippertech.blogspot.com/2009/03/off-to-bad-start-with-gwt.html On Mar 26, 9:41 pm, Erik Uzureau uzur...@gmail.com wrote: Hey hey, I have run into the same, glorious, problem. Unfortunately, I have no idea how deep the rabbit hole goes. Any help with deleting this directory greatly appreciated On Mar 3, 11:29 am, quinn.rob...@gmail.com quinn.rob...@gmail.com wrote: I have recently experienced the same problem, and have filed an issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=3429q=r... This is very frustrating for people like me who are evaluating the possible use of this technology and yet cannot even get started due to some bug that creates an enormous number of recursive directories that cannot be deleted due to the Windows API limitations on filename size. On Jan 8, 10:26 am, Eric Ayers zun...@google.com wrote: Hi Don Raj, This is the first report I've heard of this. Would you mind filing an issue in the GWT issue tracker? http://code.google.com/p/google-web-toolkit/issues/list Besides the usual stuff (GWT version, OS version, shell), if you can include the command lines you are using or any insight as to why this might be happening on your machine it would be greatly appreciated. Thanks, -Eric. On Thu, Jan 8, 2009 at 8:09 AM, Raj raj...@gmail.com wrote: Oh goodness, I got some company on this issue, its the latest GWT version and OS is Vista, initially I was confused and thought the script was still running as I was not able to delete the top project folder in C drive but problem is the script had ran once and had created unlimited project name folder recursively, I guess it would have gone as deep as 1 folders because for a folder size of 6kb my whole workspace grew to size more than 500MB. Vista can't delete folders which are deep inside and I tried to map them as shared folder and delete it but after 5 attempts (which I guess would have been 100 folders deep) I quit, because its not worth without knowing the depth of the root folder. Apart from the actual cause of this issue, if anyone knows some utilities to delete or browse through deep folders would be helpful. Thanks. --Raj On Jan 7, 10:38 am, Don dgp...@gmail.com wrote: I experienced this same problem using the latest GWT (1.5.3) for windows and Eclipse Ganymede. I also followed the GWT instructions for creating a brand new GWT project using Eclipse. The project name used in both the projectCreator and applicationCreator scripts was the same. After attempting the import of the new project into Eclipse, I found the infinitely recursive folder chain with projectName \projectName\projectName\projectName\... inside of the Eclipse workspace. Hopefully someone knows the solution to this problem. It is very frustrating... BTW, the too-long filename fix is to go down into the projectName folders and share a folder way down in the path with full permissions. Then map a drive to that folder. This will shorten the path so that you can work with it. You may have to do this more than once. You can also rename the folders to a single letter to shorten the path. I was able to manually delete it using the above methods. On Jan 5, 12:37 pm, TBirch tjfbi...@bellsouth.net wrote: I have had this happen to me twice lately trying to import an existing project into eclipse. On the first machine, it ran till the machine ran out of memory. Then, vista could not delete the files as the path was too long. I had to restore the system. The second time on another machine I noticed it was happening and I canceled the import before it that far along. I am very hesitant to import at this point. On Jan 5, 9:47 am, Isaac Truett itru...@gmail.com wrote: Raj, What version of GWT are you using? Also, can you describe what you mean by unlimited recursive files in your project? Thanks, Isaac On Sat, Jan 3, 2009 at 3:09 AM, Raj raj...@gmail.com wrote: Hi, I'm trying to setup GWT in my machine and followed the steps given in the instruction and created an eclipse project using projectCreator, I was little amazed to see the project size of more than 500MB while importing it into eclipse but only to find the script has created unlimited recursive files inside MyProject folder, the worst part is its getting created again automatically after deleting it and even after restarting the machine. How to stop this script from
IncompatibleClassChangeError when launching hosted mode (GWT 1.6 M2)
Hi, I started using GWT 1.6.1 M2 recently and things were going quite smoothly until I tried using hosted mode (with -noserver option). I am now getting the following exception. Does anyone know what this actually means? As far as I can tell, HashSessionManager does implemented SessionManager interface (that is indirectly by extending the AbstractSessionManager class). Thanks. [java] Exception in thread main java.lang.IncompatibleClassChangeError: Class org.mortbay.jetty.servlet.HashSessionManager does not implement the requested interface org.mortbay.jetty.SessionManager [java] at org.mortbay.jetty.servlet.SessionHandler.setSessionManager (SessionHandler.java:88) [java] at org.mortbay.jetty.servlet.SessionHandler.init (SessionHandler.java:62) [java] at org.mortbay.jetty.servlet.SessionHandler.init (SessionHandler.java:53) [java] at org.mortbay.jetty.webapp.WebAppContext.init (WebAppContext.java:297) [java] at com.google.gwt.dev.ServletValidator.create (ServletValidator.java:59) [java] at com.google.gwt.dev.ServletValidator.create (ServletValidator.java:43) [java] at com.google.gwt.dev.HostedMode.doStartup (HostedMode.java:344) [java] at com.google.gwt.dev.HostedModeBase.startUp (HostedModeBase.java:583) [java] at com.google.gwt.dev.HostedModeBase.run (HostedModeBase.java:395) [java] at com.google.gwt.dev.HostedMode.main(HostedMode.java:232) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
[gwt-contrib] Re: weak listener in GWT?
On Thu, Mar 26, 2009 at 6:28 AM, Ed post2edb...@hotmail.com wrote: I am struggeling a bit with the issue I posted here: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/0c7013c88ff9f20b I would like to know if it would be possible to solve this with GWT before posting a RFC in the issue tracker. Would it even be possible to support the JRE WeakReference object? or in someway the weak listener support like done in Swing? Javascript has no concept of a weak reference, so we can't implement it in GWT. I think this is getting a bigger issue now that GWT is getting more used to make more advanced enterprise-like applications. My experience: In simple applications it's no problem to clean up your own objects and listeners, but in more advanced applciations that I am building nowadays with GWT, I noticed that this is a serious drawback and it's very easy to great memory leaks. You just have to design your app from the beginning such that you don't leak references. For example, the way native objects in the browser are implemented, you wind up with a reference cycle (the listener holds a reference to an element and the element holds a reference to its listener, and since the native objects are typically reference counted and not visible to the JS GC the cycles can't be collected), and the way we avoid leaks is to be diligent about when such cycles are created/destroyed (in this case attached to the DOM vs detached). If you are building your own listener structures, you need to have similar diligence. This is a general JS problem and GWT can't perform miracles -- well not that miracle anyway :). -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5086 - Checkstyle cleanup.
Author: j...@google.com Date: Thu Mar 26 06:25:13 2009 New Revision: 5086 Modified: changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JdtCompilationUnit.java changes/jat/ihm/user/src/com/google/gwt/i18n/rebind/CurrencyListGenerator.java Log: Checkstyle cleanup. Modified: changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JdtCompilationUnit.java == --- changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JdtCompilationUnit.java (original) +++ changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JdtCompilationUnit.java Thu Mar 26 06:25:13 2009 @@ -17,7 +17,6 @@ import com.google.gwt.dev.jdt.TypeRefVisitor; import com.google.gwt.dev.util.Name; -import com.google.gwt.dev.util.Name.BinaryName; import com.google.gwt.dev.util.Name.InternalName; import org.eclipse.jdt.core.compiler.CategorizedProblem; Modified: changes/jat/ihm/user/src/com/google/gwt/i18n/rebind/CurrencyListGenerator.java == --- changes/jat/ihm/user/src/com/google/gwt/i18n/rebind/CurrencyListGenerator.java (original) +++ changes/jat/ihm/user/src/com/google/gwt/i18n/rebind/CurrencyListGenerator.java Thu Mar 26 06:25:13 2009 @@ -268,7 +268,6 @@ } return packageName + . + className; } - private String generateRuntimeSelection(TreeLogger logger, GeneratorContext context, JClassType targetClass, --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: weak listener in GWT?
He John, Thanks for your answer. Not very unexpected, but I was hoping I missed something. This means that I have to do some more work when removing objects. My situation: I have pages that make up a wizard-like application (part of the application). The pages contain form field where the user fills in his name, social nr, etc.. When he goes back in the wizard tree and changes his birthday for example: other form fields on other pages are removed. However, they have a bunch of listeners subscribed to a global data model. Because of all the nested objects, it's easy to forget unregistering a listener. Basically what I do now (and have to do more): before making a form field variable NULL, call the formField.remove() method, that he forwards to his nested objects, and so on A bit cumbersome, but I don't see no other way, do you ?? -- Ed --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5087 - Disable ImageResourceTest
Author: b...@google.com Date: Thu Mar 26 07:44:46 2009 New Revision: 5087 Modified: trunk/user/test/com/google/gwt/resources/ResourcesSuite.java Log: Disable ImageResourceTest Patch by: bobv Review by: rjrjr (TBR) Modified: trunk/user/test/com/google/gwt/resources/ResourcesSuite.java == --- trunk/user/test/com/google/gwt/resources/ResourcesSuite.java (original) +++ trunk/user/test/com/google/gwt/resources/ResourcesSuite.javaThu Mar 26 07:44:46 2009 @@ -37,7 +37,8 @@ suite.addTestSuite(CssReorderTest.class); suite.addTestSuite(CssRtlTest.class); suite.addTestSuite(CssNodeClonerTest.class); -suite.addTestSuite(ImageResourceTest.class); +// TODO(bobv) Re-enable after fixing this case in non-inlining mode +// suite.addTestSuite(ImageResourceTest.class); suite.addTestSuite(NestedBundleTest.class); suite.addTestSuite(TextResourceTest.class); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] JavaScriptException with 1.6.2
Hi I just tried the new gwt 1.6 RC and get this stacktrace : [FATAL] Uncaught JavaScript exception [* com.google.gwt.core.client.JavaScriptException*: (TypeError): 'nodeType' a la valeur Null ou n'est pas un objet. [FATAL] number: -2146823281 [FATAL] description: 'nodeType' a la valeur Null ou n'est pas un objet. [FATAL] at com.google.gwt.dom.client.Node$.is(*Native Method*) [FATAL] at com.google.gwt.dom.client.Element$.is(*Element.java:48*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel.eventTargetsPopup(* PopupPanel.java:932*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel.previewNativeEvent(* PopupPanel.java:1104*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel.access$6(* PopupPanel.java:1085*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel$2.onPreviewNativeEvent(* PopupPanel.java:1199*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.dispatch( *Event.java:181*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.dispatch( *Event.java:1*) [FATAL] at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(* HandlerManager.java:60*) [FATAL] at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(* HandlerManager.java:53*) [FATAL] at com.google.gwt.event.shared.HandlerManager.fireEvent(* HandlerManager.java:178*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.fire(* Event.java:80*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.access$4( *Event.java:73*) [FATAL] at com.google.gwt.user.client.Event$.fireNativePreviewEvent(* Event.java:412*) [FATAL] at com.google.gwt.user.client.DOM.previewEvent(*DOM.java:1284*)] in http://localhost:8080/bios-rc/com.sfr.bios.rc.CONX/hosted.html?com_sfr_bios_rc_CONX, line 7 Is there any usefull information I could send you to help getting it fixed ? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JavaScriptException with 1.6.2
That's not good it looks like Nicolas found an object for which trying to evaluate (!!o.nodeType) throws an exception. @Nicolas: - What browser is this? - What are you actually doing to trigger the exception? - Can you repro it on any popup panel, or is it specific to your app? On Thu, Mar 26, 2009 at 12:14 PM, nicolas de loof nicolas.del...@gmail.comwrote: Hi I just tried the new gwt 1.6 RC and get this stacktrace : [FATAL] Uncaught JavaScript exception [* com.google.gwt.core.client.JavaScriptException*: (TypeError): 'nodeType' a la valeur Null ou n'est pas un objet. [FATAL] number: -2146823281 [FATAL] description: 'nodeType' a la valeur Null ou n'est pas un objet. [FATAL] at com.google.gwt.dom.client.Node$.is(*Native Method*) [FATAL] at com.google.gwt.dom.client.Element$.is(*Element.java:48*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel.eventTargetsPopup( *PopupPanel.java:932*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel.previewNativeEvent( *PopupPanel.java:1104*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel.access$6(* PopupPanel.java:1085*) [FATAL] at com.google.gwt.user.client.ui.PopupPanel$2.onPreviewNativeEvent(* PopupPanel.java:1199*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.dispatch(* Event.java:181*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.dispatch(*Event.java:1 *) [FATAL] at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(* HandlerManager.java:60*) [FATAL] at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(* HandlerManager.java:53*) [FATAL] at com.google.gwt.event.shared.HandlerManager.fireEvent(* HandlerManager.java:178*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.fire(* Event.java:80*) [FATAL] at com.google.gwt.user.client.Event$NativePreviewEvent.access$4(* Event.java:73*) [FATAL] at com.google.gwt.user.client.Event$.fireNativePreviewEvent(* Event.java:412*) [FATAL] at com.google.gwt.user.client.DOM.previewEvent(*DOM.java:1284*)] in http://localhost:8080/bios-rc/com.sfr.bios.rc.CONX/hosted.html?com_sfr_bios_rc_CONX, line 7 Is there any usefull information I could send you to help getting it fixed ? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: [google-web-toolkit commit] r5087 - Disable ImageResourceTest
LGTM 2009/3/26 codesite-nore...@google.com Author: b...@google.com Date: Thu Mar 26 07:44:46 2009 New Revision: 5087 Modified: trunk/user/test/com/google/gwt/resources/ResourcesSuite.java Log: Disable ImageResourceTest Patch by: bobv Review by: rjrjr (TBR) Modified: trunk/user/test/com/google/gwt/resources/ResourcesSuite.java == --- trunk/user/test/com/google/gwt/resources/ResourcesSuite.java (original) +++ trunk/user/test/com/google/gwt/resources/ResourcesSuite.javaThu Mar 26 07:44:46 2009 @@ -37,7 +37,8 @@ suite.addTestSuite(CssReorderTest.class); suite.addTestSuite(CssRtlTest.class); suite.addTestSuite(CssNodeClonerTest.class); -suite.addTestSuite(ImageResourceTest.class); +// TODO(bobv) Re-enable after fixing this case in non-inlining mode +// suite.addTestSuite(ImageResourceTest.class); suite.addTestSuite(NestedBundleTest.class); suite.addTestSuite(TextResourceTest.class); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5089 - Edited wiki page through web user interface.
Author: amitman...@google.com Date: Thu Mar 26 10:32:17 2009 New Revision: 5089 Modified: wiki/GwtJavaApiCompatibilityChecker.wiki Log: Edited wiki page through web user interface. Modified: wiki/GwtJavaApiCompatibilityChecker.wiki == --- wiki/GwtJavaApiCompatibilityChecker.wiki(original) +++ wiki/GwtJavaApiCompatibilityChecker.wikiThu Mar 26 10:32:17 2009 @@ -107,9 +107,7 @@ = Discussion = The !ApiCompatibilityChecker tool uses !TypeOracle to compute the API differences. !TypeOracle in turn requires access to the java source code. Thus the tool can only work when Java source is available. An alternative to !TypeOracle would be to use Java reflection which works on class files, and would not have required access to the source files. However, because of three disadvantages, we chose !TypeOracle over Java relfection: - # One use case for the tool was to make the JRE library support that GWT offers be compatible to a real JRE implementation. However, the JRE libraries that GWT currently offers are not complete, and are currently not offered as class files. The use of Java reflection would have prevented us from running the tool to compare GWT's current support of JRE with a real JRE. - # Annotations that have a retention policy of SOURCE are only present in source files -- they are discarded by the compiler during the generation of class files. For example, the @deprecated annotation falls in this category. This annotation is particularly useful for the API Compatibility Checker tool, since the tool can ignore API changes in members, classes, or packages that are deprecated. The tool currently does not support annotations, but with little effort, it can be supported in the next version. # With !TypeOracle, we could tap into the already existing GWT compiler infrastructure. We could not find an analogous tool (with compatible licenses) in case of Java Reflection. (Japize, a tool which uses Java reflection to check for binary compatibility, could have been suitable, but the tool was under a GPL license.) With Reflection, everything would have to be developed from scratch. = References = --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5090 - Edited wiki page through web user interface.
Author: amitman...@google.com Date: Thu Mar 26 10:52:25 2009 New Revision: 5090 Modified: wiki/GwtJavaApiCompatibilityChecker.wiki Log: Edited wiki page through web user interface. Modified: wiki/GwtJavaApiCompatibilityChecker.wiki == --- wiki/GwtJavaApiCompatibilityChecker.wiki(original) +++ wiki/GwtJavaApiCompatibilityChecker.wikiThu Mar 26 10:52:25 2009 @@ -106,9 +106,7 @@ = Discussion = -The !ApiCompatibilityChecker tool uses !TypeOracle to compute the API differences. !TypeOracle in turn requires access to the java source code. Thus the tool can only work when Java source is available. An alternative to !TypeOracle would be to use Java reflection which works on class files, and would not have required access to the source files. However, because of three disadvantages, we chose !TypeOracle over Java relfection: - # One use case for the tool was to make the JRE library support that GWT offers be compatible to a real JRE implementation. However, the JRE libraries that GWT currently offers are not complete, and are currently not offered as class files. The use of Java reflection would have prevented us from running the tool to compare GWT's current support of JRE with a real JRE. - # With !TypeOracle, we could tap into the already existing GWT compiler infrastructure. We could not find an analogous tool (with compatible licenses) in case of Java Reflection. (Japize, a tool which uses Java reflection to check for binary compatibility, could have been suitable, but the tool was under a GPL license.) With Reflection, everything would have to be developed from scratch. +The !ApiCompatibilityChecker tool uses !TypeOracle to compute the API differences. !TypeOracle in turn requires access to the java source code. Thus the tool can only work when Java source is available. An alternative to !TypeOracle would be to use Java reflection which works on class files, and would not have required access to the source files. However, we chose !TypeOracle over Java relfection because with !TypeOracle, we could tap into the already existing GWT compiler infrastructure. We could not find an analogous tool (with compatible licenses) in case of Java Reflection. (Japize, a tool which uses Java reflection to check for binary compatibility, could have been suitable, but the tool was under a GPL license.) With Reflection, everything would have to be developed from scratch. = References = # http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on GwtJavaApiCompatibilityChecker in google-web-toolkit
Comment by sco...@google.com: Hey, what if we used ASM to process the class files? :D For more information: http://code.google.com/p/google-web-toolkit/wiki/GwtJavaApiCompatibilityChecker --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JavaScriptException with 1.6.2
On Thu, Mar 26, 2009 at 1:40 PM, Scott Blum sco...@google.com wrote: That's not good it looks like Nicolas found an object for which trying to evaluate (!!o.nodeType) throws an exception. If my atrophied high-school French is correct, I believe the error is that o is null at that point. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JavaScriptException with 1.6.2
Nice translation ;) The dev team repported me this error but I'm not working on the module myself. I'll try to get more info on how the PopupPanel is used. I think it is part of the DatePicker but have to confirm. Must also ask which browser is used in this test. On Thu, Mar 26, 2009 at 7:18 PM, John Tamplin j...@google.com wrote: On Thu, Mar 26, 2009 at 1:40 PM, Scott Blum sco...@google.com wrote: That's not good it looks like Nicolas found an object for which trying to evaluate (!!o.nodeType) throws an exception. If my atrophied high-school French is correct, I believe the error is that o is null at that point. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on GwtJavaApiCompatibilityChecker in google-web-toolkit
Comment by to...@google.com: That's an excellent idea. I wish someone had thought of it earlier. ;) In case it's not obvious, the biggest benefit of this is that we could compatibility check code that does not build, or is difficult to build, with TypeOracle. For more information: http://code.google.com/p/google-web-toolkit/wiki/GwtJavaApiCompatibilityChecker --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: code review requested - add skeleton of runtime locales test
LG as a pattern.. I have no idea what the test does. :) Nitpick: comment on the line you modified in your version of junit.html? On Tue, Mar 24, 2009 at 8:47 PM, John Tamplin j...@google.com wrote: This just does a couple of tests that need to be fleshed out, but basically just proves that your suggestion of putting a hacked junit.html into a public path of a particular test module works for setting the runtime locale. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: code review requested - add skeleton of runtime locales test
On Thu, Mar 26, 2009 at 3:46 PM, Scott Blum sco...@google.com wrote: LG as a pattern.. I have no idea what the test does. :) It just verifies that certain things still work if the runtime locale is specified even though the compile-time locale doesn't include them. Nitpick: comment on the line you modified in your version of junit.html? Ok. Is there any way we could avoid duplicating junit.html? If we have a number of runtime locale tests, there are going to be lots of copies of this that we have to remember to update whenever junit.html is updated. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RR: testing -noserver hosted mode
On Tue, Feb 17, 2009 at 2:27 AM, Lex Spoon sp...@google.com wrote: Revision 3901 broke -noserver hosted mode, but it took weeks before anyone even noticed. I've been trying to figure out how to write a regression test to prevent that sort of thing from happening. Attached is a patch that I believe does the trick. Hosted mode gurus, as well as people who know the GWTTestCase infrastructure, would be very welcome to chime in on the right way to do this! I figure that a -noserver hosted mode test is actually pretty close to the existing hosted mode tests. There are just two differences I see. First, a compile needs to actually run. Second, all auto-generation of resources should be disabled in the GWTShellServlet. By turning off all auto-generation, the servlet can pretend to be a dumb web server that knows nothing about GWT. What the patch does is add a new run style called -noserver. This is a subclass of the regular hosted mode run style that includes the above two changes. The trickiest part is that RunStyle now has a parameter on whether auto-generation should happen with the embedded server. This parameter had to be passed all the way from RunStyle to JUnitShell to GWTShell to EmbeddedTomcatServer to GWTShellServlet. Any simpler idea would be welcome. Because it's easy, the patch also turns off resource generation for web mode tests. The reasoning is that it's a slightly better test of web mode to prefer the files that actually resulted from compilation. To get the test hooked into the build scripts, I added ant test.noserver in the user directory, and had this called when ant test is called. There is only one test that this runs: the IFrameLinkerTest. The other linkers don't work in noserver mode. Also, no other tests are run in noserver mode; I don't see a significant benefit to running the other ones this way, because once an app is booted up everything will be identical to regular hosted mode. John, if the general strategy looks good to everyone, could you review the implementation? Passing the parameter all the way down this way is ugly, but I don't know of any better ways to do it. I would prefer the new ArgHandler to be a top-level class, but I see the others are inlined as well so I am ok with keeping it. I don't see the build.xml changes for test.noserver. Otherwise, LGTM. Sorry this took so long. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: code review requested - add skeleton of runtime locales test
We could add a feature to JUnit, of course. Or maybe we could do something to the default junit.html that allows a way to wedge in different deferred binding props? On Thu, Mar 26, 2009 at 3:49 PM, John Tamplin j...@google.com wrote: On Thu, Mar 26, 2009 at 3:46 PM, Scott Blum sco...@google.com wrote: LG as a pattern.. I have no idea what the test does. :) It just verifies that certain things still work if the runtime locale is specified even though the compile-time locale doesn't include them. Nitpick: comment on the line you modified in your version of junit.html? Ok. Is there any way we could avoid duplicating junit.html? If we have a number of runtime locale tests, there are going to be lots of copies of this that we have to remember to update whenever junit.html is updated. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5092 - Separate data that is constant across all locales in a build into a
Author: j...@google.com Date: Thu Mar 26 15:02:57 2009 New Revision: 5092 Modified: trunk/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java Log: Separate data that is constant across all locales in a build into a LocaleInfoImpl_shared (which contains the native display names and available locales) and the remainder in a per-locale source file. Patch by: jat Review by: scottb Modified: trunk/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java == --- trunk/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java (original) +++ trunk/user/src/com/google/gwt/i18n/rebind/LocaleInfoGenerator.java Thu Mar 26 15:02:57 2009 @@ -93,37 +93,24 @@ assert (LocaleInfoImpl.class.getName().equals(targetClass.getQualifiedSourceName())); String packageName = targetClass.getPackage().getName(); -GwtLocale locale = LocaleUtils.getCompileLocale(); -String className = targetClass.getName().replace('.', '_') + _ -+ locale.getAsString(); -SetGwtLocale runtimeLocales = LocaleUtils.getRuntimeLocales(); -if (!runtimeLocales.isEmpty()) { - className += _runtimeSelection; -} -String qualName = packageName + . + className; - -PrintWriter pw = context.tryCreate(logger, packageName, className); +String superClassName = targetClass.getName().replace('.', '_') + _shared; +SetGwtLocale localeSet = LocaleUtils.getAllLocales(); +GwtLocaleImpl[] allLocales = localeSet.toArray(new GwtLocaleImpl[localeSet.size()]); +// sort for deterministic output +Arrays.sort(allLocales); +PrintWriter pw = context.tryCreate(logger, packageName, superClassName); if (pw != null) { + String qualName = packageName + . + superClassName; ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory( - packageName, className); + packageName, superClassName); factory.setSuperclass(targetClass.getQualifiedSourceName()); - factory.addImport(com.google.gwt.core.client.GWT); factory.addImport(com.google.gwt.core.client.JavaScriptObject); - factory.addImport(com.google.gwt.i18n.client.LocaleInfo); - factory.addImport(com.google.gwt.i18n.client.constants.NumberConstants); - factory.addImport(com.google.gwt.i18n.client.constants.NumberConstantsImpl); - factory.addImport(com.google.gwt.i18n.client.constants.DateTimeConstants); - factory.addImport(com.google.gwt.i18n.client.constants.DateTimeConstantsImpl); SourceWriter writer = factory.createSourceWriter(context, pw); writer.println(private JavaScriptObject nativeDisplayNames;); writer.println(); writer.println(@Override); writer.println(public String[] getAvailableLocaleNames() {); writer.println( return new String[] {); - // sort for deterministic output - SetGwtLocale localeSet = LocaleUtils.getAllLocales(); - GwtLocaleImpl[] allLocales = localeSet.toArray(new GwtLocaleImpl[localeSet.size()]); - Arrays.sort(allLocales); for (GwtLocaleImpl possibleLocale : allLocales) { writer.println(\ + possibleLocale.toString().replaceAll(\, \\\) + \,); @@ -132,41 +119,12 @@ writer.println(}); writer.println(); writer.println(@Override); - writer.println(public String getLocaleName() {); - if (runtimeLocales.isEmpty()) { -writer.println( return \ + locale + \;); - } else { -writer.println( String rtLocale = getRuntimeLocale();); -writer.println( return rtLocale != null ? rtLocale : \ + locale -+ \;); - } - writer.println(}); - writer.println(); - writer.println(@Override); writer.println(public native String getLocaleNativeDisplayName(String localeName) /*-{); writer.println( this.@ + qualName + ::ensureNativeDisplayNames()();); writer.println( return this.@ + qualName + ::nativeDisplayNames[localeName];); writer.println(}-*/;); writer.println(); - writer.println(@Override); - writer.println(public DateTimeConstants getDateTimeConstants() {); - LocalizableGenerator localizableGenerator = new LocalizableGenerator(); - // Avoid warnings for trying to create the same type multiple times - @SuppressWarnings(hiding) - GeneratorContext subContext = new CachedGeneratorContext(context); - generateConstantsLookup(logger, subContext, writer, localizableGenerator, - runtimeLocales, locale, - com.google.gwt.i18n.client.constants.DateTimeConstantsImpl); - writer.println(}); - writer.println(); - writer.println(@Override); - writer.println(public NumberConstants getNumberConstants() {); - generateConstantsLookup(logger, subContext, writer, localizableGenerator, - runtimeLocales, locale, -
[gwt-contrib] Re: [google-web-toolkit commit] r5078 - Amending r5077:
On Thu, Mar 26, 2009 at 3:17 PM, Scott Blum sco...@google.com wrote: Vitali, are you positive all your stuff is in a legit state? I ask because it looks like you're mixing trunk and 1.6 stuff together. Can you clarify what you mean? How can I be mixing trunk 1.6 together? I'm only using trunk. At this point I don't event have the gwt-platform directory in my project path - I just imported the GWT projects made put them on my classpath. When I use a stock gwt-dev-windows.jar from 1...@r5090, I'm using trunk (@ 5084 right now). I haven't even tried stock because I'm on linux 64-bit I haven't bothered trying to get the 32-bit environment set up for the old hosted mode (relying solely on OOPHM). I can boot your project just fine whether log4j-1.2.15.jar is in WEB-INF/lib or not. (I can run it because I couldn't actually find a version of mosaic that you compile against cleanly, but the servlets all initialized just fine.) Right - I forgot that the code I sent you at that point already had my enhancements to mosaic (eventually a version of them should get into truck). In any case, you can just delete the code that throws up an error (unless its the constructor). My code runs fine (including servlets) the logging works. It's just that error that gets printed to the console when the project launches, so it's not a super-important issue. Is it possible it's a Linux-only issue? Here's a dump of the exact dir structure that's working for me: .classpath .project gwt-windows-0.0.0 gwt-windows-0.0.0/gwt-dev-windows.jar gwt-windows-0.0.0/gwt-ll.dll gwt-windows-0.0.0/gwt-user.jar gwt-windows-0.0.0/swt-win32-3235.dll lib lib/ftr-gwt-library-date-0.9.9.jar lib/ftr-gwt-library-date-emul-0.9.9.jar lib/gwt-beans-binding-0.2.3.jar lib/gwt-dnd-2.5.6.jar lib/gwt-incubator-trunk-r1543.jar lib/gwt-mosaic-0.2.0-rc1.jar lib/gwtx-1.5.2.jar lib/log4j-1.2.15.jar lib/org.cobogw.gwt-1.2.2.jar SacredHeart.launch src (omitted) war war/loading.gif war/SacredHeart.css war/SacredHeart.html war/WEB-INF war/WEB-INF/classes (omitted) war/WEB-INF/classes/ece456 war/WEB-INF/classes/log4j.properties war/WEB-INF/lib war/WEB-INF/lib/gwt-servlet.jar war/WEB-INF/lib/log4j-1.2.15.jar war/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar war/WEB-INF/web.xml I attached the .project, .classpath, and launch config I'm using. This configuration boots whether or not I have war/WEB-INF/lib/log4j-1.2.15.jar in there. On Wed, Mar 25, 2009 at 7:32 PM, Vitali Lovich vlov...@gmail.com wrote: On Wed, Mar 25, 2009 at 7:10 PM, Scott Blum sco...@google.com wrote: On Wed, Mar 25, 2009 at 6:22 PM, Vitali Lovich vlov...@gmail.comwrote: If I don't put the log4j file into my WEB-INF/lib directory, then it's fine. If it is put there, then it gets the conflicting version (regardless of whether or not I launch HostedMode with log4j on the class path). So am I doing it wrong? i'm confused... if you don't have log4j on the classpath, how can you be loading it via Launcher$AppClassLoader? It must be hiding out in some other jar you have on the classpath? Sorry for the confusion. Here's what I meant: If I add the log4j library in the WEB-INF/lib to the classpath of the runtime configuration, I get the problem above. If I move the log4j library out of the WEB-INF/lib directory to somewhere else like project/lib add it to the classpath, then it works. Am I supposed to place it elsewhere then copy it over to WEB-INF/lib when I'm packaging it up only? That's not the intent... can you send me a small sample that repros this? I don't have time right now. If you want I can e-mail you my project privately. It's a school project, so there's no confidentiality to it or anything. I just don't want to spam the mailing list. Thanks Scott --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---