Re: FF vs IE, when dealing with Lists
Hi all, Another Idea which may be interesting in case if customer does't agree to use pagination (our case). We had decided to generate table as static HTML on serverside (hello to JSP, JSF), in another word our custom component have server side html creator (or renderer in terms JSF). After generation the produced html is set as inner html to the custom widget and Bingo: table on 1000 records takes 3-4 seconds to be created. Currently we are working on problem to insert action components (Links) in such type of tables and invoke appropriate functionallity with appropriate parameter when user clicks on such link. We digging into the JSNI here, and I suppose finally we succeed with this. So for teams where customer reject paging, this approach may be used I suppose. Offcource it looks strange and may be not elegant, but it is fast. 2009/2/27 federico federico.mona...@gmail.com +1 for the custom hp solution for the best performance at all i suggest a flow panel with inside a list of flowPanels anc custom css styles On 27 Feb, 06:48, Tóth Imre tothi...@gmail.com wrote: I have another solution for this problem.Into a Vertical panel inserted horisontal panel formatted it with css, and it is faster.. 2009/2/19 milind mpaltanw...@gmail.com Hi Nick, Flex table is pretty slow if you want to display 50+ rows in it at a time based on our experience. The slowness also varies for each browser, only realistic way of getting around this problem is to implement pagination, where you display only 20-30 rows on each page and then provide links on the header to navigate through the pages. This way i am able to manage a display of thousands of records in less than 500 milliseconds across the browsers (FF and chrome faster then IE). The application has many views with this approach displaying simple tabluar data and also hierarchical data structures. For displaying hierarchical data structures i initially went with Tree, but that was pretty slow for large no. of rows, so i simulated tree inside FlexTable using Click listener on (+/-) images. This works like a charm. Regards, Milind On Feb 18, 4:21 pm, Nick nickc...@gmail.com wrote: Ok, Results What I’m finding is that the Grid does beat the FlexTable, but not by much with a small data set. Larger sets seem to widen the gap. My guess for this is that since FlexTable has the ability to add rows (Grid is sized from the start) that it works much like how other resizable constructs work such as Java’s ArrayList. My reasoning for this is that the first time the test is run the speed is very slow on the FlexTable (especially in IE). Repeated test runs after the initial are faster and I think this is because the table was being sized the first time as rows were added, and didn’t need to be resized during the following tests. The other thing I’m finding is that performace varies based on browser. I’m seeing FF run reasonably well. With IE the Grid runs about the same as FF but the FlexTable runs considerably slower. I also tested Opera and was stunned as it blew both others out of the water. My full write up is here with times and a test application you can run in your browser. http://whatwouldnickdo.com/wordpress/401/performance-grid-vs-flextable/ On Feb 18, 2:10 pm, Nick nickc...@gmail.com wrote: Thanks for the response, I think you're correct. And it makes sense that adding rows dynamically would account for the increase in time as the row count is higher. I'm going to run a few tests, and I'll post anything I find to this post. On Feb 18, 3:09 am, Alexey_Tsiunchik alexey.tsiunc...@gmail.com wrote: Hello Nick, Exactly the same issue was in our app. We need to display big lists (100 - 500) records, and FlexTable seems not solution for this. The problem is that FlexTable always checks table bounds (row number, column number) and when you put some value in FlexTable it performs checking for bounds, moreover it not store the colnum and rownum in some variables, but always calculate them dynamically. Moreover it dynamocally adds new rows. Thats why it becomes slower when number of rows increase. We had decided to use Grid rather then FlexTable. We can specify Grid bounds right after creation, and while we put data in cells in the cycle its performance remains the same for different grid size (here I mean speed of adding row). But it also has it's disadvantages. When we need to display another data in the same Grid, and this data has different number of rows, we should call Grod.resize(int, int). And for big grids, this operation is very slow in IE (in our tests resizing grid with 200 rows, 5 columns, takes ~13000 ms in IE). So
Re: HowTo cancel a RPC call?
Exactly what i was looking for. Thx guys. Another thing: i've tried this in FF with Firebug. What i can see is that when i cancel the request, firebug still shows it as waiting for response. But though i had no problem with starting 10 of them simultaneously which shouldn't be possible because of the limit of concurrent XMLHttpRequests in browser, that's probably just a Firebug bug. Thx again On 26 Feb., 19:48, Jason Essington jason.essing...@gmail.com wrote: right, return RequestBuilder and you have to handle the sending of the RPC yourself, but it does allow you to muck about with headers and such. Return Request and you don't get the opportunity to molest the request before it is sent, but you also don't have to manually send it either. Either way, you are given the ability to call cancel() on an active request. all depends upon what your needs are. -jason On Feb 26, 2009, at 10:11 AM, Ian Petersen wrote: On Thu, Feb 26, 2009 at 8:56 AM, alex.d alex.dukhov...@googlemail.com wrote: Recently i've found myself in a situation where i have to cancel a RPC call. I've found out that RequestBuilder.send() method returns a Request object that provides a cancel() method. But is it possible to get Request object without using RequestBuilder? I'm currently very comfortable with RPC (except for the above matter) and i'm reluctant to switch to RequestBuilder. There's a way to get your async methods to return an object that you can use to cancel an in-flight RPC. I can never remember the name of the type, but you just change your async method to return RequestBuilder (I think) instead of void. It leaves the invocation of send() up to you, but the request is pre-built so it's not much extra work, and it gives you the opportunity to play with headers and invoke cancel(). If you search the history of this list, you might find a definitive answer on the type you need and, if not, try the history of the contributor's list. 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: Translating on the server-side
jbdhl schrieb: Consider a case where some RPCs in a GWT application will trigger the server to send an email to the user where the email should be sent in the language used at the requesting client. 1) How should I approach this server-side internationalization (i18n)? Can GWTs i18n be used in this situation? I'm using the same property-files I defined for the GWT-project (I'm using GWT 1.4 and don't use the plural-technique). To be able to read in UTF-8, I defined my own ResourceBundle-implementation (quite a hack) that is created the following way: /** * Returns the ResourceBundle used for localizing data * @param locale The Locale to be used * @return The ResourceBundle */ public static ResourceBundle getResourceBundle(String locale) { if (locale == null){ return null; } StringTokenizer tt = new StringTokenizer(locale, _); Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ? tt.nextToken() : , tt.hasMoreTokens() ? tt.nextToken() : ); ResourceBundle rb = Utf8ResourceBundle.getBundle(MyAppI18NConstants.class.getName(), loc, MyAppI18NConstants.class.getClassLoader()); return rb; } Utf8ResourceBundle is copied from http://www.thoughtsabout.net/blog/archives/44.html You have to read the comments to, the original contains bugs. All my RPC-functions are including a parameter specifying the locale to be used. Here is an example tat uses this (: public String getConfigurationFile(String serviceName, String locale) throws RemoteServiceException { ResourceBundle rb = getResourceBundle(locale); try{ IService service = ServiceFactory.getInstance().getService(serviceName, true); [...] } catch(ServiceNotFoundException snfe){ throw new RemoteServiceException(rb.getString(ServiceGeneral_Error_ServiceNotFound)); } The only thing that you have to keep in mind writing the property-files is that you mustn't use the classic way of specifying non-latin1-characters by using \u1234 becaue the converted character will be converted to ISO-8859-1 leading to the loss of this character. The file must be UTF8 only. 2) The email will have multiple paragraphs of text, not just one-line messages as the property files are limited to (as far as I know). Similarly, our help-page and about-page have many large paragraphs of text. How can I translate these multi-line texts? It's a property-file, so you can add e.g. \n to add a newline or you add \r\n to add a DOS-newline. That's the reason why you have to use \\ if you want to add a backslash to your text. Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Change the plus sign with custom image
On Feb 26, 7:12 am, arjun karthickkuma...@gmail.com wrote: Hi I'm new to GWT. can you kindly let me know wat i shd do to change the default plus/minus sign in the tree with custom images. Read this: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/bb5c8c892007d80?hl=enq= Regards, Anders --~--~-~--~~~---~--~~ You received 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: Integrating GWT and Hibernate without Gilead?
Hello, Just one question : if you app works with Gilead, why do you want to work without it ? Would you plan to work without Hibernate even if JDBC is faster ?? (ok, that's 2 questions ;-)...) Just to know... Regards Bruno PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! On 26 fév, 22:47, Arthur Kalmenson arthur.k...@gmail.com wrote: You don't necessarily have to use JSON, XML or DTOs. We reuse our Hibernate entities on the client side. However, you need to keep in mind that all types of collections (Lists, Maps, Sets, etc) are turned into a Hibernate specific Persistent* object when you get the object from the database. An easy way to remove these Hibernate specific classes is to use Dozer to map the domain object to itself. This recreates the object and copies all the collection elements to regular java.util classes. -- Arthur Kalmenson On Thu, Feb 26, 2009 at 7:33 AM, Felipe Cypriano fmcypri...@gmail.com wrote: Maybe what you're looking for is JSON, XML or DTO (Data Transfer Object). In those cases you will do the bridge between the hibernate model and the data sent to GWT client, not Gilead anymore. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Wed, Feb 25, 2009 at 2:27 PM, hezjing hezj...@gmail.com wrote: Hi I'm tried Gilead, and it works great when integrating GWT and Hibernate. I also read from the forum that we can integrate GWT and Hibernate without Gilead (and it is faster?). I'm wondering, how should we handle the lazy loading without using library like Gilead? I'm still googling for the example of GWT and Hibernate integration without Gilead :-( -- Hez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
File Upload to a ASP and Getting Response as JSON
We are trying to upload a file from GWT app using FormPanel to an ASP (.asp) application. The ASP app receives the file and is able to store it locally. It returns back a JSON response. But, the response is being received as null by FormSubmitCompleteEvent.getResults(). The JSON response is right and shows up when the .asp file is submitted directly from a html. The content-type of the .asp response is text/html. Can we expect a correct JSON response from a .asp file running in IIS, in the GWT application ? Thanks, Sriram --~--~-~--~~~---~--~~ You received 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: Integrating GWT and Hibernate without Gilead?
Hi Bruno I'm using Gilead, but I also read about the discussion integrating GWT and Hibernate without Gilead. I'm wondering of how other do this without Gilead, just try to learn if there is an alternative way. On Fri, Feb 27, 2009 at 5:50 PM, noon bruno.marches...@gmail.com wrote: Hello, Just one question : if you app works with Gilead, why do you want to work without it ? Would you plan to work without Hibernate even if JDBC is faster ?? (ok, that's 2 questions ;-)...) Just to know... Regards Bruno PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! On 26 fév, 22:47, Arthur Kalmenson arthur.k...@gmail.com wrote: You don't necessarily have to use JSON, XML or DTOs. We reuse our Hibernate entities on the client side. However, you need to keep in mind that all types of collections (Lists, Maps, Sets, etc) are turned into a Hibernate specific Persistent* object when you get the object from the database. An easy way to remove these Hibernate specific classes is to use Dozer to map the domain object to itself. This recreates the object and copies all the collection elements to regular java.util classes. -- Arthur Kalmenson On Thu, Feb 26, 2009 at 7:33 AM, Felipe Cypriano fmcypri...@gmail.com wrote: Maybe what you're looking for is JSON, XML or DTO (Data Transfer Object). In those cases you will do the bridge between the hibernate model and the data sent to GWT client, not Gilead anymore. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Wed, Feb 25, 2009 at 2:27 PM, hezjing hezj...@gmail.com wrote: Hi I'm tried Gilead, and it works great when integrating GWT and Hibernate. I also read from the forum that we can integrate GWT and Hibernate without Gilead (and it is faster?). I'm wondering, how should we handle the lazy loading without using library like Gilead? I'm still googling for the example of GWT and Hibernate integration without Gilead :-( -- Hez -- Hez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Session
Hey Vagner Araujo! Thank you for your post! I've searched a long time for something like handling sessions in GWT!!! :D I have a question too. Waht's when the session invalidates (e.g. timeout)? Should there a heartbeat which checks the session validity? Thank you! -Danny 2009/2/27 Mahavir Jain vir.j...@gmail.com Thanks Vagner for sharing this. You can also refer the attached LoginManager which contains user Management. I, too downloaded from somewhere. I don't remember but source code is attached. Thanks. Mahavir On Fri, Feb 27, 2009 at 12:32 PM, Vagner Araujo araujo...@gmail.comwrote: Hello Friends, I was making a simple code of Session for my students. Well, I decided post that code here, because maybe it can serve as a basis for someone. //Main Class package com.javaneses.spring.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Cookies; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.DialogBox; import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.PasswordTextBox; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.Widget; import com.javaneses.spring.client.rpc.service.LoginService; import com.javaneses.spring.client.rpc.service.LoginServiceAsync; import com.javaneses.spring.client.rpc.service.SessionService; import com.javaneses.spring.client.rpc.service.SessionServiceAsync; /** * Entry point classes define codeonModuleLoad()/code. */ public class Main implements EntryPoint, ClickListener{ /** * This is the entry point method. */ private final SessionId sessionId = new SessionId(); private final DialogBox dialogBox = new DialogBox(); private final Label userLabel = new Label(User); private final Label passwdLabel = new Label(Password); private final TextBox userField = new TextBox(); private final PasswordTextBox passwdField = new PasswordTextBox(); private final Button login = new Button(Login); private final Label welcome = new Label(Welcome); private final User user = new User(); { FlexTable flexTable = new FlexTable(); flexTable.setWidget(0, 0, userLabel); flexTable.setWidget(0, 1, userField); flexTable.setWidget(1, 0, passwdLabel); flexTable.setWidget(1, 1, passwdField); FlowPanel panel = new FlowPanel(); panel.setWidth(100); panel.add(login); flexTable.setWidget(2, 1, panel); dialogBox.setSize(350, 150); dialogBox.add(flexTable); login.addClickListener(this); sessionId.setSessionId(Cookies.getCookie(session)); }//end init block public void onModuleLoad() { validateSession(); }//end onModuleLoad private void validateSession(){ SessionServiceAsync myServiceAsync = (SessionServiceAsync)GWT.create (SessionService.class); ServiceDefTarget serviceDefTarget = (ServiceDefTarget) myServiceAsync; serviceDefTarget.setServiceEntryPoint(session); AsyncCallbackSessionId asyncCallback = new AsyncCallbackSessionId (){ public void onFailure(Throwable caught) { System.out.println(caught); }//end onFailure public void onSuccess(SessionId result) { if(result == null){ RootPanel.get().clear(); RootPanel.get().add(dialogBox); System.out.println(Teste1); }else if(!sessionId.getSessionId().equals(result.getSessionId())){ RootPanel.get().clear(); RootPanel.get().add(dialogBox); System.out.println(Teste2); }else if(sessionId.getSessionId().equals(result.getSessionId())){ RootPanel.get().add(welcome); } }//end onSucess };//end AsyncCallbackString asyncCallback = new AsyncCallbackString() myServiceAsync.session(sessionId, asyncCallback); }//end
Re: Two TabPanels, different CSS styles
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: Error in Application
[WARN]StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.company.client.rpc.TeacherService.getPupils(java.lang.Integer)' threw an unexpected exception: java.lang.NoClassDefFoundError: org/ springframework/context/ApplicationContext This means that org.srping.framework.ApplicationContext is not in your classpath. You probably need to add a Spring jar to it. If this is happening when you run hosted mode, then you need to make sure the jar is listed in the -cp arguement of your dev shell shell start script. If in deployed (web) mode, it needs to be in the web app's lib directory. On Feb 27, 7:21 am, poonam poonam...@gmail.com wrote: Hello, Actually I have developed an Application integrating GWT+Spring +Hibernate in the Hosted mode , with the help of the below given links by you - Part One :http://eggsylife.blogspot.com/2007/10/well-this-tutorial- aims-at-helping.html Part Two:http://eggsylife.blogspot.com/2007/11/hibernate-spring-google-web-too... Part Three:http://eggsylife.blogspot.com/2008/02/hibernate-spring-google-web-too... Now I am getting many warnings in this application, but the warning I am unable to solve is : [WARN]StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.company.client.rpc.TeacherService.getPupils(java.lang.Integer)' threw an unexpected exception: java.lang.NoClassDefFoundError: org/ springframework/context/ApplicationContext at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure (RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:164) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at com.google.gwt.dev.shell.GWTShellServlet.service (GWTShellServlet.java:289) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal (StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: 929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: 160) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt (PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:683) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ ApplicationContext at com.company.server.gwt.TeacherServiceImpl.getPupils (TeacherServiceImpl.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
Re: Translating on the server-side
On 27 fév, 09:37, Lothar Kimmeringer j...@kimmeringer.de wrote: jbdhl schrieb: To be able to read in UTF-8, I defined my own ResourceBundle-implementation (quite a hack) Starting with Java 1.6, you should be able to read resource bundles as UTF-8 using a ResourceBundle.Control subclass overriding newBundle to use an UTF-8 Reader instead of InputStream as the argument to the PropertyResourceBundle ctor. Not sure it's less hackish, but it avoids the roundtrip between latin1 and utf8. It should also has the advantage of allowing \u escapes in your UTF-8 properties files. --~--~-~--~~~---~--~~ You received 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: File Upload to a ASP and Getting Response as JSON
On 27 fév, 11:20, Sriram Iyengar sriram.iyenga...@gmail.com wrote: We are trying to upload a file from GWT app using FormPanel to an ASP (.asp) application. The ASP app receives the file and is able to store it locally. It returns back a JSON response. But, the response is being received as null by FormSubmitCompleteEvent.getResults(). The JSON response is right and shows up when the .asp file is submitted directly from a html. The content-type of the .asp response is text/html. Can we expect a correct JSON response from a .asp file running in IIS, in the GWT application ? getResults() returning null is a symptom of facing the Same-Origin Policy: are you sure you're submitting your form to the same server (same scheme –http vs. https–, host name and port) your GWT app is served from? --~--~-~--~~~---~--~~ You received 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: Translating on the server-side
Thomas Broyer schrieb: On 27 fév, 09:37, Lothar Kimmeringer j...@kimmeringer.de wrote: jbdhl schrieb: To be able to read in UTF-8, I defined my own ResourceBundle-implementation (quite a hack) Starting with Java 1.6, you should be able to read resource bundles as UTF-8 using a ResourceBundle.Control subclass overriding newBundle to use an UTF-8 Reader instead of InputStream as the argument to the PropertyResourceBundle ctor. I know but the software must be able to run with Java 1.4 or higher, so this is not an option for me for the next - I think - four or five years. Regards, Lothar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Question about mGoogle Maps URL and its parameter gwt
Hello! Does anyone know what is the parameter gwt with the value1 for? The URL looks like the following: http://maps.google.com/maps?*gwt=1*amp;file=apiamp;v=2amp;key= I can't make differences between the functionality of URL with parameters and without parameters. Is the this parameter needed and why? Are there other possible values instead of 1 and what does they mean? Thank you! -Danny --~--~-~--~~~---~--~~ You received 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: File Upload to a ASP and Getting Response as JSON
Thanks Thomas. It was the same issue. Now we are front ending the calls by apache and have a reverse proxy setup to forward the calls to IIS. On Fri, Feb 27, 2009 at 5:07 PM, Thomas Broyer t.bro...@gmail.com wrote: On 27 fév, 11:20, Sriram Iyengar sriram.iyenga...@gmail.com wrote: We are trying to upload a file from GWT app using FormPanel to an ASP (.asp) application. The ASP app receives the file and is able to store it locally. It returns back a JSON response. But, the response is being received as null by FormSubmitCompleteEvent.getResults(). The JSON response is right and shows up when the .asp file is submitted directly from a html. The content-type of the .asp response is text/html. Can we expect a correct JSON response from a .asp file running in IIS, in the GWT application ? getResults() returning null is a symptom of facing the Same-Origin Policy: are you sure you're submitting your form to the same server (same scheme –http vs. https–, host name and port) your GWT app is served from? --~--~-~--~~~---~--~~ You received 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: What are your thoughts on Cappuccino and SproutCore?
Looks nice though. I checked the video and was impressed (only thing : yet another language to learn Objective J, not hard, but again another one...) On Feb 26, 2:26 pm, ivo ivo.reduto.fre...@gmail.com wrote: Cappuccino and SproutCore have been around for a while and they are really starting to make an impression on web developers. I've been using GWT in one project for 2 months, and I'm loving it. However I tried out Cappuccino, just to get the felling of it, and I was truly impressed. I was able to re-design the project's UI in Cappuccino in one week, and it seems to me that a lot of my server side code can be re-utilized if I use something like cp2javaws (haven't tried it). So, my question to you guys is how will GWT compete with Cappuccino or SproutCore, (and I'm not even mentioning JavaFX), and if you have anything planned to extend GWT capabilities of building really rich UIs just as easy as Cappuccino. Don't get me wrong, I'm a truly GWT lover. In my opinion GWT is superior in both performance and code security (minimization / obfuscation), but right now I'm really tempted to throw away 2 months of GWT work... Some pointers:http://280atlas.com/(just announced, I recommend watching the video)http://cappuccino.org/http://sourceforge.net/projects/cp2javaws/http://www.carsonified.com/web-apps/why-objective-j-cappuccino-and-sp... --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
[ANN] SmartGWT 1.0b2 Released
Hi,SmartGWT 1.0b2 has just been released. This release contains the much awaited Enterprise Gray skin. SmartGWT 1.0b2 is a stability release and contains various enhancements and bug fixes. GWT 1.6 M2 is also supported. Along with performance improvements, several new features and developer tools have been added. Some of the new features are : full support for WebServices (WSDL), portal support, checkbox selection for grids, and support for overlapping events in Calendars. A few new samples including Portals have been added to the showcase. These can be found under the New Samples side nav category. You can find the release announcement here : http://www.jroller.com/sjivan/entry/smartgwt_1_0b2_released_with Project Page : http://code.google.com/p/smartgwt/ Showcase Demo : http://www.smartclient.com/smartgwt/showcase/ Thanks, Sanjiv --~--~-~--~~~---~--~~ You received 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: What are your thoughts on Cappuccino and SproutCore?
If you watch the Hello world starter tutorial for Cappuccino, there is the basic problem highlighted: He creates an action on the button to call swap to change Hello world to Goodbye - but he forgets to actually create the swap method itself, so app crashes and you see this in firebug: Exception... - [AppController: swap] unrecognized selector sent to instance 0x000133 when calling method Aside from the fact that in GWT first your IDE and if not then then the compiler will pick that up before you even try to run it and your IDE will probably auto-write a stub for the fix for you to boot, Eclipse etc java debugging tools are light years ahead of this, partly due to Java having strong static typing, which Cappuccino clearly doesn't No big deal in the small, but scale up and you are back to the javascript maintenance nightmare. It can't compete with Java tooling nor Java itself. Looks pretty and has a few fancy widgets that do a bit more out of the box than GWT equivalents. Be interested to see how they they cope with data structures like hash maps and how you could hook up widgets using Observer pattern for example. On Feb 27, 12:18 pm, Rockster rjan...@gmail.com wrote: Looks nice though. I checked the video and was impressed (only thing : yet another language to learn Objective J, not hard, but again another one...) On Feb 26, 2:26 pm, ivo ivo.reduto.fre...@gmail.com wrote: Cappuccino and SproutCore have been around for a while and they are really starting to make an impression on web developers. I've been using GWT in one project for 2 months, and I'm loving it. However I tried out Cappuccino, just to get the felling of it, and I was truly impressed. I was able to re-design the project's UI in Cappuccino in one week, and it seems to me that a lot of my server side code can be re-utilized if I use something like cp2javaws (haven't tried it). So, my question to you guys is how will GWT compete with Cappuccino or SproutCore, (and I'm not even mentioning JavaFX), and if you have anything planned to extend GWT capabilities of building really rich UIs just as easy as Cappuccino. Don't get me wrong, I'm a truly GWT lover. In my opinion GWT is superior in both performance and code security (minimization / obfuscation), but right now I'm really tempted to throw away 2 months of GWT work... Some pointers:http://280atlas.com/(justannounced, I recommend watching the video)http://cappuccino.org/http://sourceforge.net/projects/cp2javaws/http:.. --~--~-~--~~~---~--~~ You received 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 Debug/Trace client side code when deploying Tomcat
Hi, If you use the commons logging port i_log (GPL2) that I wrote, you can use it in production settings (when gwt is actually running in a web browser). It sends log messages over rpc, and you can display them via the Adligo Gwt Log Server (Costs $$), or you can just send them to your a file via log4j on the server side (Costs Your Time). http://www.adligo.com/#Products http://www.adligo.com/#Source (source and compiled jars) http://www.adligo.com/dist2/gwt/gwt_main_v3_0/ (last nights build) Example bootstrap http://cvs.adligo.org/viewvc/gwt_util_demo/src/org/adligo/gwt/util/demo/client/UtilEntryPoint.java?view=markup public void onModuleLoad() { // just info //String log_config_file = adligo_log.properties; try { GwtPlatform.init(); new GwtLogFactory(); } catch (Exception x) { x.printStackTrace(); log.error(x.getMessage(), x); } You need these jars (i_util, i_log, adi, gwt_util). adligo_log.properties comes from your public folder (where your module.html file is). Cheers, Scott On Feb 26, 12:14 pm, joe young keven.c...@gmail.com wrote: Hi Allahbaksh, Arthur and mars1412~ Thanks for your suggestions!! FireBug suits me perfectly Thanks I found out that while building the children node with recurrsive method, it stops when I set the node to disable() if (theObject.getDeprecated().equals(1)) { childTreeNode.disable(); --- this will stop the funciton and the tree cannot built. } else { childTreeNode.enable(); } firebug give me this error: this.getOwnerTree() is undefined [Break on this error] Ext.tree.TreeNode=function(A){A=A||{};if... (this.ui.destroy){this.ui.destroy()}}}); and chrome's javascript console output this error Uncaught TypeError: Cannot call method 'getSelectionModel' of undefinedhttp://localhost:8084/DMTAdmin/com.DMTAdmin/js/ext/ext-all.js (line 102) What is that suppose to mean and how can it be resolve?!?! Thanks again for your help! On Feb 26, 5:55 am, Allahbaksh Asadullah a.allahba...@gmail.com wrote: Hi, As Martin pointed out you can use FireBug or Google Chrome inbuilt feature. But if you have problem debugging on different browser on your platform then I would suggest the build of OOPH is what is required. By using OOPHM you can debug your application on any browser of your choice. Building OOPHM is simple and it is listed on my bloghttp://allahbaksh.blogspot.com Regards, Allahbaksh Mohammedali Asadullahhttp://allahbaksh.blogspot.com On Feb 26, 2:26 pm, mars1412 martin.trum...@24act.at wrote: you could use firebug for firefox it will display the logmessages in the console also Iron (type of Chrome) has a java-script console where you can see the logs On Feb 25, 8:35 pm, joe young keven.c...@gmail.com wrote: I'm using NetBeans to develope my GWT applicaiotn. Everything works fine when i deploy to gwt-shell-hosted. However when I deploy to tomcat 6 with netbeans, many little problems occur. Such as. I have a TreePanel that display all the regions. When the TreePanel first create, it will call RPC to retreive data service.getGeoRootNode(new AsyncCallback() { public void onSuccess(Object result) { GeoNode rootNode = (GeoNode) result; rootTreeNode.setText(rootNode.getNodeDesc()); rootTreeNode.setIconCls(rootNode.getNodeName() + - icon); buildChildTreeNode(rootNode, rootTreeNode); // build the children nodes setRootNode(rootTreeNode); }}); However the tree building stop right after the rootNode is created. I cannot trace the code because GWT.log() cannot print to tomcat logging (I'm using log4J for server side logging) thus I don't know what happen Question1: How can we trace the client side code? Is it possible that ask GWT.log dump to log4J? Question 2: Is it because buildChildTreeNode(rootNode, rootTreeNode) is outside of onSuccess() so it cannot be run?? Thanks for your help 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 -~--~~~~--~~--~--~---
GDE M20090227: supports GWT 1.6.0 M1 Now
Hi, After the first release of GDE (GWT Development Environment based on Eclipse) at the beginning of this month, I received several feedbacks from the people here. Thanks for your interest and help. This really inspired me and GDE move forward. This is an update on what I have done on the GDE so far: 1. GWT 1.6.0M1 support GWT 1.6.0 M1 released soon after my first version released, and the new build of GDE currently can work within this version, new features supported include: * Using Jetty as the web server, which starts much faster than the previous embedded TomCat * Using the new project structure shipped with 1.6.0 * New Host Browser Shell 2. GWT Product Build Now, the product can be build by right click the production and select the Build command. The output can be directly deployed in the web server. Actually, I'm facing problem to implement a headless build atm. Thinking to provide a ant task, which is similar with PDE headless build does, anybody can give some guide on this? If you have interesting to play with this tool, please find the link: http://code.google.com/p/ming-gde/wiki/GDE_1_0_0_M20090227_Released for a simple guide. The next step: 1. Building using ant: priority is high 2. Freeze the core API of core GWT plug-in - First of first: GWT port of OSGi implementation, registry, extension and extension points etc. Please feel free to let me know if you are facing any issues to try the latest build. I'm more than happy to answer any questions about it. Comments, suggestions are most welcome. Thanks, Regards, Dop --~--~-~--~~~---~--~~ You received 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: HowTo cancel a RPC call?
Depends on the browser you're using, but if Firebug shows that it's waiting for 10 requests, that's probably a bug. -- Arthur Kalmenson On Fri, Feb 27, 2009 at 3:31 AM, alex.d alex.dukhov...@googlemail.com wrote: Exactly what i was looking for. Thx guys. Another thing: i've tried this in FF with Firebug. What i can see is that when i cancel the request, firebug still shows it as waiting for response. But though i had no problem with starting 10 of them simultaneously which shouldn't be possible because of the limit of concurrent XMLHttpRequests in browser, that's probably just a Firebug bug. Thx again On 26 Feb., 19:48, Jason Essington jason.essing...@gmail.com wrote: right, return RequestBuilder and you have to handle the sending of the RPC yourself, but it does allow you to muck about with headers and such. Return Request and you don't get the opportunity to molest the request before it is sent, but you also don't have to manually send it either. Either way, you are given the ability to call cancel() on an active request. all depends upon what your needs are. -jason On Feb 26, 2009, at 10:11 AM, Ian Petersen wrote: On Thu, Feb 26, 2009 at 8:56 AM, alex.d alex.dukhov...@googlemail.com wrote: Recently i've found myself in a situation where i have to cancel a RPC call. I've found out that RequestBuilder.send() method returns a Request object that provides a cancel() method. But is it possible to get Request object without using RequestBuilder? I'm currently very comfortable with RPC (except for the above matter) and i'm reluctant to switch to RequestBuilder. There's a way to get your async methods to return an object that you can use to cancel an in-flight RPC. I can never remember the name of the type, but you just change your async method to return RequestBuilder (I think) instead of void. It leaves the invocation of send() up to you, but the request is pre-built so it's not much extra work, and it gives you the opportunity to play with headers and invoke cancel(). If you search the history of this list, you might find a definitive answer on the type you need and, if not, try the history of the contributor's list. 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: Integrating GWT and Hibernate without Gilead?
PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! How is it pain? It's one line of code: (SomeDomainObject) dozerMapper.map(retrievedFromHibernate, SomeDomainObject.class) -- Arthur Kalmenson On Fri, Feb 27, 2009 at 4:50 AM, noon bruno.marches...@gmail.com wrote: Hello, Just one question : if you app works with Gilead, why do you want to work without it ? Would you plan to work without Hibernate even if JDBC is faster ?? (ok, that's 2 questions ;-)...) Just to know... Regards Bruno PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! On 26 fév, 22:47, Arthur Kalmenson arthur.k...@gmail.com wrote: You don't necessarily have to use JSON, XML or DTOs. We reuse our Hibernate entities on the client side. However, you need to keep in mind that all types of collections (Lists, Maps, Sets, etc) are turned into a Hibernate specific Persistent* object when you get the object from the database. An easy way to remove these Hibernate specific classes is to use Dozer to map the domain object to itself. This recreates the object and copies all the collection elements to regular java.util classes. -- Arthur Kalmenson On Thu, Feb 26, 2009 at 7:33 AM, Felipe Cypriano fmcypri...@gmail.com wrote: Maybe what you're looking for is JSON, XML or DTO (Data Transfer Object). In those cases you will do the bridge between the hibernate model and the data sent to GWT client, not Gilead anymore. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Wed, Feb 25, 2009 at 2:27 PM, hezjing hezj...@gmail.com wrote: Hi I'm tried Gilead, and it works great when integrating GWT and Hibernate. I also read from the forum that we can integrate GWT and Hibernate without Gilead (and it is faster?). I'm wondering, how should we handle the lazy loading without using library like Gilead? I'm still googling for the example of GWT and Hibernate integration without Gilead :-( -- Hez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Google Maps API
Hi team, Am using gwt-maps 1.0, for my project. Am finding difficulty in managing large number of markers, setting the z-index of a marker. Can any body help me out in this. Any tips and tricks on google maps are appreciated. Thanks in advance Naveen. --~--~-~--~~~---~--~~ You received 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: Integrating GWT and Hibernate without Gilead?
Bruno, Arthur likes to send his whole object model from the server to the client ;) Users should be careful taking advise from Arthur. He *loves* giving advise. The only problem is that they are terrible and on subjects that he has little or no knowledge. Make sure you take a second opinion before following Arthurs advise. Rob On Feb 27, 9:10 am, Arthur Kalmenson arthur.k...@gmail.com wrote: PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! How is it pain? It's one line of code: (SomeDomainObject) dozerMapper.map(retrievedFromHibernate, SomeDomainObject.class) -- Arthur Kalmenson On Fri, Feb 27, 2009 at 4:50 AM, noon bruno.marches...@gmail.com wrote: Hello, Just one question : if you app works with Gilead, why do you want to work without it ? Would you plan to work without Hibernate even if JDBC is faster ?? (ok, that's 2 questions ;-)...) Just to know... Regards Bruno PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! On 26 fév, 22:47, Arthur Kalmenson arthur.k...@gmail.com wrote: You don't necessarily have to use JSON, XML or DTOs. We reuse our Hibernate entities on the client side. However, you need to keep in mind that all types of collections (Lists, Maps, Sets, etc) are turned into a Hibernate specific Persistent* object when you get the object from the database. An easy way to remove these Hibernate specific classes is to use Dozer to map the domain object to itself. This recreates the object and copies all the collection elements to regular java.util classes. -- Arthur Kalmenson On Thu, Feb 26, 2009 at 7:33 AM, Felipe Cypriano fmcypri...@gmail.com wrote: Maybe what you're looking for is JSON, XML or DTO (Data Transfer Object). In those cases you will do the bridge between the hibernate model and the data sent to GWT client, not Gilead anymore. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Wed, Feb 25, 2009 at 2:27 PM, hezjing hezj...@gmail.com wrote: Hi I'm tried Gilead, and it works great when integrating GWT and Hibernate. I also read from the forum that we can integrate GWT and Hibernate without Gilead (and it is faster?). I'm wondering, how should we handle the lazy loading without using library like Gilead? I'm still googling for the example of GWT and Hibernate integration without Gilead :-( -- Hez- 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 -~--~~~~--~~--~--~---
incubator ScrollTable
I'm attempting to use the ScrollTable from the incubator package and I'm having problems. I copied the code from http://code.google.com/docreader/#p=google-web-toolkit-incubator,gwt-incubator-1-5-wikis=google-web-toolkit-incubatort=ScrollTable and I fixed an issue that must be from an old version, so I changed FlexCellFormatter to FixedWidthFlexCellFormatter. Added inherits name='com.google.gwt.gen2.Gen2' / in the xml file. It all compiles. But I get a: [ERROR] Unable to load module entry point class com.mycompany.client.ScrollTest (see associated exception for details) java.lang.IndexOutOfBoundsException: Row index: 0, Row size: 0 The error is on the line: dataTable.setHTML(i, 0, LAST_NAMES[Random.nextInt (LAST_NAMES.length)]); So basically it's trying start setting the cell data and it's saying that there are no rows. Now, according to the ScrollTable constructor: ScrollTable(FixedWidthGrid dataTable, FixedWidthFlexTable headerTable) from the docs http://collectionofdemos.appspot.com/javadoc/index.html The dataTable is a FixedWidthGrid which is basically a Grid. And I know Grids need to be sized at the start, but there doesn't seem to be a place to size it. Anyone have a clue how to get this widget working? All I'm really looking for is a replacement for the FlexTable that allows resizable columns and the demo for this looks like what I need. I already tried both ext libs, smartgwt and another component library. --~--~-~--~~~---~--~~ You received 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: incubator ScrollTable
Well, I was able to get this working by swapping out the gen2 imports with the widgetsideas package. I'm noticing that all the classes are deprecated though. Is there a reason for this and is there someplace that explains more details on using the incubator widgets? On Feb 27, 9:45 am, Nick nickc...@gmail.com wrote: I'm attempting to use the ScrollTable from the incubator package and I'm having problems. I copied the code fromhttp://code.google.com/docreader/#p=google-web-toolkit-incubator,gwt-... and I fixed an issue that must be from an old version, so I changed FlexCellFormatter to FixedWidthFlexCellFormatter. Added inherits name='com.google.gwt.gen2.Gen2' / in the xml file. It all compiles. But I get a: [ERROR] Unable to load module entry point class com.mycompany.client.ScrollTest (see associated exception for details) java.lang.IndexOutOfBoundsException: Row index: 0, Row size: 0 The error is on the line: dataTable.setHTML(i, 0, LAST_NAMES[Random.nextInt (LAST_NAMES.length)]); So basically it's trying start setting the cell data and it's saying that there are no rows. Now, according to the ScrollTable constructor: ScrollTable(FixedWidthGrid dataTable, FixedWidthFlexTable headerTable) from the docshttp://collectionofdemos.appspot.com/javadoc/index.html The dataTable is a FixedWidthGrid which is basically a Grid. And I know Grids need to be sized at the start, but there doesn't seem to be a place to size it. Anyone have a clue how to get this widget working? All I'm really looking for is a replacement for the FlexTable that allows resizable columns and the demo for this looks like what I need. I already tried both ext libs, smartgwt and another component library. --~--~-~--~~~---~--~~ You received 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: Is there a way of grep-ing for text in a search that meets teh TC?
Could you post a link to the TC to which you're referring On Feb 26, 6:02 am, james.fitzj...@sansource.co.uk james.fitzj...@sansource.co.uk wrote: What I want to do is have my website search for a term then find out how many pages contained that term. Its easy enough to do with php and curl but it isnt allowed by the google TC I dont need a page worth of search results a search bar etc all i need is the number of pages that contain the searched term. --~--~-~--~~~---~--~~ You received 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: incubator ScrollTable
Nick, The widgetideas classes are deprecated because they are being replaced by newer, improved versions in the gen2 package. The old classes are still around to help people who are transitioning to the gen2 versions. I'm not aware of a completely comprehensive guide to incubator widgets, but there is a lot of demo code that can be very helpful. The JavaDocs are also a good place to look for information on widget API. - Isaac On Fri, Feb 27, 2009 at 9:57 AM, Nick nickc...@gmail.com wrote: Well, I was able to get this working by swapping out the gen2 imports with the widgetsideas package. I'm noticing that all the classes are deprecated though. Is there a reason for this and is there someplace that explains more details on using the incubator widgets? On Feb 27, 9:45 am, Nick nickc...@gmail.com wrote: I'm attempting to use the ScrollTable from the incubator package and I'm having problems. I copied the code fromhttp://code.google.com/docreader/#p=google-web-toolkit-incubator,gwt-... and I fixed an issue that must be from an old version, so I changed FlexCellFormatter to FixedWidthFlexCellFormatter. Added inherits name='com.google.gwt.gen2.Gen2' / in the xml file. It all compiles. But I get a: [ERROR] Unable to load module entry point class com.mycompany.client.ScrollTest (see associated exception for details) java.lang.IndexOutOfBoundsException: Row index: 0, Row size: 0 The error is on the line: dataTable.setHTML(i, 0, LAST_NAMES[Random.nextInt (LAST_NAMES.length)]); So basically it's trying start setting the cell data and it's saying that there are no rows. Now, according to the ScrollTable constructor: ScrollTable(FixedWidthGrid dataTable, FixedWidthFlexTable headerTable) from the docshttp://collectionofdemos.appspot.com/javadoc/index.html The dataTable is a FixedWidthGrid which is basically a Grid. And I know Grids need to be sized at the start, but there doesn't seem to be a place to size it. Anyone have a clue how to get this widget working? All I'm really looking for is a replacement for the FlexTable that allows resizable columns and the demo for this looks like what I need. I already tried both ext libs, smartgwt and another component library. --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
SEO limitation for Hyperlink
Hi all, I'm working for a compagny which build a web site broadcasting music based on gwt: www.awdio.com On SEO, we've found some interresting stuff to cope with Ajax specifity : search engine can't have javascript engine so they are not able to retrieve the entire html produced by gwt script (or by other ajax framework script). So each page ie gwt screen can not be indexed by them. Rather than duplicate each page with a hand-made static html page accessible by the noscript tag, we produce them with a java program which launches an SWTBrowser (Eclipse 3.4) with the start url : http://www.awdio.com. The main issue with this approach is that the client program has no means of knowing when the page is fully rendered by the javascript process. In the gwt awdio code we implemented a semaphore (flag) which notifies the SWTBrowser based client of the completion. This semaphore works with a hidden DIV drawing/DIV which is accessible or not in the DOM, i.e the the html content produced contains it. With org.eclipse.swt.browser.Browser.getText() we can retrieve the html content, and test for the presence of the above mentioned flag. To do that the java program listens at the Browser statustext event (org.eclipse.swt.browser.StatusTextListener). Also, when the page is loaded, the program gets the content and looks up at all the internal links a href=# built by the gwt Hyperlink widget. Before storing the html content in a cachable static page, all the '#' are remplaced by a '/' so that the bot will get fully qualified URLs (the crawlers do not handle anchors). Finally, the program follow each links with the SWTBrowser so all the static version of the pages can be produced automaticaly. At last in the awdio server, a front-end servlet detects the user-agent of request and if it's a search engine the static produced page is returned. else the gwt host page is returned. As far as I understand, this might be considered shadowing. But the content seen by the crawler is exactly the same as the one seen by the user (after Javascript execution). In the onModuleLoad of the awdio EntryPoint the right part of the url is parsed to build the corresponding historyToken. So when the www.awdio.com/events is requested on a browser, it react in the same way as if the user clicked on an internal link (#events). Everythink looksfine, but there is still a big issue. If a user copies and pastes one of our URLs on his own site, it will contain the hash sign (e.g. : http://www.awdio.com/#events). Which means that the search engine will not rank pages independently (all pages will be considered as a single one : http://www.awdio.com). We can still add link to this page buttons wherever necessary, but it's not satisfactory. To conclude, it seems that this whole solution solves the AJAX indexing issue, with the very annoying exception of page ranking (due to the #anchor URLs). Maybe Google should start to consider #anchors as having a new meaning for our Web 2.0 generation ? Maybe by considering a specific value of the rel attribute ? (e.g. : A HREF=#mypage rel=ispagelinkMy Page/A) ? --~--~-~--~~~---~--~~ You received 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 Session
Hi, in this example the cookie will expire when the current browser session is ended, but below is a snippet of code that will make the session expire every two minutes of inactivity. //Main Class public void onClick(Widget sender) { if(sender == login){ user.setUser(userField.getText()); user.setPasswd(passwdField.getText()); LoginServiceAsync loginServiceAsync = (LoginServiceAsync)GWT.create (LoginService.class); ServiceDefTarget serviceDefTarget = (ServiceDefTarget) loginServiceAsync; serviceDefTarget.setServiceEntryPoint(login); AsyncCallbackString asyncCallback = new AsyncCallbackString() { public void onSuccess(String result) { if(result != null){ RootPanel.get().clear(); RootPanel.get().add(welcome); //session expire every two minutes of inactivity Cookies.setCookie(session, result, new Date (System.currentTimeMillis() + TWO_MIN)); sessionId.setSessionId(result); System.out.println(login session = +result); }else{ Window.alert(Login Invalid !); } } public void onFailure(Throwable caught) { System.out.println(caught); } };//end asyncCallback loginServiceAsync.login(user, asyncCallback); }//end if(sender == login) }//end onClick //end class Main //Class SessionServiceImpl public SessionId session(SessionId sessionId) { HttpSession httpSession = getThreadLocalRequest().getSession(false); if(httpSession != null){ try { sessionId.setSessionId(httpSession.getId()); } catch (IllegalStateException e) { sessionId.setSessionId(); } return sessionId; }//end if(result == null) return null; }//end session //end Class SessionServiceImpl //Class LoginServiceImpl public String login(User user) { if(user != null user.getUser().equalsIgnoreCase(vagner) user.getPasswd().equals(Javagner)){ HttpSession httpSession = getThreadLocalRequest().getSession(); //Specifies the time in seconds, before the servlet container will invalidate this session. httpSession.setMaxInactiveInterval(1000 * 60 *2); return httpSession.getId(); }//end if return null; }//end login //end LoginServiceImpl thanks All ;-) Professor Vagner Vagner Araujo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
RPC in timer and memory leak
Hi all, i'm developing a tracking application. I think that there's a memory leak issue when a rpc is called inside a timer repeating. the code is semplified as follow: public void onModuleLoad() { startRefreshInfoSupp(); } where the startRefreshInfoSupp is final AsyncCallback asyncCallback = new AsyncCallback() { public void onFailure(Throwable caught) { .. } public void onSuccess(Object result) { GWT.log(Ricevute seguenti informazioni supplementari: +(String) result, null); .. } } } }; Timer t = new Timer() { public void run() { proxyAsync.getServiceWsNaviInMare(). getInfoSupp(asyncCallback); } }; t.scheduleRepeating(MainEntryPoint.refreshLastUpdatePeriod); } this code as is, make the memory usage increase and increase. I'm working with gwt 1.5.3 and ie7 no problem on ff have you got any idea? any known issue? pls help, thx have a nice day, Michela --~--~-~--~~~---~--~~ You received 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: Translating on the server-side
I'm not familiar with XLIFF, but I wonder how you distinguish there between \n and br (if you want your paragraph to be on an html page as opposed to a console or some other output. Properties files at least allow you to distinguish between the two. If I remember correctly, XLIFF support is planned for 2.0. On Feb 26, 12:19 pm, jbdhl jbirksd...@gmail.com wrote: 1) GWT's i18n can't be used as is, since the interfaces are meant to be used at compile-time and the actual text from the properties files gets put into the js/html files. So there is no way to re-use the plural-technology in the Messages class on the server side? Are we really forced to use two different technologies then? E.g. the GWT methods on the client side and gettext on the server? This is kind of ugly IMHO. prop2 = first line of prop2 \n \ second line of prop2 \n \ third line of prop2 But then translators (which are non-technicans) have to use \n when breaking lines? Is that really the only way of doing it? I look forward to the XLIFF support in GWT as these property files are very limited in many ways. --~--~-~--~~~---~--~~ You received 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 wait for return value from RPC before Tree node is moved
I'm trying to resort my nodes of the tree and save the new sorting into the database. I want to make sure the save is successful before I move the node, o/w it will display alert. public boolean doBeforeMoveNode(Tree tree, TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { return simpleNTreePanel.moveQuestion (node,oldParent,newParent,index); } In moveQuesiton(), i called RPC and it will return a Boolean so me that if it is successful or not. public boolean moveQuestion(TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { service.resorting(theNode.getId(), 1, new AsyncCallback() { public void onSuccess(Object result) { Boolean result = (Boolean) result; !-- If result is true moveQusetion() will return true and node will be moved; otherwise Window.alert(ERROR Moving failed); and return false and it stop the node moving -- } public void onFailure(Throwable caught) { Window.alert(ERROR Moving failed); } }); } How can moveQuestion() wait until the RPC return the result?? I don't want to use wait() coz it might took forever or it only take in sec. Sorry for the stupid question. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Error in Application
I have posted a few replies about this on the blog. Assuming your project is building correctly you must already have the Spring Jar on your buildpath. Its just your classes that seem incorrect. The application context shouldn't be on your client side. I notice it says: 'com.company.client.rpc.TeacherService.getPupils threw exception' this seems to be caused by you having the Spring Classes on your client side code. GWT can only handle certain types of object client side and the rest of your code should be server side. It identifies client side/server side by the package containing client. You must not have server side objects on your client side so in this case anything under: 'com.company.client' should all be GWT compatible Java classes. Hope this helps, I have also replied on the blog post part 3. Eggsy On Feb 27, 11:27 am, gregor greg.power...@googlemail.com wrote: [WARN]StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.company.client.rpc.TeacherService.getPupils(java.lang.Integer)' threw an unexpected exception: java.lang.NoClassDefFoundError: org/ springframework/context/ApplicationContext This means that org.srping.framework.ApplicationContext is not in your classpath. You probably need to add a Spring jar to it. If this is happening when you run hosted mode, then you need to make sure the jar is listed in the -cp arguement of your dev shell shell start script. If in deployed (web) mode, it needs to be in the web app's lib directory. On Feb 27, 7:21 am, poonam poonam...@gmail.com wrote: Hello, Actually I have developed an Application integrating GWT+Spring +Hibernate in the Hosted mode , with the help of the below given links by you - Part One :http://eggsylife.blogspot.com/2007/10/well-this-tutorial- aims-at-helping.html Part Two:http://eggsylife.blogspot.com/2007/11/hibernate-spring-google-web-too... Part Three:http://eggsylife.blogspot.com/2008/02/hibernate-spring-google-web-too... Now I am getting many warnings in this application, but the warning I am unable to solve is : [WARN]StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.company.client.rpc.TeacherService.getPupils(java.lang.Integer)' threw an unexpected exception: java.lang.NoClassDefFoundError: org/ springframework/context/ApplicationContext at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure (RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:164) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at com.google.gwt.dev.shell.GWTShellServlet.service (GWTShellServlet.java:289) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal (StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520) at
Re: How to wait for return value from RPC before Tree node is moved
private void doMove(/*required params*/){ // node move Implementation } public void moveQuestion(TreeNode node, TreeNode oldParent, TreeNode newParent, int index){ // setup // call rpc service.resorting(/*params*/, new AsyncCallbackBoolean(){ public void onSuccess(Boolean result){ if (result) doMove(/*params*/); else /* whine loudly */; } onFailure(Throwable caught){ // whine here too } }); // do nothing after the call as doMove will be called onSuccess } also, read this: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/faca1575f306ba0f/3be719c021aa19bd -jason On Feb 27, 2009, at 9:30 AM, joe young wrote: I'm trying to resort my nodes of the tree and save the new sorting into the database. I want to make sure the save is successful before I move the node, o/w it will display alert. public boolean doBeforeMoveNode(Tree tree, TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { return simpleNTreePanel.moveQuestion (node,oldParent,newParent,index); } In moveQuesiton(), i called RPC and it will return a Boolean so me that if it is successful or not. public boolean moveQuestion(TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { service.resorting(theNode.getId(), 1, new AsyncCallback() { public void onSuccess(Object result) { Boolean result = (Boolean) result; !-- If result is true moveQusetion() will return true and node will be moved; otherwise Window.alert(ERROR Moving failed); and return false and it stop the node moving -- } public void onFailure(Throwable caught) { Window.alert(ERROR Moving failed); } }); } How can moveQuestion() wait until the RPC return the result?? I don't want to use wait() coz it might took forever or it only take in sec. Sorry for the stupid question. --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Techniques for supplying information to GWT.create()
I've developed an XML marshalling library. It currently works by scanning through ALL types looking for annotated classes. I would like to support running the generating code from a list of classes instead of scanning, but there's no reasonable way of supplying parameters in this use case. The only technique I'm aware of is to use an abstract class or an interface as the deferred binding type and get the information from type signatures of methods for fields. This is a bit messy when it's used in this way. What I'd like to do is pass a list of classes to a GWT.create() call, so these are available to a code generator. Something like: T GWT.create(ClassT clazz, Object... params) Which would allow this: XMLContext c = GWT.create(XMLContext.class, Person.class, Company.class, Address.class); Is there any hope of extending GWT.create() to work this way? Is there a different technique I'm missing that might accomplish this? Should I just stick to requiring annotations and scanning all types? --~--~-~--~~~---~--~~ You received 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: Techniques for supplying information to GWT.create()
You might want to add a start to http://code.google.com/p/google-web-toolkit/issues/detail?id=1595 --~--~-~--~~~---~--~~ You received 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: Comparing equivalent UTF-8 characters across languages
Thanks for the response Freller. I already am doing it on the server side, as I say MySQL will do it with the right configuration settings, no need to use soundex. When the user enters some characters in a text field, the server returns strings that match those characters, but then when they enter another character I don't want to go all the way back to the server, I just want to filter the results I already have. I guess I'll implement it manually for the time being. Thanks again, Dirk On Feb 26, 9:22 pm, Freller andre.frel...@gmail.com wrote: You should do that on ther server side of your app. You should Google soundex, I'm sure you will find plenty of material on how to do that. Freller On Feb 26, 6:14 pm, dirk australiandevelo...@gmail.com wrote: It seems that in order to do this using regular Java, I would use the java.text.Collator class:http://java.sun.com/j2se/1.5.0/docs/api/java/text/Collator.html So now my question becomes simpler, is this supported, or is there an equivalent in GWT? Thanks, Dirk On Feb 26, 4:59 pm, dirk australiandevelo...@gmail.com wrote: Hi there, I'm writing an application in which I'd like to compare characters that exist in different languages. Specifically, I need String.contains(String s) to return true if one string contains characters _equivalent_ to another. For example: soñar.contains(on) should return true, recognising that the 'ñ' character is equivalent to 'n'. My database (MySQL) can do this automatically with the right configuration settings. I'm not sure if it's possible in Java. If so, is it supported by GWT? Thanks, Dirk --~--~-~--~~~---~--~~ You received 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: SmartGWT 1.0b2 Released
Hi Sanjiv, SmartGWT is really interesting, but I tried to use the smartGWT 1.0b1 version and I finally return to basic GWT because it was hard to make rpc calls to populate data grid. Now, I am really interested with your current release, especially for this element in the release notes : improved support for users to wire DataSource's with GWT-RPC calls What do you mean by that ? Can you provide in the smartGWT Showcase a complete example of using RPC calls to populate data grid? In my case, I have search fields and I can start a search by clicking a search button. Then I have a trip to the server via RPC calls. Here, I use Hibernate to get data from SQL database with my search criterias passed in parameters. Then the list of objects is return to the client side (I use Gilead to map my hibernate objects). Finally, the search results populate the data grid. Best regards, Benoit --~--~-~--~~~---~--~~ You received 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 while browser refresh
Hello Friends, I have working in a project on GWT. My project is all about customer information.Means it is a portal which contains all services,Trouble Tickets ,Bandwidth Utilization,Backup Utilization for all customers.Up to here every thing is fine after entered in to my application when i click on refresh button or F5 button this will through me out to login page. If any one is across this problem and have the solution to solve the same please let me know . If u give an idea on this that will be great. Thanks , Shiv... --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Hibernate/JPA gwt 1.5
Hi all, I'm very new to google web toolkit and i'm trying to get an overview how to build the web application using gwt 1.5. Most books i have for help are covering the gwt 1.4 version. One of the topics are the integration of hibernate/jpa. As I read now in the new version gwt 1.5 it's possible to use Annotations, but I also read a lot of user entries on some gwt pages, that this will not really help to send the data to the gwt client. So my questions are: 1.) Can i really use Annotations with gwt 1.5 2.) Do i have to go through the DTO approach to send my data to the gwt client? No other way? Thanks a lot in advance, tonil --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Listbox and ability to have no item selected
I am trying to create a single-select listbox where the visibleItem count is greater than 1 (not a dropdown), but no items are selected by default. Regardless of what I try, IE and the development browser seem to display the first element in the list as highlighted/selected. (It does seem to work the way I'd like in firefox.) I've tried programatically setting the selectedIndex to -1 after my list is created, but that doesn't seem to help. Anyone have any ideas for how I might accomplish this? Seems like it should be a simple task, but I'm embarassed to say I've spent way too much time on it already. Thanks, -Dave --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Dependency Injection: rocket-gwt Vs gwtoolbox
I'm starting a new project based on GWT and I want dependency injection! I've seen this two framework, but I'm not sure about the best choose. Can you help me? What do you guide me to this choose? Thanks to everyone! Davide --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Using an iGoogle like front end for a Struts backend
I currently have a site running on Java Struts built in IBM Websphere for iSeries (yes our DB server is an AS400). I've been tasked to change over the front end so that the modules currently being served up in an Iframe can be made into an iGoogle interface, with the ability to open and close the report windows and move them around, etc. Saving state as you go along to a cookie or similar. Does anyone have any guidance for how this can be accomplished? I can't change any of the struts backend, really. (Legacy theories anyone?) I've been trying various javascript/dhtml type solutions and they all fall short. Any help you can give would be great. Thanks, -TerriLyn --~--~-~--~~~---~--~~ You received 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 create listbox with nothing selected by default?
I'm trying to create a listbox with a visibleItemCount of more than one (I want a list, not a dropdown), with none of the items in the list selected by default. I've tried everything I can think of, and I'm still seeing the first item selected by default in both IE and the native development browser (it happens to work the way I want in firefox though). I found another post suggesting setting the selected index to -1, then programatically unsetting the previously selected item setItemSelected(index, false), but that doesn't work for me either. Anyone have any ideas how I might accomplish this? Seems like it should be easy, but I'm embarassed to admit I've already spent hours trying to get it working. Thanks, -Dave --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
TabPanel does not resize correctly with a DisclosurePanel, when a width is set?
I was going to post this as a bug, but thought I'd poll the discussion group first. I wasn't sure if this was a TabPanel or a DisclosurePanel bug, or if I'm just doing something wrong. The problem is, if I put a DisclosurePanel inside a TabPanel, it does not resize correctly when a width is set. Example code: public void onModuleLoad() { TabPanel tp = new TabPanel(); tp.setWidth(100%); DisclosurePanel dp = new DisclosurePanel(Test Disclosure Panel); dp.add(new Label(This is some test text)); tp.add(dp, Disclosure Panel Tab); tp.selectTab(0); RootPanel.get().add(tp); } Note that the first time you expand the disclosure panel, the test text appears below the visible area. If you click the disclosure panel two more times, it resizes correctly. Note that it is not always able to recover; in a larger application it can get so out-of-whack that the disclosure panel is never even visible again. If I take out the width, it works, but it's ugly. Am I missing a best practice here, or should I just not be using DisclosurePanel? Regards, Mike --~--~-~--~~~---~--~~ You received 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: What are your thoughts on Cappuccino and SproutCore?
Does anyone know what the equivalent GWT UI development tool would be? I played around with GWT about a year ago so I am assuming there are some better tools out there for drag-n-drop development of a GWT UI? --~--~-~--~~~---~--~~ You received 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 wait for return value from RPC before Tree node is moved
Hi Jason, Thanks for you quick reply~ Your solution works in some sense, but the problem I have the move node part is control by the TreePanelListener Adapter(): simpleNTreePanel.addListener(new TreePanelListenerAdapter () { public boolean doBeforeMoveNode(Tree tree, TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { //update database according to the sorting return someController.moveQuestion(); //if success return true }); public void onMoveNode(Tree simpleNTreePanel, TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { GWT.log(the node is moving by TreePanelListener , null); //If doBeforeMoveNode() is true, this will run and the TreeNode will be automatelly moved by TreePanelListener ; } } The only way to stop the moving (onMoveNode() ) is to return false at doBeforeMoveNode(). I'm sure there is some misunderstanding in my logic, but I don't know what it is, please guard me~ Thanks@ On Feb 27, 11:46 am, Jason Essington jason.essing...@gmail.com wrote: private void doMove(/*required params*/){ // node move Implementation } public void moveQuestion(TreeNode node, TreeNode oldParent, TreeNode newParent, int index){ // setup // call rpc service.resorting(/*params*/, new AsyncCallbackBoolean(){ public void onSuccess(Boolean result){ if (result) doMove(/*params*/); else /* whine loudly */; } onFailure(Throwable caught){ // whine here too }}); // do nothing after the call as doMove will be called onSuccess } also, read this:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... -jason On Feb 27, 2009, at 9:30 AM,joeyoungwrote: I'm trying to resort my nodes of the tree and save the new sorting into the database. I want to make sure the save is successful before I move the node, o/w it will display alert. public boolean doBeforeMoveNode(Tree tree, TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { return simpleNTreePanel.moveQuestion (node,oldParent,newParent,index); } In moveQuesiton(), i called RPC and it will return a Boolean so me that if it is successful or not. public boolean moveQuestion(TreeNode node, TreeNode oldParent, TreeNode newParent, int index) { service.resorting(theNode.getId(), 1, new AsyncCallback() { public void onSuccess(Object result) { Boolean result = (Boolean) result; !-- If result is true moveQusetion() will return true and node will be moved; otherwise Window.alert(ERROR Moving failed); and return false and it stop the node moving -- } public void onFailure(Throwable caught) { Window.alert(ERROR Moving failed); } }); } How can moveQuestion() wait until the RPC return the result?? I don't want to use wait() coz it might took forever or it only take in sec. Sorry for the stupid question. --~--~-~--~~~---~--~~ You received 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: Hibernate/JPA gwt 1.5
Hi Tonil, 1.) Can i really use Annotations with gwt 1.5 Yes we can haha. For example: For image bundles, replace @gwt.resource in your javadoc with the @Resourcehttp://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/ImageBundle.Resource.html annotation. 2.) Do i have to go through the DTO approach to send my data to the gwt client? No other way? Take a look at Gilead project: http://noon.gilead.free.fr/gilead/ Gilead helps you pass your entities to the GWT client. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Fri, Feb 27, 2009 at 8:44 AM, tonil ntrep...@gmail.com wrote: Hi all, I'm very new to google web toolkit and i'm trying to get an overview how to build the web application using gwt 1.5. Most books i have for help are covering the gwt 1.4 version. One of the topics are the integration of hibernate/jpa. As I read now in the new version gwt 1.5 it's possible to use Annotations, but I also read a lot of user entries on some gwt pages, that this will not really help to send the data to the gwt client. So my questions are: 1.) Can i really use Annotations with gwt 1.5 2.) Do i have to go through the DTO approach to send my data to the gwt client? No other way? Thanks a lot in advance, tonil --~--~-~--~~~---~--~~ You received 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 wait for return value from RPC before Tree node is moved
On Fri, Feb 27, 2009 at 10:05 AM, joe young keven.c...@gmail.com wrote: The only way to stop the moving (onMoveNode() ) is to return false at doBeforeMoveNode(). Maybe you need to always return false, and then, if the RPC succeeds, move the tree node programmatically. 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: Comparing equivalent UTF-8 characters across languages
In case anyone else is facing a similar problem, here's the code, tested on IE 7 and Firefox 3. Note that this only supports Spanish characters, you can add more to the charEquivalency table for other languages. private boolean contains(String container, String sub) { char[] contChars = container.toCharArray(); char[] subChars = sub.toCharArray(); for(int i = 0; i contChars.length; i++) { if( equivalentFrom(contChars, i, subChars) ) { return true; } } return false; } private boolean equivalentFrom(char[] contChars, int contI, char[] subChars) { int subI = 0; for(; subI subChars.length contI contChars.length; subI++, contI++) { if( ! equivalent(subChars[subI], contChars[contI]) ) { return false; } } if(subI == subChars.length) return true; return false; } static HashMapCharacter, Character charEquivalency = new HashMapCharacter, Character(); static { charEquivalency.put( 'n', (char)0x00F1 ); // ñ charEquivalency.put( 'a', (char)0x00E1 ); // á charEquivalency.put( 'e', (char)0x00E9 ); // é charEquivalency.put( 'i', (char)0x00ED ); // í charEquivalency.put( 'o', (char)0x00F3 ); // ó charEquivalency.put( 'u', (char)0x00FA ); // ú charEquivalency.put( 'u', (char)0x00FC ); // ü // Insert upper-case equivalents SetCharacter keySet = charEquivalency.keySet(); HashMapCharacter, Character upperCase = new HashMapCharacter, Character(keySet.size()); for(Character charEn : keySet) { Character charSp = charEquivalency.get(charEn); Character upperEn = Character.toUpperCase(charEn); Character upperSp = Character.toUpperCase(charSp); upperCase.put(upperEn, upperSp); } charEquivalency.putAll(upperCase); // Insert the opposite conversion, from Spanish // to English equivalents keySet = charEquivalency.keySet(); HashMapCharacter, Character opposites = new HashMapCharacter, Character(keySet.size()); for(Character charEn : keySet) { Character charSp = charEquivalency.get(charEn); opposites.put(charSp, charEn); } charEquivalency.putAll(opposites); for(Character c : charEquivalency.keySet()) { Character val = charEquivalency.get(c); //GWT.log(c + (+ (int)c + ): + val + (+ (int)val + ), null); } } private boolean equivalent(char first, char second) { if(first == second) return true; Character firstEquiv = charEquivalency.get(first); if(firstEquiv == null) return false; return firstEquiv.equals(second); } On Feb 27, 3:44 pm, dirk australiandevelo...@gmail.com wrote: Thanks for the response Freller. I already am doing it on the server side, as I say MySQL will do it with the right configuration settings, no need to use soundex. When the user enters some characters in a text field, the server returns strings that match those characters, but then when they enter another character I don't want to go all the way back to the server, I just want to filter the results I already have. I guess I'll implement it manually for the time being. Thanks again, Dirk On Feb 26, 9:22 pm, Freller andre.frel...@gmail.com wrote: You should do that on ther server side of your app. You should Google soundex, I'm sure you will find plenty of material on how to do that. Freller On Feb 26, 6:14 pm, dirk australiandevelo...@gmail.com wrote: It seems that in order to do this using regular Java, I would use the java.text.Collator class:http://java.sun.com/j2se/1.5.0/docs/api/java/text/Collator.html So now my question becomes simpler, is this supported, or is there an equivalent in GWT? Thanks, Dirk On Feb 26, 4:59 pm, dirk australiandevelo...@gmail.com wrote: Hi there, I'm writing an application in which I'd like to compare characters that exist in different languages. Specifically, I need String.contains(String s) to return true if one string contains characters _equivalent_ to another. For example: soñar.contains(on) should return true, recognising that the 'ñ' character is equivalent to 'n'. My database (MySQL) can do this automatically with the right configuration settings. I'm not sure if it's possible in Java. If so, is it supported by GWT? Thanks, Dirk --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Deploying GWT on DJagno
It's my first mail here so I would like to say hello to everyone! I have recently started using GWT together with DJango and quickly come to a dilemma: how to properly deploy GWT into DJango, so the maintance would be easy as well as accessing everything from DJango. Right now we are using a simple simlink inside server code to the client code (JS compiled by GWT) and server those Apps (right now it's a single app). Are there any better ways? Mayber there are some best practices or at least you have tried it already and worked out some good ways with dealing with this? -- Filip Gruszczyński --~--~-~--~~~---~--~~ You received 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: Take Offine : Why Gears When Save As... works fine (on Chome/Firefox) ??
Hi Combi, If all you want is for the user to be able to view your application without actually performing any operations requiring persistence, then your approach should work and meet your needs. However, there are more than a few reasons why using something like Gears to take your application offline would make a lot of sense: 1) For cases where you do want to handled operations requiring persistence. 2) As a developer, you don't have to go through the hassle of tracking all the resources that need to be packaged into a zip when the user clicks Save as HTML page (also, the term Save as HTML page doesn't clearly indicate that this will allow me to use the entire application offline, so you'll have to use a more informative term that might seem alien to the user), 3) Your users can use the application as they normally would and it will just work, whether they are connected or not. 4) You can take advantage of some of the other useful features in Gears such as desktop shortcuts or multiple file upload, if they make sense for your application. This is probably more of a Gears question than something GWT-related, so I would encourage you post up about the question on the Gears group to see other reasons why it might be a good choice, or why implementing a Save as HTML page feature might be enough for your needs. Gears group: http://groups.google.com/group/gears-users Hope that helps, -Sumit Chandel On Sun, Feb 22, 2009 at 3:21 PM, combi nicolas.comb...@gmail.com wrote: Hi all, I just made a working proto framework on top of GWT and SmartGWT that allows, among other things, to take an application offline using save as HTML page This works fine with Firefox and Chrome and I think even Safari, so I would like your opinions on the subject. The use-case to take the app offline: 1) the user at some point clicks on take application offline. 1b) the user gets a zip file downloaded to be extracted anywhere (no need to be local admin). This is for image and resource issues and is needed only one time per machine. 2) the user use the save as... feature of the browser and saves the page into the root folder of the zip extract. 3) the user opens the file locally (with a url file:///something) and the application runs fine. 4) the user can save this offline work anytime by using save..as again. 5) the user can commit changes to the server by going to the online site and uploading the local file. No need for a local HTTP server, nor a database. Of course you have to handle in your AJAX GUI the online/offline cases and read from DOM cache instead of RPC. Thanks for your comments. -Combi - --~--~-~--~~~---~--~~ You received 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: Techniques for supplying information to GWT.create()
Ahh thanks... put my me too on that one... hope it happens! On Feb 27, 12:07 pm, Ian Petersen ispet...@gmail.com wrote: You might want to add a start tohttp://code.google.com/p/google-web-toolkit/issues/detail?id=1595 --~--~-~--~~~---~--~~ You received 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: Integrating GWT and Hibernate without Gilead?
Hello everyone, A reminder to be respectful, friendly and constructive when posting on the forums. All technical contributions are welcome and appreciated, however posts marking disrespect for other community members or inflammatory remarks will not be tolerated. That's not to say that it isn't okay to disagree on certain points, but this should be done on a factual and technical basis that allows the reader to learn along with the thread about why and how something could work or might require a different approach. Please, let's keep it friendly. -Sumit Chandel On Fri, Feb 27, 2009 at 6:28 AM, Rob Smith scubacarri...@gmail.com wrote: Bruno, Arthur likes to send his whole object model from the server to the client ;) Users should be careful taking advise from Arthur. He *loves* giving advise. The only problem is that they are terrible and on subjects that he has little or no knowledge. Make sure you take a second opinion before following Arthurs advise. Rob On Feb 27, 9:10 am, Arthur Kalmenson arthur.k...@gmail.com wrote: PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! How is it pain? It's one line of code: (SomeDomainObject) dozerMapper.map(retrievedFromHibernate, SomeDomainObject.class) -- Arthur Kalmenson On Fri, Feb 27, 2009 at 4:50 AM, noon bruno.marches...@gmail.com wrote: Hello, Just one question : if you app works with Gilead, why do you want to work without it ? Would you plan to work without Hibernate even if JDBC is faster ?? (ok, that's 2 questions ;-)...) Just to know... Regards Bruno PS : using Dozer for Hibernate and GWT is a pain. Really. That's just the first reason why I develop Hibernate4GWT (now Gilead) ! On 26 fév, 22:47, Arthur Kalmenson arthur.k...@gmail.com wrote: You don't necessarily have to use JSON, XML or DTOs. We reuse our Hibernate entities on the client side. However, you need to keep in mind that all types of collections (Lists, Maps, Sets, etc) are turned into a Hibernate specific Persistent* object when you get the object from the database. An easy way to remove these Hibernate specific classes is to use Dozer to map the domain object to itself. This recreates the object and copies all the collection elements to regular java.util classes. -- Arthur Kalmenson On Thu, Feb 26, 2009 at 7:33 AM, Felipe Cypriano fmcypri...@gmail.com wrote: Maybe what you're looking for is JSON, XML or DTO (Data Transfer Object). In those cases you will do the bridge between the hibernate model and the data sent to GWT client, not Gilead anymore. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Wed, Feb 25, 2009 at 2:27 PM, hezjing hezj...@gmail.com wrote: Hi I'm tried Gilead, and it works great when integrating GWT and Hibernate. I also read from the forum that we can integrate GWT and Hibernate without Gilead (and it is faster?). I'm wondering, how should we handle the lazy loading without using library like Gilead? I'm still googling for the example of GWT and Hibernate integration without Gilead :-( -- Hez- 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 -~--~~~~--~~--~--~---
Re: Dependency Injection: rocket-gwt Vs gwtoolbox
On 27 fév, 17:41, jesty davidece...@gmail.com wrote: I'm starting a new project based on GWT and I want dependency injection! I've seen this two framework, but I'm not sure about the best choose. Can you help me? What do you guide me to this choose? I'd go for GIN, which has little-to-no runtime overhead compared to manual DI thanks to using GWT's compile-time Generator support. http://code.google.com/p/google-gin/ But you might also want to look at Suco: http://code.google.com/p/suco/ It has a Guice-like API but does everything at run-time (contrary to GIN which tries to do everything at compile-time) rocket-gwt and gwtoolbox have the same compile-time approach as GIN but using a Spring-like XML-based configuration. Given that you get bean instances by name, I suspect it has a slight overhead over GIN. However, rocket-gwt supports AOP (interceptors/advices) which others don't, but again you'll pay it in the compiled code (GIN's plan is to inline aspects to reduce overhead, and that's probably why it's not implemented yet...) --~--~-~--~~~---~--~~ You received 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: Dependency Injection: rocket-gwt Vs gwtoolbox
I'm using Google GIN on our current project and it's working out _very_ well. It's really slick and worked out of the box (aside from some minor issues which are resolved quickly by the devs). -- Arthur Kalmenson On Fri, Feb 27, 2009 at 2:45 PM, Thomas Broyer t.bro...@gmail.com wrote: On 27 fév, 17:41, jesty davidece...@gmail.com wrote: I'm starting a new project based on GWT and I want dependency injection! I've seen this two framework, but I'm not sure about the best choose. Can you help me? What do you guide me to this choose? I'd go for GIN, which has little-to-no runtime overhead compared to manual DI thanks to using GWT's compile-time Generator support. http://code.google.com/p/google-gin/ But you might also want to look at Suco: http://code.google.com/p/suco/ It has a Guice-like API but does everything at run-time (contrary to GIN which tries to do everything at compile-time) rocket-gwt and gwtoolbox have the same compile-time approach as GIN but using a Spring-like XML-based configuration. Given that you get bean instances by name, I suspect it has a slight overhead over GIN. However, rocket-gwt supports AOP (interceptors/advices) which others don't, but again you'll pay it in the compiled code (GIN's plan is to inline aspects to reduce overhead, and that's probably why it's not implemented yet...) --~--~-~--~~~---~--~~ You received 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: Hibernate/JPA gwt 1.5
You can search around the forum, this topic has been discussed a number of times, you might find useful tips. -- Arthur Kalmenson On Fri, Feb 27, 2009 at 1:09 PM, Felipe Cypriano fmcypri...@gmail.com wrote: Hi Tonil, 1.) Can i really use Annotations with gwt 1.5 Yes we can haha. For example: For image bundles, replace @gwt.resource in your javadoc with the @Resource annotation. 2.) Do i have to go through the DTO approach to send my data to the gwt client? No other way? Take a look at Gilead project: http://noon.gilead.free.fr/gilead/ Gilead helps you pass your entities to the GWT client. Regards, --- Felipe Marin Cypriano Vitória - ES http://www.linkedin.com/in/felipecypriano On Fri, Feb 27, 2009 at 8:44 AM, tonil ntrep...@gmail.com wrote: Hi all, I'm very new to google web toolkit and i'm trying to get an overview how to build the web application using gwt 1.5. Most books i have for help are covering the gwt 1.4 version. One of the topics are the integration of hibernate/jpa. As I read now in the new version gwt 1.5 it's possible to use Annotations, but I also read a lot of user entries on some gwt pages, that this will not really help to send the data to the gwt client. So my questions are: 1.) Can i really use Annotations with gwt 1.5 2.) Do i have to go through the DTO approach to send my data to the gwt client? No other way? Thanks a lot in advance, tonil --~--~-~--~~~---~--~~ You received 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: Restrain the DialogBox to move out of browser window
Hi Danny, Here's one possible solution - you could override the DialogBox.onMouseUp() method to re-position the dialog box depending on where it was when the user lets go of it. For example: final DialogBox dialogBox = new DialogBox() { public void onMouseUp(Widget sender, int x, int y) { if(exceedsBounds(x,y) { this.setPopupPosition(xpos, ypos); //recenter to boundary edge or center page } super.onMouseUp(sender, x, y); } }; Hope that helps, -Sumit Chandel On Mon, Feb 23, 2009 at 6:04 AM, Danny Schimke schimk...@googlemail.comwrote: No idea? 2009/1/28 Danny Schimke schimk...@googlemail.com Hello! Is it possible to restrain the DialogBox to move out on right and bottom side of the browsers windows? When I move the box over it's header it should stay completely in the visible browser window area, because I disabled the scroll bars and the user should not be able to move the DialogBox in a not viewed area. And second: in IE6 the DialogBox is only dragable by the text in it's header. Is there a clean way to allow IE6 users to dragdrop the box like in FF or IE7 over the complete header? 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 -~--~~~~--~~--~--~---
Add DOM Object to an Event Handler
Hi, I am using a StringBuilder to dynamically generate a HTML Table for performance reasons (its much faster than using FlexTables). The problem is that the Table will contain input widgets and will require Event Handlers. i.e each table row will contain Input Text and on change of these each input text boxes it will update a corresponding Object. Does anyone know anyway how I can attached Dom elements that are created using the above way to Event Listeners created in GWT Java code? I dont want to have to add input onblur='event_handler(this)' / to my HTML. Thanks, Mat --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Dealing with session timeout and container managed security
Is there some consensus or best practice in the GWT community as for how to deal with session timeout and container managed security? There are some pointers if you search for this subject, but some of the ideas are wild... In my case I use the Servlet container's built in security features for authentication as described in the Servlet specification. Hence, in my web.xm I protect access to the GWT application like so: security-constraint web-resource-collection web-resource-namemy app/web-resource-name url-pattern/app/*/url-pattern http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/public/login.jsp/form-login-page form-error-page/public/login.jsp?retry=true/form-error-page /form-login-config /login-config security-role role-name*/role-name /security-role So, the application (host/bootstrap page, RPC Servlet, etc.) is in the app folder and the login form (login.jsp) is in the public folder. This works flawlessly except for the session timeout use case. The application sends an RPC request to /app/AppServlet, the Servlet container requires authentication because the session had timed out and dutifully *forwards* to the login page. Hence, the result of the request is not some RPC/JSON/XML object as expected by the client but the login page HTML structure. The client simply isn't prepared for that and freezes i.e. doesn't do anything. I believe that on the server side everything is set up correctly. If the session timed out the requests don't even reach the RPC Servlet because it's intercepted by the container, fine. But how do you deal with this in the client? Should one write some custom AsyncCallback class that handles the reponse sent by the container? Thanks for your feedback. Marcel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
[gwt-contrib] Compiling demos in incubator
Hi, I am trying to compile the demos which are included in incubator. I tried ant build.demos but this only builds the demos which are in src-demo/, not the ones in src/com/google/gwt/demos How can I compile them ? Thanks, Uwe --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Compiling demos in incubator
Uwe, If you change build.xml line 435 to use ${demo.src.dir} instead of src-demo then you can specify any demo to build using command line parameters: -Ddemo.src.dir=src -Ddemo.filter=**/GlassPanelDemo.gwt.xml Note that many of the src/com/google/gwt/demos modules are obsolete and at least one (CurrencyWidgetDemo) no longer compiles. - Isaac On Fri, Feb 27, 2009 at 8:35 AM, Uwe Maurer uwe.mau...@google.com wrote: Hi, I am trying to compile the demos which are included in incubator. I tried ant build.demos but this only builds the demos which are in src-demo/, not the ones in src/com/google/gwt/demos How can I compile them ? Thanks, Uwe --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Compiling demos in incubator
Thanks, I will try this. Uwe On Feb 27, 3:03 pm, Isaac Truett itru...@gmail.com wrote: Uwe, If you change build.xml line 435 to use ${demo.src.dir} instead of src-demo then you can specify any demo to build using command line parameters: -Ddemo.src.dir=src -Ddemo.filter=**/GlassPanelDemo.gwt.xml Note that many of the src/com/google/gwt/demos modules are obsolete and at least one (CurrencyWidgetDemo) no longer compiles. - Isaac On Fri, Feb 27, 2009 at 8:35 AM, Uwe Maurer uwe.mau...@google.com wrote: Hi, I am trying to compile the demos which are included in incubator. I tried ant build.demos but this only builds the demos which are in src-demo/, not the ones in src/com/google/gwt/demos How can I compile them ? Thanks, Uwe --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Code Review: Updated SliderBar to use the new event handling
Hi, I added methods to use the new event handling to the Slider Bar. Also I changed to order of the two public interfaces to make CheckStyle happy. Thanks, Uwe --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~--- Index: src/com/google/gwt/widgetideas/client/SliderBar.java === --- src/com/google/gwt/widgetideas/client/SliderBar.java(revision 1538) +++ src/com/google/gwt/widgetideas/client/SliderBar.java(working copy) @@ -16,6 +16,11 @@ package com.google.gwt.widgetideas.client; import com.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.KeyCodes; +import com.google.gwt.event.logical.shared.HasValueChangeHandlers; +import com.google.gwt.event.logical.shared.ValueChangeEvent; +import com.google.gwt.event.logical.shared.ValueChangeHandler; +import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; @@ -24,9 +29,9 @@ import com.google.gwt.user.client.ui.ChangeListener; import com.google.gwt.user.client.ui.ChangeListenerCollection; import com.google.gwt.user.client.ui.FocusPanel; +import com.google.gwt.user.client.ui.HasValue; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.ImageBundle; -import com.google.gwt.user.client.ui.KeyboardListener; import com.google.gwt.user.client.ui.SourcesChangeEvents; import java.util.ArrayList; @@ -62,8 +67,50 @@ * line }/li /ul */ public class SliderBar extends FocusPanel implements ResizableWidget, -SourcesChangeEvents { +SourcesChangeEvents, HasValueDouble, HasValueChangeHandlersDouble { /** + * A formatter used to format the labels displayed in the widget. + */ + public static interface LabelFormatter { +/** + * Generate the text to display in each label based on the label's value. + * + * Override this method to change the text displayed within the SliderBar. + * + * @param slider the Slider bar + * @param value the value the label displays + * @return the text to display for the label + */ +String formatLabel(SliderBar slider, double value); + } + + /** + * An {...@link ImageBundle} that provides images for {...@link SliderBar}. + */ + public static interface SliderBarImages extends ImageBundle { +/** + * An image used for the sliding knob. + * + * @return a prototype of this image + */ +AbstractImagePrototype slider(); + +/** + * An image used for the sliding knob. + * + * @return a prototype of this image + */ +AbstractImagePrototype sliderDisabled(); + +/** + * An image used for the sliding knob while sliding. + * + * @return a prototype of this image + */ +AbstractImagePrototype sliderSliding(); + } + + /** * The timer used to continue to shift the knob as the user holds down one of * the left/right arrow keys. Only IE auto-repeats, so we just keep catching * the events. @@ -130,48 +177,6 @@ } /** - * A formatter used to format the labels displayed in the widget. - */ - public static interface LabelFormatter { -/** - * Generate the text to display in each label based on the label's value. - * - * Override this method to change the text displayed within the SliderBar. - * - * @param slider the Slider bar - * @param value the value the label displays - * @return the text to display for the label - */ -String formatLabel(SliderBar slider, double value); - } - - /** - * An {...@link ImageBundle} that provides images for {...@link SliderBar}. - */ - public static interface SliderBarImages extends ImageBundle { -/** - * An image used for the sliding knob. - * - * @return a prototype of this image - */ -AbstractImagePrototype slider(); - -/** - * An image used for the sliding knob. - * - * @return a prototype of this image - */ -AbstractImagePrototype sliderDisabled(); - -/** - * An image used for the sliding knob while sliding. - * - * @return a prototype of this image - */ -AbstractImagePrototype sliderSliding(); - } - - /** * The change listeners. */ private ChangeListenerCollection changeListeners; @@ -329,7 +334,10 @@ * Add a change listener to this SliderBar. * * @param listener the listener to add + * + * @deprecated Please use addValueChangeHandler */ + @Deprecated public void addChangeListener(ChangeListener listener) { if (changeListeners == null) { changeListeners = new ChangeListenerCollection(); @@ -337,6 +345,11 @@ changeListeners.add(listener); } + @Override + public HandlerRegistration
[gwt-contrib] [google-web-toolkit commit] r4895 - wiki
Author: br...@google.com Date: Fri Feb 27 07:32:06 2009 New Revision: 4895 Modified: wiki/WebModeExceptions.wiki Log: Fixed typo Modified: wiki/WebModeExceptions.wiki == --- wiki/WebModeExceptions.wiki (original) +++ wiki/WebModeExceptions.wiki Fri Feb 27 07:32:06 2009 @@ -63,7 +63,7 @@ = Resymbolization = -Method names in deployed code will have been obfuscated and will not be particularly useful as encoded in the module permutations. To that end, a means for resymbolizing a stack trace have been implemented. +Method names in deployed code will have been obfuscated and will not be particularly useful as encoded in the module permutations. To that end, a means for resymbolizing a stack trace has been implemented. * The Linker artifact `CompilationResult` provides a method `getSymbolMap()` which returns a string mapping of JSNI identifiers for types, methods, and fields to their obfuscated identifiers. * A `symbolMaps` linker is added in `Core.gwt.xml` that emits the symbol map data as a series of files `permutationStrongName_symbolMap.properties`. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review: Updated SliderBar to use the new event handling
The changes look great. Thank you for doing this. Any chance you could you create a gen2 version of SliderBar and deprecate the widgetideas version instead on modifying the widgetideas version in place? We are slowly retiring the old widgetideas package in favor of the gen2 package hierarchy, so every time we would have to make a breaking API change to a widgetideas widget, we try to deprecate the old one and move the new one into a gen2 package instead. In this case, as the slider is a way to pick a value from a range, it would go into the gen2.picker.client package. Cheers, Emily On Fri, Feb 27, 2009 at 10:32 AM, Uwe Maurer uwe.mau...@google.com wrote: Hi, I added methods to use the new event handling to the Slider Bar. Also I changed to order of the two public interfaces to make CheckStyle happy. Thanks, Uwe -- There are only 10 types of people in the world: Those who understand binary, and those who don't --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4896 - in releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase: client/content/other...
Author: jlaba...@google.com Date: Fri Feb 27 08:09:14 2009 New Revision: 4896 Modified: releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/public/chrome/Showcase.css releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/public/chrome/Showcase_rtl.css releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/public/dark/Showcase.css releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/public/dark/Showcase_rtl.css releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/public/standard/Showcase.css releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/public/standard/Showcase_rtl.css Log: In Showcase, gave some buttons a fixed width so they would line up nicely. Patch by: jlabanca Review by: ecc Issue: 3396 Modified: releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java == --- releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java (original) +++ releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java Fri Feb 27 08:09:14 2009 @@ -257,6 +257,7 @@ // Add start button startButton = new Button(constants.cwAnimationStart()); +startButton.addStyleName(sc-FixedWidthButton); startButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { animation.run(2000); @@ -266,6 +267,7 @@ // Add cancel button cancelButton = new Button(constants.cwAnimationCancel()); +cancelButton.addStyleName(sc-FixedWidthButton); cancelButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { animation.cancel(); Modified: releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java == --- releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java (original) +++ releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwCookies.java Fri Feb 27 08:09:14 2009 @@ -130,6 +130,7 @@ // Display the existing cookies existingCookiesBox = new ListBox(); Button deleteCookieButton = new Button(constants.cwCookiesDeleteCookie()); +deleteCookieButton.addStyleName(sc-FixedWidthButton); mainLayout.setHTML(0, 0, b + constants.cwCookiesExistingLabel() + /b); mainLayout.setWidget(0, 1, existingCookiesBox); @@ -143,6 +144,7 @@ // Display the name of the cookie cookieValueBox = new TextBox(); Button setCookieButton = new Button(constants.cwCookiesSetCookie()); +setCookieButton.addStyleName(sc-FixedWidthButton); mainLayout.setHTML(2, 0, b + constants.cwCookiesValueLabel() + /b); mainLayout.setWidget(2, 1, cookieValueBox); mainLayout.setWidget(2, 2, setCookieButton); Modified: releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java == --- releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java (original) +++ releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwVerticalPanel.java Fri Feb 27 08:09:14 2009 @@ -83,7 +83,7 @@ // Add some content to the panel for (int i = 1; i 10; i++) { - vPanel.add(new Button(constants.cwVerticalPanelButton() + + i)); + vPanel.add(new Button(constants.cwVerticalPanelButton() + + i)); } // Return the content Modified: releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java == --- releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java (original) +++ releases/1.6/samples/showcase/src/com/google/gwt/sample/showcase/client/content/tables/CwFlexTable.java Fri Feb 27 08:09:14 2009 @@ -106,6 +106,7 @@ addRow(flexTable); } }); +addRowButton.addStyleName(sc-FixedWidthButton); Button removeRowButton = new Button(constants.cwFlexTableRemoveRow(), new
[gwt-contrib] Re: Make DateBox fire ValueChangeEvent more reliably.
Thanks for the fast turn around, committed as r4898 2009/2/27 jlaba...@google.com LGTM http://gwt-code-reviews.appspot.com/7804 -- There are only 10 types of people in the world: Those who understand binary, and those who don't --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4898 - in releases/1.6: reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum use...
Author: e...@google.com Date: Fri Feb 27 11:32:09 2009 New Revision: 4898 Added: releases/1.6/user/test/com/google/gwt/user/client/ui/WidgetTestBase.java Modified: releases/1.6/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForDateBox.java releases/1.6/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java releases/1.6/user/src/com/google/gwt/user/datepicker/client/DateBox.java releases/1.6/user/test/com/google/gwt/user/client/ui/DateBoxTest.java releases/1.6/user/test/com/google/gwt/user/client/ui/DateValueChangeTester.java Log: Fixes issue r3414 by making date box fire value change events reliably Review by:jlabanca Modified: releases/1.6/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForDateBox.java == --- releases/1.6/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForDateBox.java (original) +++ releases/1.6/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/VisualsForDateBox.java Fri Feb 27 11:32:09 2009 @@ -24,6 +24,7 @@ import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.museum.client.common.AbstractIssue; +import com.google.gwt.museum.client.common.EventReporter; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HorizontalPanel; @@ -176,6 +177,12 @@ + \ End: \ + (d2 == null ? null : f.format(d2)) + \); } })); + +EventReporterDate, DateBox reporter = new EventReporterDate, DateBox(); +start.addValueChangeHandler(reporter); +end.addValueChangeHandler(reporter); +reporter.report(Events are logged here); +v.add(reporter); return v; } Modified: releases/1.6/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java == --- releases/1.6/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java (original) +++ releases/1.6/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java Fri Feb 27 11:32:09 2009 @@ -117,6 +117,11 @@ public I getValue() { return value; } + + @Override + public String toDebugString() { +return super.toDebugString() + getValue(); + } @Override protected void dispatch(ValueChangeHandlerI handler) { Modified: releases/1.6/user/src/com/google/gwt/user/datepicker/client/DateBox.java == --- releases/1.6/user/src/com/google/gwt/user/datepicker/client/DateBox.java (original) +++ releases/1.6/user/src/com/google/gwt/user/datepicker/client/DateBox.java Fri Feb 27 11:32:09 2009 @@ -223,7 +223,7 @@ } public void onValueChange(ValueChangeEventDate event) { - setValue(event.getValue()); + setValue(parseDate(false), event.getValue(),true); hideDatePicker(); preventDatePickerPopup(); box.setFocus(true); @@ -432,16 +432,7 @@ } public void setValue(Date date, boolean fireEvents) { -Date oldDate = parseDate(false); -if (date != null) { - picker.setCurrentMonth(date); -} -picker.setValue(date, false); -setDate(date); - -if (fireEvents) { - DateChangeEvent.fireIfNotEqualDates(this, oldDate, date); -} +setValue(picker.getValue(), date, fireEvents); } /** @@ -473,19 +464,23 @@ }); } - /** - * Does the actual work of setting the date. Performs no validation, fires no - * events. - */ - private void setDate(Date value) { + private void setValue(Date oldDate, Date date, boolean fireEvents) { +if (date != null) { + picker.setCurrentMonth(date); +} +picker.setValue(date, false); format.reset(this, false); -box.setText(getFormat().format(this, value)); +box.setText(getFormat().format(this, date)); + +if (fireEvents) { + DateChangeEvent.fireIfNotEqualDates(this, oldDate, date); +} } private void updateDateFromTextBox() { Date parsedDate = parseDate(true); if (parsedDate != null) { - setValue(parsedDate); + setValue(picker.getValue(), parsedDate,true); } } } Modified: releases/1.6/user/test/com/google/gwt/user/client/ui/DateBoxTest.java == --- releases/1.6/user/test/com/google/gwt/user/client/ui/DateBoxTest.java (original) +++ releases/1.6/user/test/com/google/gwt/user/client/ui/DateBoxTest.java Fri Feb 27 11:32:09 2009 @@ -15,13 +15,14 @@ */ package com.google.gwt.user.client.ui; -import com.google.gwt.junit.client.GWTTestCase; +import com.google.gwt.dom.client.Document; +import
[gwt-contrib] [google-web-toolkit commit] r1248 - trunk/user/src/com/google/gwt/junit/server
Author: gwt.team.scottb Date: Tue Jul 17 16:53:40 2007 New Revision: 1248 Modified: trunk/user/src/com/google/gwt/junit/server/JUnitHostImpl.java Log: Must access fields at the actual declared class. Modified: trunk/user/src/com/google/gwt/junit/server/JUnitHostImpl.java == --- trunk/user/src/com/google/gwt/junit/server/JUnitHostImpl.java (original) +++ trunk/user/src/com/google/gwt/junit/server/JUnitHostImpl.java Tue Jul 17 16:53:40 2007 @@ -137,7 +137,7 @@ .getDeclaredConstructor(new Class[]{Throwable.class}); ctor.setAccessible(true); ex = (Throwable) ctor.newInstance(new Object[]{cause}); -setField(exClass, detailMessage, ex, ew.message); +setField(Throwable.class, detailMessage, ex, ew.message); } catch (Throwable e3) { // try ExType() try { @@ -145,7 +145,7 @@ ctor.setAccessible(true); ex = (Throwable) ctor.newInstance(null); ex.initCause(cause); - setField(exClass, detailMessage, ex, ew.message); + setField(Throwable.class, detailMessage, ex, ew.message); } catch (Throwable e4) { // we're out of options this.log(Failed to deserialize getException of type ' --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4897 - releases/1.6/user/src/com/google/gwt/user/tools
Author: jlaba...@google.com Date: Fri Feb 27 10:43:54 2009 New Revision: 4897 Modified: releases/1.6/user/src/com/google/gwt/user/tools/AppClassTemplate.javasrc releases/1.6/user/src/com/google/gwt/user/tools/AppCss.csssrc Log: Updated webAppCreator to include a much better error handling message when an RPC error occurs. Patch by: jlabanca Review by: bruce Issue: 3395 Modified: releases/1.6/user/src/com/google/gwt/user/tools/AppClassTemplate.javasrc == --- releases/1.6/user/src/com/google/gwt/user/tools/AppClassTemplate.javasrc (original) +++ releases/1.6/user/src/com/google/gwt/user/tools/AppClassTemplate.javasrc Fri Feb 27 10:43:54 2009 @@ -7,7 +7,6 @@ import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpHandler; -import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.DialogBox; @@ -21,6 +20,13 @@ * Entry point classes define codeonModuleLoad()/code. */ public class @moduleShortName implements EntryPoint { + /** + * The message displayed to the user when the server cannot be reached or + * returns an error. + */ + private static final String SERVER_ERROR = An error occurred while + + attempting to contact the server. Please check your network + + connection and try again.; /** * Create a remote service proxy to talk to the server-side Greeting service. @@ -103,11 +109,17 @@ serverResponseLabel.setText(); greetingService.greetServer(textToServer, new AsyncCallbackString() { public void onFailure(Throwable caught) { -Window.alert(Rpc failure); -sendButton.setEnabled(true); +// Show the RPC error message to the user +dialogBox.setText(Remote Procedure Call - Failure); +serverResponseLabel.addStyleName(serverResponseLabelError); +serverResponseLabel.setHTML(SERVER_ERROR); +dialogBox.center(); +closeButton.setFocus(true); } public void onSuccess(String result) { +dialogBox.setText(Remote Procedure Call); + serverResponseLabel.removeStyleName(serverResponseLabelError); serverResponseLabel.setHTML(result); dialogBox.center(); closeButton.setFocus(true); Modified: releases/1.6/user/src/com/google/gwt/user/tools/AppCss.csssrc == --- releases/1.6/user/src/com/google/gwt/user/tools/AppCss.csssrc (original) +++ releases/1.6/user/src/com/google/gwt/user/tools/AppCss.csssrc Fri Feb 27 10:43:54 2009 @@ -24,6 +24,10 @@ margin: 5px; } +.serverResponseLabelError { + color: red; +} + /** Set ids using widget.getElement().setId(idOfElement) */ #closeButton { margin: 15px 6px 6px; --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Filed against Issue 1518032 in bugganizer
Reviewers: ecc, Description: java.lang.IndexOutOfBoundsException: No child at index -1 when findDeepestOpenChild(FastTree.java:792) is called. Please review this at http://gwt-code-reviews.appspot.com/8803 Affected files: src/com/google/gwt/gen2/complexpanel/client/FastTree.java test/com/google/gwt/gen2/complexpanel/client/FastTreeTest.java Index: test/com/google/gwt/gen2/complexpanel/client/FastTreeTest.java === --- test/com/google/gwt/gen2/complexpanel/client/FastTreeTest.java (revision 1542) +++ test/com/google/gwt/gen2/complexpanel/client/FastTreeTest.java (working copy) @@ -271,6 +271,24 @@ assertTrue(item3.isSelected()); assertFalse(item1.isSelected()); } + + public void testFindDeepestOpenChild() { +FastTree tree = createBeforeSelectTestableTree(false); +FastTreeItem item = tree.getItem(0); +item.setState(true); +tree.setSelectedItem(item); +assertTrue(item.isOpen()); +assertEquals(2, item.getChildCount()); + +// no try something funky +item.removeItems(); + +try { + assertNotNull(tree.findDeepestOpenChild(item)); +} catch (IndexOutOfBoundsException iobe) { + fail(Out of bound exception thrown!); +} + } /** * helper method for testing beforeSelect event. Index: src/com/google/gwt/gen2/complexpanel/client/FastTree.java === --- src/com/google/gwt/gen2/complexpanel/client/FastTree.java (revision 1542) +++ src/com/google/gwt/gen2/complexpanel/client/FastTree.java (working copy) @@ -694,6 +694,14 @@ // Logical detach. childWidgets.remove(widget); } + + // @VisibleForTesting + FastTreeItem findDeepestOpenChild(FastTreeItem item) { +if (!item.isOpen() || item.getChildCount() == 0) { + return item; +} +return findDeepestOpenChild(item.getChild(item.getChildCount() - 1)); + } /** * Helper to build the root item. @@ -788,13 +796,6 @@ return; } - private FastTreeItem findDeepestOpenChild(FastTreeItem item) { -if (!item.isOpen()) { - return item; -} -return findDeepestOpenChild(item.getChild(item.getChildCount() - 1)); - } - private FastTreeItem findItemByChain(ArrayListElement chain, int index, FastTreeItem root) { if (index == chain.size()) { --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Filed against Issue 1518032 in bugganizer
LGTM http://gwt-code-reviews.appspot.com/8803 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4770 - releases/1.6/dev/core/test/com/google/gwt/dev
Author: sco...@google.com Date: Tue Feb 17 14:05:35 2009 New Revision: 4770 Modified: releases/1.6/dev/core/test/com/google/gwt/dev/ArgProcessorTestBase.java releases/1.6/dev/core/test/com/google/gwt/dev/CompilerTest.java releases/1.6/dev/core/test/com/google/gwt/dev/GWTCompilerTest.java releases/1.6/dev/core/test/com/google/gwt/dev/GWTShellTest.java releases/1.6/dev/core/test/com/google/gwt/dev/HostedModeTest.java Log: Added missing copyright. Modified: releases/1.6/dev/core/test/com/google/gwt/dev/ArgProcessorTestBase.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/ArgProcessorTestBase.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/ArgProcessorTestBase.java Tue Feb 17 14:05:35 2009 @@ -1,3 +1,18 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package com.google.gwt.dev; import com.google.gwt.util.tools.Utility; Modified: releases/1.6/dev/core/test/com/google/gwt/dev/CompilerTest.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/CompilerTest.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/CompilerTest.java Tue Feb 17 14:05:35 2009 @@ -1,3 +1,18 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package com.google.gwt.dev; import com.google.gwt.core.ext.TreeLogger; Modified: releases/1.6/dev/core/test/com/google/gwt/dev/GWTCompilerTest.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/GWTCompilerTest.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/GWTCompilerTest.java Tue Feb 17 14:05:35 2009 @@ -1,3 +1,18 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package com.google.gwt.dev; import com.google.gwt.core.ext.TreeLogger; Modified: releases/1.6/dev/core/test/com/google/gwt/dev/GWTShellTest.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/GWTShellTest.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/GWTShellTest.java Tue Feb 17 14:05:35 2009 @@ -1,3 +1,18 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package com.google.gwt.dev; import com.google.gwt.core.ext.TreeLogger; Modified: releases/1.6/dev/core/test/com/google/gwt/dev/HostedModeTest.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/HostedModeTest.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/HostedModeTest.java Tue Feb 17
[gwt-contrib] [google-web-toolkit commit] r4797 - in releases/1.6: dev/core/src/com/google/gwt/dev/shell distro-source/core/src
Author: br...@google.com Date: Thu Feb 19 14:43:57 2009 New Revision: 4797 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java releases/1.6/dev/core/src/com/google/gwt/dev/shell/PlatformSpecific.java releases/1.6/distro-source/core/src/index.html Log: General polish. 1) Modified BrowserDialog DialogBase to fix a long-standing aesthetic problem on the About dialog (the OK button used to look lopsided due to extra spaces); in the process, I dumbed-down the DialogBase, which was overgeneralized to work with an OK button, Cancel button, neither, either, or both. Now it always has one button, Close. 2) In PlatformSpecific, reduced the log level of the update notification from WARN to INFO. Finding out about a GWT upgrade is a happy event, and WARN log entries make people feel anxious. INFO is the default log level, so people will be just as likely to see it. jat did the design the review, in the sense that I said, Hey, John. Do you care if I do this? and he said, No, I don't. So I did. 3) Updated index.html to point to 1.6 doc links. Also, for the first time, I switched AJAX to the mixed-case Ajax so that our index.html will look a whole lot cooler. Review by: jgw (desk review) Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java Thu Feb 19 14:43:57 2009 @@ -41,7 +41,7 @@ private final TreeLogger logger; public BrowserDialog(Shell parent, TreeLogger logger, String html) { -super(parent, 550, 520, true, false); +super(parent, 550, 520); this.logger = logger; this.html = html; this.url = null; Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java Thu Feb 19 14:43:57 2009 @@ -37,31 +37,17 @@ private class Buttons extends GridPanel { public Buttons(Composite parent) { - super(parent, SWT.NONE, hasCancel ? 2 : 1, true); + super(parent, SWT.NONE, 1, true, 12, 6); - if (hasOk) { -okButton = new Button(this, SWT.PUSH); -setGridData(okButton, 1, 1, FILL, FILL, false, false); -okButton.setText(OK); -okButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { -clickOkButton(); - } -}); - } - - if (hasCancel) { -cancelButton = new Button(this, SWT.PUSH); -setGridData(cancelButton, 1, 1, FILL, FILL, false, false); -cancelButton.setText(Cancel); -cancelButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { -clickCancelButton(); - } -}); - } + okButton = new Button(this, SWT.PUSH); + setGridData(okButton, 1, 1, FILL, FILL, false, false); + okButton.setText(Close); + okButton.addSelectionListener(new SelectionAdapter() { +@Override +public void widgetSelected(SelectionEvent e) { + clickOkButton(); +} + }); shell.setDefaultButton(okButton); } @@ -75,10 +61,8 @@ Control contents = createContents(this); setGridData(contents, 1, 1, FILL, FILL, true, true); - if (hasOk || hasCancel) { -Buttons buttons = new Buttons(this); -setGridData(buttons, 1, 1, RIGHT, BOTTOM, false, false); - } + Buttons buttons = new Buttons(this); + setGridData(buttons, 1, 1, RIGHT, BOTTOM, false, false); } } @@ -93,14 +77,8 @@ return msgBox.open() == SWT.YES; } - private Button cancelButton; - private boolean cancelled = true; - private boolean hasCancel; - - private boolean hasOk; - private int minHeight; private int minWidth; @@ -110,16 +88,9 @@ private Shell shell; public DialogBase(Shell parent, int minWidth, int minHeight) { -this(parent, minWidth, minHeight, true, true); - } - - public DialogBase(Shell parent, int minWidth, int minHeight, - boolean hasOkButton, boolean hasCancelButton) { super(parent, SWT.NONE); this.minWidth = minWidth; this.minHeight = minHeight; -hasOk = hasOkButton; -hasCancel = hasCancelButton; } public Shell getShell() { Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/PlatformSpecific.java ==
[gwt-contrib] [google-web-toolkit commit] r4801 - in releases/1.6/dev/core: src/com/google/gwt/dev/javac test/com/google/gwt/dev/javac
Author: sco...@google.com Date: Thu Feb 19 19:01:19 2009 New Revision: 4801 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java releases/1.6/dev/core/test/com/google/gwt/dev/javac/JsniCheckerTest.java Log: Remove spurious warnings generated by referencing nullField and nullMethod. Modified: releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java Thu Feb 19 19:01:19 2009 @@ -156,7 +156,7 @@ if (!refErrors.isEmpty()) { errors.put(jsniRefString, refErrors); } - } else { + } else if (!jsniRef.className().equals(null)) { GWTProblem.recordInCud(ProblemSeverities.Warning, meth, cud, Referencing class ' + jsniRef.className() + : unable to resolve class, expect subsequent failures, Modified: releases/1.6/dev/core/test/com/google/gwt/dev/javac/JsniCheckerTest.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/javac/JsniCheckerTest.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/javac/JsniCheckerTest.java Thu Feb 19 19:01:19 2009 @@ -223,6 +223,28 @@ Referencing method 'Buggy.m': return type 'long' is not safe to access in JSNI code); } + public void testNullField() { +StringBuffer code = new StringBuffer(); +code.append(class Buggy {\n); +code.append( static native Object main() /*-{\n); +code.append(return @null::nullField;\n); +code.append( }-*/;\n); +code.append(}\n); + +shouldGenerateNoWarning(code); + } + + public void testNullMethod() { +StringBuffer code = new StringBuffer(); +code.append(class Buggy {\n); +code.append( static native Object main() /*-{\n); +code.append(return @null::nullMethod()();\n); +code.append( }-*/;\n); +code.append(}\n); + +shouldGenerateNoWarning(code); + } + public void testOverloadedMethodWithNoWarning() { StringBuffer code = new StringBuffer(); code.append(class Buggy {\n); @@ -378,6 +400,10 @@ private void shouldGenerateNoError(CharSequence code, CharSequence extraCode) { shouldGenerateError(code, extraCode, -1, null); + } + + private void shouldGenerateNoWarning(CharSequence code) { +shouldGenerateWarning(code, -1, null); } private void shouldGenerateWarning(CharSequence buggyCode, --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4796 - in releases/1.6/user: src/com/google/gwt/dom/client test/com/google/gwt/user/client/ui
Author: jlaba...@google.com Date: Thu Feb 19 08:18:41 2009 New Revision: 4796 Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozilla.java releases/1.6/user/test/com/google/gwt/user/client/ui/DOMRtlTest.java Log: Fixed DOMRtlTest.testGetAbsolutePositionWhenScrolled(). We now allow the return value of getAbsoluteLeft to be off by 1px, which is possible in FF2 if the element is in a scrollable div. Patch by: jlabanca Review by: ecc (desk) Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozilla.java == --- releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozilla.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozilla.java Thu Feb 19 08:18:41 2009 @@ -51,6 +51,8 @@ // here due to a change in getBoxObjectFor which causes inconsistencies // on whether the calculations are inside or outside of the element's // border. + // If the element is in a scrollable div, getBoxObjectFor(elem) can return + // a value that varies by 1 pixel. return $doc.getBoxObjectFor(elem).screenX - $doc.getBoxObjectFor($doc.documentElement).screenX; } Modified: releases/1.6/user/test/com/google/gwt/user/client/ui/DOMRtlTest.java == --- releases/1.6/user/test/com/google/gwt/user/client/ui/DOMRtlTest.java (original) +++ releases/1.6/user/test/com/google/gwt/user/client/ui/DOMRtlTest.java Thu Feb 19 08:18:41 2009 @@ -33,10 +33,8 @@ /** * Tests {...@link DOM#getAbsoluteLeft(Element)} for consistency when the element * contains children and has scrollbars. - * - * TODO(jlabanca): Activate this test (deactivated on 2/18/09) */ - public void disabledTestGetAbsolutePositionWhenScrolled() { + public void testGetAbsolutePositionWhenScrolled() { assertTrue(LocaleInfo.getCurrentLocale().isRTL()); final Element outer = DOM.createDiv(); final Element inner = DOM.createDiv(); @@ -45,7 +43,7 @@ outer.getStyle().setProperty(position, absolute); outer.getStyle().setProperty(overflow, auto); outer.getStyle().setPropertyPx(top, 0); -outer.getStyle().setPropertyPx(left, 0); +outer.getStyle().setPropertyPx(left, 100); outer.getStyle().setPropertyPx(width, 200); outer.getStyle().setPropertyPx(height, 200); RootPanel.getBodyElement().appendChild(outer); @@ -58,9 +56,11 @@ // Check the position when scrolled outer.setScrollLeft(50); -assertTrue(outer.getScrollLeft() 0); -assertEquals(-50, inner.getAbsoluteLeft() -- Document.get().getBodyOffsetLeft()); +assertEquals(outer.getScrollLeft(), 50); +int absLeft = inner.getAbsoluteLeft() - Document.get().getBodyOffsetLeft(); +// TODO (jlabanca): FF2 incorrectly reports the absolute left as 49. When +// we drop FF2 support, the only valid return value is 50. +assertTrue(50 == absLeft || 49 == absLeft); // Cleanup test RootPanel.getBodyElement().removeChild(outer); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4802 - in releases/1.6/dev/core: src/com/google/gwt/dev test/com/google/gwt/dev
Author: sco...@google.com Date: Thu Feb 19 19:04:33 2009 New Revision: 4802 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java releases/1.6/dev/core/test/com/google/gwt/dev/ServletValidatorTest.java Log: Removed deprecated api calls. Modified: releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java Thu Feb 19 19:04:33 2009 @@ -40,7 +40,7 @@ public static ServletValidator create(TreeLogger logger, File webXml) { try { - return create(logger, webXml.toURL()); + return create(logger, webXml.toURI().toURL()); } catch (MalformedURLException e) { logger.log(TreeLogger.WARN, Unable to process ' + webXml.getAbsolutePath() + ' for servlet validation, e); Modified: releases/1.6/dev/core/test/com/google/gwt/dev/ServletValidatorTest.java == --- releases/1.6/dev/core/test/com/google/gwt/dev/ServletValidatorTest.java (original) +++ releases/1.6/dev/core/test/com/google/gwt/dev/ServletValidatorTest.java Thu Feb 19 19:04:33 2009 @@ -68,7 +68,7 @@ public void testBadUrl() throws Exception { UnitTestTreeLogger.Builder builder = new UnitTestTreeLogger.Builder(); builder.setLowestLogLevel(TreeLogger.WARN); -URL url = new File(nonexistent.web.xml).toURL(); +URL url = new File(nonexistent.web.xml).toURI().toURL(); builder.expectWarn(Unable to process ' + url.toExternalForm() + ' for servlet validation, IOException.class); UnitTestTreeLogger logger = builder.createLogger(); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4805 - releases/1.6/dev/core/src/com/google/gwt/dev
Author: sco...@google.com Date: Thu Feb 19 21:08:56 2009 New Revision: 4805 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/LegacyCompilerOptions.java releases/1.6/dev/core/src/com/google/gwt/dev/Link.java Log: General polish: marking a couple of interfaces deprecated to avoid confusion. Modified: releases/1.6/dev/core/src/com/google/gwt/dev/LegacyCompilerOptions.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/LegacyCompilerOptions.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/LegacyCompilerOptions.java Thu Feb 19 21:08:56 2009 @@ -21,7 +21,7 @@ /** * The complete set of options for the GWT compiler. */ -public interface LegacyCompilerOptions extends PrecompileOptions, LegacyLinkOptions, -OptionLocalWorkers { +...@deprecated +public interface LegacyCompilerOptions extends PrecompileOptions, +LegacyLinkOptions, OptionLocalWorkers { } - \ No newline at end of file Modified: releases/1.6/dev/core/src/com/google/gwt/dev/Link.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/Link.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/Link.java Thu Feb 19 21:08:56 2009 @@ -44,6 +44,7 @@ /** * Options for Link. */ + @Deprecated public interface LegacyLinkOptions extends CompileTaskOptions, OptionOutDir { } --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4818 - in trunk: dev/oophm/overlay/com/google/gwt/dev/shell user/src/com/google/gwt/user/client/...
Author: sco...@google.com Date: Fri Feb 20 09:36:24 2009 New Revision: 4818 Modified: trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java trunk/user/src/com/google/gwt/user/client/ui/Button.java trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.java trunk/user/src/com/google/gwt/xhr/client/XMLHttpRequest.java trunk/user/super/com/google/gwt/emul/java/lang/Class.java trunk/user/test/com/google/gwt/http/HTTPSuite.java trunk/user/test/com/google/gwt/http/client/HTTPRequestTest.java trunk/user/test/com/google/gwt/http/server/RequestBuilderTestServlet.java Log: Checkstyle fixes. Review by: jat Modified: trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java == --- trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java (original) +++ trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java Fri Feb 20 09:36:24 2009 @@ -15,6 +15,10 @@ */ package com.google.gwt.dev.shell; +import com.google.gwt.core.ext.TreeLogger; +import com.google.gwt.core.ext.TreeLogger.HelpInfo; +import com.google.gwt.dev.shell.CheckForUpdates.UpdateResult; + import java.lang.reflect.Constructor; import java.net.URL; import java.util.concurrent.Callable; @@ -22,10 +26,6 @@ import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; - -import com.google.gwt.core.ext.TreeLogger; -import com.google.gwt.core.ext.TreeLogger.HelpInfo; -import com.google.gwt.dev.shell.CheckForUpdates.UpdateResult; /** * Performs platform-specific class selection. Modified: trunk/user/src/com/google/gwt/user/client/ui/Button.java == --- trunk/user/src/com/google/gwt/user/client/ui/Button.java(original) +++ trunk/user/src/com/google/gwt/user/client/ui/Button.javaFri Feb 20 09:36:24 2009 @@ -18,7 +18,6 @@ import com.google.gwt.dom.client.ButtonElement; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.ButtonElement; import com.google.gwt.event.dom.client.ClickHandler; /** Modified: trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.java == --- trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.java (original) +++ trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.javaFri Feb 20 09:36:24 2009 @@ -96,8 +96,8 @@ * * ul * liCENTER - Expand from the center of the popup/li - * liONE_WAY_CORNER - Expand from the top left corner, do not animate hiding - * /li + * liONE_WAY_CORNER - Expand from the top left corner, do not animate + * hiding /li * /ul */ static enum AnimationType { @@ -109,14 +109,14 @@ */ static class ResizeAnimation extends Animation { /** - * The offset height and width of the current {...@link PopupPanel}. + * The {...@link PopupPanel} being affected. */ -private int offsetHeight, offsetWidth = -1; +private PopupPanel curPanel = null; /** - * The {...@link PopupPanel} being affected. + * The offset height and width of the current {...@link PopupPanel}. */ -private PopupPanel curPanel = null; +private int offsetHeight, offsetWidth = -1; /** * A boolean indicating whether we are showing or hiding the popup. @@ -281,10 +281,10 @@ */ private AnimationType animType = AnimationType.CENTER; - private HandlerRegistration nativePreviewHandlerRegistration; - private boolean autoHide, previewAllNativeEvents, modal, showing; + private ListElement autoHidePartners; + // Used to track requested size across changing child widgets private String desiredHeight; @@ -292,16 +292,16 @@ private boolean isAnimationEnabled = false; - private ListElement autoHidePartners; + // the left style attribute in pixels + private int leftPosition = -1; + + private HandlerRegistration nativePreviewHandlerRegistration; /** * The {...@link ResizeAnimation} used to open and close the {...@link PopupPanel}s. */ private ResizeAnimation resizeAnimation = new ResizeAnimation(this); - // the left style attribute in pixels - private int leftPosition = -1; - // The top style attribute in pixels private int topPosition = -1; @@ -478,8 +478,8 @@ } /** - * Returns codetrue/code if the popup should be automatically hidden when - * the user clicks outside of it. + * Returns codetrue/code if the popup should be automatically hidden + * when the user clicks outside of it. * * @return true if autoHide is enabled, false if disabled */ @@ -585,14 +585,6 @@ return true; } - @Override - protected void onUnload() { -//
[gwt-contrib] [google-web-toolkit commit] r4820 - in trunk/user: src/com/google/gwt/user/client/ui test/com/google/gwt/user/client/ui
Author: j...@google.com Date: Fri Feb 20 11:26:27 2009 New Revision: 4820 Modified: trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java trunk/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java Log: Fixes CheckBox.replaceInputElement() to not reverse the order of the input label elements. This was causing RadioButtons to have their elements reversed when setName() was called. Patch by: jgw Review by: jlabanca (desk check) Modified: trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java == --- trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java (original) +++ trunk/user/src/com/google/gwt/user/client/ui/CheckBox.java Fri Feb 20 11:26:27 2009 @@ -387,8 +387,7 @@ // Clear out the old input element setEventListener(asOld(inputElem), null); -getElement().removeChild(inputElem); -getElement().insertBefore(newInputElem, null); +getElement().replaceChild(newInputElem, inputElem); // Sink events on the new element Event.sinkEvents(elem, Event.getEventsSunk(inputElem)); Modified: trunk/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java == --- trunk/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java (original) +++ trunk/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java Fri Feb 20 11:26:27 2009 @@ -110,4 +110,22 @@ assertFalse(r2.getValue()); assertTrue(r3.getValue()); } + + /** + * Ensures that the element order doesn't get reversed when the radio's + * name is changed. + */ + public void testOrderAfterSetName() { +RadioButton radio = new RadioButton(oldName); +assertEquals(oldName, radio.getName()); + +radio.setName(newName); +assertEquals(newName, radio.getName()); + +Element parent = radio.getElement(); +Element firstChild = parent.getFirstChildElement().cast(); +Element secondChild = firstChild.getNextSiblingElement().cast(); +assertEquals(input, firstChild.getTagName().toLowerCase()); +assertEquals(label, secondChild.getTagName().toLowerCase()); + } } --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4823 - in releases/1.6/dev/core/src/com/google/gwt/dev: . jdt jjs util
Author: sco...@google.com Date: Fri Feb 20 11:49:09 2009 New Revision: 4823 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/Precompile.java releases/1.6/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java releases/1.6/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java releases/1.6/dev/core/src/com/google/gwt/dev/util/Util.java Log: Fixes issue 3357; using -validateOnly with I18N caused spurious validation errors because we were trying to rebind every visible class. Review by: bruce (desk) Modified: releases/1.6/dev/core/src/com/google/gwt/dev/Precompile.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/Precompile.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/Precompile.javaFri Feb 20 11:49:09 2009 @@ -246,8 +246,8 @@ public boolean run(TreeLogger logger) throws UnableToCompleteException { FutureTaskUpdateResult updater = null; if (!options.isUpdateCheckDisabled()) { -updater = PlatformSpecific.checkForUpdatesInBackgroundThread(logger, -CheckForUpdates.ONE_DAY); +updater = PlatformSpecific.checkForUpdatesInBackgroundThread( +logger, CheckForUpdates.ONE_DAY); } boolean success = new Precompile(options).run(logger); if (success) { @@ -298,7 +298,8 @@ compilationState, rpo); PerfLogger.start(Precompile); UnifiedAst unifiedAst = JavaToJavaScriptCompiler.precompile(logger, - frontEnd, declEntryPts, jjsOptions, rpo.getPermuationCount() == 1); + frontEnd, declEntryPts, null, jjsOptions, + rpo.getPermuationCount() == 1); PerfLogger.end(); // Merge all identical permutations together. @@ -340,13 +341,14 @@ CompilationState compilationState = module.getCompilationState(logger); String[] declEntryPts = module.getEntryPointTypeNames(); + String[] additionalRootTypes = null; if (declEntryPts.length == 0) { -// Pretend that every single compilation unit is an entry point. +// No declared entry points, just validate all visible classes. SetCompilationUnit compilationUnits = compilationState.getCompilationUnits(); -declEntryPts = new String[compilationUnits.size()]; +additionalRootTypes = new String[compilationUnits.size()]; int i = 0; for (CompilationUnit unit : compilationUnits) { - declEntryPts[i++] = unit.getTypeName(); + additionalRootTypes[i++] = unit.getTypeName(); } } @@ -359,7 +361,7 @@ WebModeCompilerFrontEnd frontEnd = new WebModeCompilerFrontEnd( compilationState, rpo); JavaToJavaScriptCompiler.precompile(logger, frontEnd, declEntryPts, - jjsOptions, true); + additionalRootTypes, jjsOptions, true); return true; } catch (UnableToCompleteException e) { // Already logged. Modified: releases/1.6/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java Fri Feb 20 11:49:09 2009 @@ -23,7 +23,6 @@ import com.google.gwt.dev.jdt.FindDeferredBindingSitesVisitor.DeferredBindingSite; import com.google.gwt.dev.util.Empty; import com.google.gwt.dev.util.JsniRef; -import com.google.gwt.dev.util.Util; import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; @@ -31,6 +30,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; +import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -176,7 +176,7 @@ } dependentTypeNames.add(typeName); } -Util.addAll(dependentTypeNames, resultTypes); +Collections.addAll(dependentTypeNames, resultTypes); } catch (UnableToCompleteException e) { FindDeferredBindingSitesVisitor.reportRebindProblem(site, Failed to resolve ' + reqType + ' via deferred binding); Modified: releases/1.6/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java Fri Feb 20 11:49:09 2009 @@ -72,8 +72,8 @@ import com.google.gwt.dev.js.JsVerboseNamer; import com.google.gwt.dev.js.ast.JsProgram;
[gwt-contrib] [google-web-toolkit commit] r4824 - in trunk/dev/core: src/com/google/gwt/dev/cfg src/com/google/gwt/dev/resource/impl test/c...
Author: amitman...@google.com Date: Fri Feb 20 12:06:33 2009 New Revision: 4824 Added: trunk/dev/core/src/com/google/gwt/dev/resource/impl/DefaultFilters.java trunk/dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java Modified: trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java Log: This patch provides custom implementations for pattern matching of resources that are much faster than the ant implementations they replace, in the common cases. For uncommon cases, the implementations defer to Ant's pattern matching. Patch by: amitmanjhi Review by: jat (desk review) Modified: trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java == --- trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java(original) +++ trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.javaFri Feb 20 12:06:33 2009 @@ -26,16 +26,14 @@ import com.google.gwt.dev.javac.JavaSourceOracle; import com.google.gwt.dev.javac.impl.JavaSourceOracleImpl; import com.google.gwt.dev.resource.Resource; +import com.google.gwt.dev.resource.impl.DefaultFilters; import com.google.gwt.dev.resource.impl.PathPrefix; import com.google.gwt.dev.resource.impl.PathPrefixSet; -import com.google.gwt.dev.resource.impl.ResourceFilter; import com.google.gwt.dev.resource.impl.ResourceOracleImpl; import com.google.gwt.dev.util.Empty; import com.google.gwt.dev.util.PerfLogger; import com.google.gwt.dev.util.Util; -import org.apache.tools.ant.types.ZipScanner; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -54,11 +52,6 @@ * XML for unit tests. */ public class ModuleDef implements PublicOracle { - /** - * Default to recursive inclusion of java files if no explicit include - * directives are specified. - */ - private static final String[] DEFAULT_SOURCE_FILE_INCLUDES_LIST = new String[] {**/*.java}; private static final ComparatorMap.EntryString, ? REV_NAME_CMP = new ComparatorMap.EntryString, ?() { public int compare(Map.EntryString, ? entry1, Map.EntryString, ? entry2) { @@ -123,9 +116,11 @@ private PathPrefixSet sourcePrefixSet = new PathPrefixSet(); private final Styles styles = new Styles(); + private final DefaultFilters defaultFilters; public ModuleDef(String name) { this.name = name; +defaultFilters = new DefaultFilters(); } public synchronized void addEntryPointTypeName(String typeName) { @@ -155,15 +150,9 @@ if (lazyPublicOracle != null) { throw new IllegalStateException(Already normalized); } - -final ZipScanner scanner = getScanner(includeList, excludeList, -defaultExcludes, caseSensitive); - -publicPrefixSet.add(new PathPrefix(publicPackage, new ResourceFilter() { - public boolean allows(String path) { -return scanner.match(path); - } -}, true)); +publicPrefixSet.add(new PathPrefix(publicPackage, +defaultFilters.customResourceFilter(includeList, excludeList, +defaultExcludes, caseSensitive), true)); } public void addSourcePackage(String sourcePackage, String[] includeList, @@ -178,25 +167,9 @@ if (lazySourceOracle != null) { throw new IllegalStateException(Already normalized); } - -if (includeList.length == 0) { - /* - * If no includes list was provided then, use the default. - */ - includeList = DEFAULT_SOURCE_FILE_INCLUDES_LIST; -} - -final ZipScanner scanner = getScanner(includeList, excludeList, -defaultExcludes, caseSensitive); - -ResourceFilter sourceFileFilter = new ResourceFilter() { - public boolean allows(String path) { -return path.endsWith(.java) scanner.match(path); - } -}; - -PathPrefix pathPrefix = new PathPrefix(sourcePackage, sourceFileFilter, -isSuperSource); +PathPrefix pathPrefix = new PathPrefix(sourcePackage, +defaultFilters.customJavaFilter(includeList, excludeList, +defaultExcludes, caseSensitive), isSuperSource); sourcePrefixSet.add(pathPrefix); } @@ -466,29 +439,6 @@ lazyJavaSourceOracle = new JavaSourceOracleImpl(lazySourceOracle); PerfLogger.end(); - } - - private ZipScanner getScanner(String[] includeList, String[] excludeList, - boolean defaultExcludes, boolean caseSensitive) { -/* - * Hijack Ant's ZipScanner to handle inclusions/exclusions exactly as Ant - * does. We're only using its pattern-matching capabilities; the code path - * I'm using never tries to hit the filesystem in Ant 1.6.5. - */ -ZipScanner scanner = new ZipScanner(); -if (includeList.length 0) { - scanner.setIncludes(includeList); -} -if (excludeList.length 0) { - scanner.setExcludes(excludeList); -} -if (defaultExcludes) { - scanner.addDefaultExcludes(); -} -
[gwt-contrib] [google-web-toolkit commit] r4799 - in trunk: . user
Author: b...@google.com Date: Thu Feb 19 15:38:40 2009 New Revision: 4799 Modified: trunk/common.ant.xml trunk/user/build.xml Log: Allow test parallelization to be set externally. Patch by: bobv Review by: spoon (desk) Modified: trunk/common.ant.xml == --- trunk/common.ant.xml(original) +++ trunk/common.ant.xmlThu Feb 19 15:38:40 2009 @@ -37,6 +37,7 @@ property name=gwt.build.jni location=${gwt.build}/jni / property name=gwt.build.staging location=${gwt.build}/staging / property name=gwt.build.dist location=${gwt.build}/dist / + property name=gwt.threadsPerProcessor value=1 / property name=project.build location=${gwt.build.out}/${project.tail} / property name=project.lib location=${gwt.build.lib}/gwt-${ant.project.name}.jar / property name=project.jni location=${gwt.build}/${project.tail} / Modified: trunk/user/build.xml == --- trunk/user/build.xml(original) +++ trunk/user/build.xmlThu Feb 19 15:38:40 2009 @@ -157,7 +157,7 @@ is executing -- limit failonerror=true hours=2 -parallel threadsPerProcessor=1 +parallel threadsPerProcessor=${gwt.threadsPerProcessor} !-- selenium-test is a no-op unless gwt.selenium.hosts is defined -- antcall target=selenium-test/ !-- remoteweb-test is a no-op unless gwt.remote.browsers is defined -- --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4817 - trunk/user/src/com/google/gwt/core/client/impl
Author: b...@google.com Date: Fri Feb 20 04:53:55 2009 New Revision: 4817 Modified: trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java Log: Fix null derefenece in Mozilla browsers if we attempt to create a JavaScriptException after encountering a throw null; scenario. Patch by: bobv Review by: jgw (TBR) Modified: trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java == --- trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java (original) +++ trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java Fri Feb 20 04:53:55 2009 @@ -112,7 +112,7 @@ } protected native JsArrayString getStack(JavaScriptObject e) /*-{ - return !!e.stack ? e.stack.split('\n') : []; + return (e e.stack) ? e.stack.split('\n') : []; }-*/; protected int toSplice() { @@ -160,7 +160,7 @@ } private native JsArrayString getMessage(JavaScriptObject e) /*-{ - return !!e.message ? e.message.split('\n') : []; + return (e e.message) ? e.message.split('\n') : []; }-*/; private native void setLength(JsArrayString obj, int length) /*-{ --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4846 - releases/1.6/distro-source/core/src
Author: br...@google.com Date: Mon Feb 23 19:46:27 2009 New Revision: 4846 Modified: releases/1.6/distro-source/core/src/index.html Log: Fixed hyperlinks to samples in recognition of the new project directory structure. Modified: releases/1.6/distro-source/core/src/index.html == --- releases/1.6/distro-source/core/src/index.html (original) +++ releases/1.6/distro-source/core/src/index.html Mon Feb 23 19:46:27 2009 @@ -113,43 +113,43 @@ Their purpose is to demonstrate the mechanics of different techniques you can use when building applications with GWT. ul li -a href=samples/Hello/www/com.google.gwt.sample.hello.Hello/Hello.htmlHello World/a +a href=samples/Hello/war/Hello.htmlHello World/a div The simplest application you can write with GWT. /div /li li -a href=samples/Showcase/www/com.google.gwt.sample.showcase.Showcase/Showcase.htmlShowcase/a +a href=samples/Showcase/war/Showcase.htmlShowcase/a div Complex UI illustrating Widgets in action. /div /li li -a href=samples/DynaTable/www/com.google.gwt.sample.dynatable.DynaTable/DynaTable.htmlDynamic Table/a +a href=samples/DynaTable/war/DynaTable.htmlDynamic Table/a div How to take advantage of polymorphic RPC. /div /li li -a href=samples/Mail/www/com.google.gwt.sample.mail.Mail/Mail.htmlMail/a +a href=samples/Mail/war/Mail.htmlMail/a div Look and feel similar to a traditional desktop application. /div /li li -a href=samples/JSON/www/com.google.gwt.sample.json.JSON/JSON.htmlJSON/a +a href=samples/JSON/war/JSON.htmlJSON/a div Interoperation with a JSON service. /div /li li -a href=samples/I18N/www/com.google.gwt.sample.i18n.I18N/I18N.htmlI18N/a +a href=samples/I18N/war/I18N.htmlI18N/a div A glimpse at GWT's internationalization facilities. /div /li li - a href=samples/SimpleXML/www/com.google.gwt.sample.simplexml.SimpleXML/SimpleXML.htmlSimpleXML/a + a href=samples/SimpleXML/war/SimpleXML.htmlSimpleXML/a div Using GWT's XML parsing classes. /div --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4850 - releases/1.6/user/src/com/google/gwt/user/tools
Author: a...@google.com Date: Tue Feb 24 10:17:19 2009 New Revision: 4850 Modified: releases/1.6/user/src/com/google/gwt/user/tools/web.xmlsrc Log: Add a doctype to the template for our generated web.xml on new projects. review by: scottb Modified: releases/1.6/user/src/com/google/gwt/user/tools/web.xmlsrc == --- releases/1.6/user/src/com/google/gwt/user/tools/web.xmlsrc (original) +++ releases/1.6/user/src/com/google/gwt/user/tools/web.xmlsrc Tue Feb 24 10:17:19 2009 @@ -1,4 +1,8 @@ ?xml version=1.0 encoding=UTF-8? +!DOCTYPE web-app +PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN +http://java.sun.com/dtd/web-app_2_3.dtd; + web-app !-- Default page to serve -- --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4831 - in trunk/user: src/com/google/gwt/core/client/impl test/com/google/gwt/core/client/impl
Author: b...@google.com Date: Fri Feb 20 16:52:41 2009 New Revision: 4831 Modified: trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java trunk/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java Log: Fix test breaks on Linux hosted-mode browser running in web mode; sometimes a function's toString() will start with spaces. Patch by: bobv Review by: jgw (TBR) Modified: trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java == --- trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java (original) +++ trunk/user/src/com/google/gwt/core/client/impl/StackTraceCreator.java Fri Feb 20 16:52:41 2009 @@ -204,7 +204,7 @@ static String extractNameFromToString(String fnToString) { String toReturn = ; - +fnToString = fnToString.trim(); int index = fnToString.indexOf((); if (index != -1) { int start = fnToString.startsWith(function) ? 8 : 0; @@ -215,7 +215,7 @@ } private static native JsArrayString splice(JsArrayString arr, int length) /*-{ -arr.splice(0, length); +(arr.length = length) arr.splice(0, length); return arr; }-*/; } Modified: trunk/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java == --- trunk/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java (original) +++ trunk/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java Fri Feb 20 16:52:41 2009 @@ -18,8 +18,6 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.JavaScriptException; import com.google.gwt.core.client.JsArrayString; -import com.google.gwt.core.client.impl.StackTraceCreator.Collector; -import com.google.gwt.core.client.impl.StackTraceCreator.CollectorMoz; import com.google.gwt.junit.client.GWTTestCase; /** @@ -27,41 +25,33 @@ * static so that their names can be reliably determined in web mode. */ public class StackTraceCreatorTest extends GWTTestCase { - @Override - public String getModuleName() { -return com.google.gwt.core.Core; - } - public static void testJavaScriptException() { -StackTraceElement[] stack = null; +Throwable t = null; try { throwNative(); + fail(No exception thrown); } catch (JavaScriptException e) { /* * Some browsers may or may not be able to implement this at all, so we'll * at least make sure that an array is returned; */ - stack = e.getStackTrace(); + assertNotNull(e.getStackTrace()); + if (e.getStackTrace().length == 0) { +assertTrue(hosted mode, GWT.isScript()); +return; + } else { +t = e; + } } -assertNotNull(stack); String myName = null; if (!GWT.isScript()) { myName = testJavaScriptException; -} else if (GWT.Collector create(Collector.class) instanceof CollectorMoz) { - myName = throwNativeName(); +} else { + myName = testJavaScriptExceptionName(); } -if (myName != null) { - boolean found = false; - for (StackTraceElement elt : stack) { -if (elt.getMethodName().equals(myName)) { - found = true; - break; -} - } - assertTrue(Did not find + myName + in the stack + stack, found); -} +checkStack(myName, t); } /** @@ -79,36 +69,51 @@ } public static void testStackTraces() { -if (!GWT.isScript()) { - // StackTraceCreator.createStackTrace() is useless in hosted mode - return; -} - -// Since we're in web mode, we can find the name of this method's function -String myName = testStackTracesName(); - -StackTraceElement[] stack; +Throwable t; try { throw new RuntimeException(); -} catch (Throwable t) { - stack = t.getStackTrace(); +} catch (Throwable t2) { + t = t2; } -assertNotNull(stack); -assertTrue(stack.length 0); +String myName = null; +if (!GWT.isScript()) { + myName = testStackTraces; +} else { + myName = testStackTracesName(); +} + +checkStack(myName, t); + } + + private static void checkStack(String myName, Throwable t) { +assertNotNull(myName, myName); +assertNotNull(t, t); + +assertEquals(Needs a trim(), myName.trim(), myName); +assertFalse(function, myName.startsWith(function)); +assertFalse((, myName.contains(()); + +StackTraceElement[] stack = t.getStackTrace(); +assertNotNull(stack, stack); +assertTrue(stack.length, stack.length 0); boolean found = false; +StringBuilder observedStack = new StringBuilder(); for (int i = 0, j = stack.length; i j; i++) { StackTraceElement elt = stack[i]; String value = elt.getMethodName(); -
[gwt-contrib] [google-web-toolkit commit] r4830 - in trunk/dev/core: src/com/google/gwt/dev/resource/impl test/com/google/gwt/dev/resource/...
Author: amitman...@google.com Date: Fri Feb 20 15:14:45 2009 New Revision: 4830 Modified: trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java Log: This patch fixes the caching logic so that Gwt no longer re-reads and re-processes all jars on the classpath on every refresh. Patch by: amitmanjhi Review by: jat (desk review) Modified: trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java == --- trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java Fri Feb 20 15:14:45 2009 @@ -20,6 +20,7 @@ import java.io.File; import java.util.Enumeration; +import java.util.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; import java.util.Map; @@ -52,11 +53,21 @@ TreeLogger.DEBUG, $0); } + private static class ZipFileSnapshot { +private final int prefixSetSize; +private final MapAbstractResource, PathPrefix cachedAnswers; + +ZipFileSnapshot(int prefixSetSize, +MapAbstractResource, PathPrefix cachedAnswers) { + this.prefixSetSize = prefixSetSize; + this.cachedAnswers = cachedAnswers; +} + } + private SetZipFileResource allZipFileResources; - private MapAbstractResource, PathPrefix cachedAnswers; + private final MapPathPrefixSet, ZipFileSnapshot cachedSnapshots = new HashMapPathPrefixSet, ZipFileSnapshot( + 2); // currently gwt has just 2 ResourceOracles. private String cachedLocation; - private PathPrefixSet lastPrefixSet; - private int lastPrefixSetSize; private final ZipFile zipFile; public ZipFileClassPathEntry(ZipFile zipFile) { @@ -74,13 +85,13 @@ allZipFileResources = buildIndex(logger); } -if (cachedAnswers == null || lastPrefixSet != pathPrefixSet -|| lastPrefixSetSize != pathPrefixSet.getSize()) { - cachedAnswers = computeApplicableResources(logger, pathPrefixSet); - lastPrefixSet = pathPrefixSet; - lastPrefixSetSize = pathPrefixSet.getSize(); +ZipFileSnapshot snapshot = cachedSnapshots.get(pathPrefixSet); +if (snapshot == null || snapshot.prefixSetSize != pathPrefixSet.getSize()) { + snapshot = new ZipFileSnapshot(pathPrefixSet.getSize(), + computeApplicableResources(logger, pathPrefixSet)); + cachedSnapshots.put(pathPrefixSet, snapshot); } -return cachedAnswers; +return snapshot.cachedAnswers; } @Override Modified: trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java == --- trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java (original) +++ trunk/dev/core/test/com/google/gwt/dev/resource/impl/ResourceOracleImplTest.java Fri Feb 20 15:14:45 2009 @@ -15,6 +15,10 @@ */ package com.google.gwt.dev.resource.impl; +import com.google.gwt.core.ext.TreeLogger; +import com.google.gwt.dev.resource.Resource; +import com.google.gwt.util.tools.Utility; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -28,10 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Set; - -import com.google.gwt.core.ext.TreeLogger; -import com.google.gwt.dev.resource.Resource; -import com.google.gwt.util.tools.Utility; +import java.util.jar.JarFile; /** * Tests {...@link ResourceOracleImpl}. @@ -129,6 +130,37 @@ } return null; } + } + + public void testCachingOfJarResources() throws IOException, + URISyntaxException { +TreeLogger logger = createTestTreeLogger(); +ClassPathEntry cpe1jar = new ZipFileClassPathEntry(new JarFile( + findJarFile(com/google/gwt/dev/resource/impl/testdata/cpe1.jar))); + +// test basic caching +PathPrefixSet pps1 = new PathPrefixSet(); +pps1.add(new PathPrefix(com/google/gwt, null, false)); +MapAbstractResource, PathPrefix resourceMap1 = cpe1jar.findApplicableResources( +logger, pps1); +assertSame(resourceMap1, cpe1jar.findApplicableResources(logger, pps1)); + +// test that cache is invalidated if PathPrefixSet is modified. +pps1.add(new PathPrefix(com/google/gwt/user, null, false)); +MapAbstractResource, PathPrefix resourceMap2 = cpe1jar.findApplicableResources( +logger, pps1); +assertNotSame(resourceMap1, resourceMap2); + +PathPrefixSet pps2 = new PathPrefixSet(); +pps2.add(new PathPrefix(org/example/bar, null, false)); +MapAbstractResource, PathPrefix resourceMap3 = cpe1jar.findApplicableResources( +logger, pps2); +// check that the entry did go in the cache +assertSame(resourceMap3,
[gwt-contrib] [google-web-toolkit commit] r4851 - in trunk: . dev/core/src/com/google/gwt/core/ext dev/core/src/com/google/gwt/core/ext/soy...
Author: b...@google.com Date: Tue Feb 24 14:28:39 2009 New Revision: 4851 Removed: trunk/dev/core/super/com/google/gwt/core/client/SingleJsoImpl.java Modified: trunk/ (props changed) trunk/dev/core/src/com/google/gwt/core/ext/ServletContainer.java (props changed) trunk/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java (props changed) trunk/dev/core/src/com/google/gwt/core/ext/soyc/impl/SnippetIterator.java (props changed) trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java trunk/dev/core/src/com/google/gwt/dev/javac/JSORestrictionsChecker.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java (contents, props changed) trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/WriteJsoImpl.java trunk/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerDisableAggressiveOptimization.java (props changed) trunk/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerEnableAssertions.java (props changed) trunk/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerOutDir.java (props changed) trunk/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirOptional.java (props changed) trunk/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirRequired.java (props changed) trunk/dev/core/test/com/google/gwt/dev/javac/JSORestrictionsTest.java trunk/distro-source/core/src/doc/helpInfo/jsoRestrictions.html trunk/distro-source/linux/src/webAppCreator (props changed) trunk/distro-source/mac/src/webAppCreator (props changed) trunk/distro-source/windows/src/webAppCreator.cmd (props changed) trunk/eclipse/samples/Hello/Hello-gwtc.launch (props changed) trunk/samples/dynatable/war/DynaTable.css (props changed) trunk/samples/dynatable/war/DynaTable.html (props changed) trunk/samples/hello/war/Hello.html (props changed) trunk/samples/i18n/war/I18N.css (props changed) trunk/samples/i18n/war/I18N.html (props changed) trunk/samples/json/war/JSON.css (props changed) trunk/samples/json/war/JSON.html (props changed) trunk/samples/mail/war/Mail.css (props changed) trunk/samples/mail/war/Mail.html (props changed) trunk/samples/mail/war/gradient.gif (props changed) trunk/samples/mail/war/leftCorner.gif (props changed) trunk/samples/mail/war/rightCorner.gif (props changed) trunk/samples/showcase/war/Showcase.html (props changed) trunk/samples/simplerpc/war/SimpleRPC.css (props changed) trunk/samples/simplerpc/war/SimpleRPC.html (props changed) trunk/samples/simplexml/war/SimpleXML.css (props changed) trunk/samples/simplexml/war/SimpleXML.html (props changed) trunk/user/src/com/google/gwt/event/dom/client/HandlesAllFocusEvents.java (props changed) trunk/user/src/com/google/gwt/event/dom/client/HandlesAllKeyEvents.java (props changed) trunk/user/src/com/google/gwt/event/dom/client/HandlesAllMouseEvents.java (props changed) trunk/user/src/com/google/gwt/event/dom/client/KeyCodes.java (props changed) trunk/user/src/com/google/gwt/event/dom/client/PrivateMap.java (props changed) trunk/user/src/com/google/gwt/event/logical/shared/HasValueChangeHandlers.java (props changed) trunk/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java (props changed) trunk/user/src/com/google/gwt/event/logical/shared/ValueChangeHandler.java (props changed) trunk/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java (props changed) trunk/user/src/com/google/gwt/event/shared/GwtEvent.java (props changed) trunk/user/src/com/google/gwt/event/shared/HandlerRegistration.java (props changed) trunk/user/src/com/google/gwt/user/client/ui/ListenerWrapper.java (props changed) trunk/user/src/com/google/gwt/user/tools/WebAppCreator.java (props changed) trunk/user/test/com/google/gwt/dev/jjs/test/SingleJsoImplTest.java trunk/user/test/com/google/gwt/event/dom/client/DomEventTest.java (props changed) trunk/user/test/com/google/gwt/event/logical/shared/LogicalEventsTest.java (props changed) Log: Remove the need for an explicit SingleJsoImpl annotation. The single-JSO-ness of interfaces will be automatically calculated. Hosted-mode bug fixes for SingleJsoImpl. Patch by: bobv Review by: spoon Modified: trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java == --- trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java (original) +++
[gwt-contrib] [google-web-toolkit commit] r4853 - releases/1.6/user/src/com/google/gwt/user/client/ui
Author: e...@google.com Date: Tue Feb 24 15:08:45 2009 New Revision: 4853 Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.java Log: We deprecate ListBox's setMultipleSelect, fixing issue 249. Review by:rjrjr Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.java == --- releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.java (original) +++ releases/1.6/user/src/com/google/gwt/user/client/ui/ListBox.javaTue Feb 24 15:08:45 2009 @@ -312,7 +312,9 @@ * fail on Internet Explorer 6.0./em * * @param multiple codetrue/code to allow multiple selections + * @deprecated use {...@link #ListBox(boolean) instead */ + @Deprecated public void setMultipleSelect(boolean multiple) { // TODO: we can remove the above doc admonition once we address issue 1007 getSelectElement().setMultiple(multiple); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4870 - releases/1.6/user/src/com/google/gwt/dom/client
Author: j...@google.com Date: Wed Feb 25 12:30:46 2009 New Revision: 4870 Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java Log: Merging tr...@c4859 into 1.6 release branch. Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java == --- releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImplIE6.java Wed Feb 25 12:30:46 2009 @@ -232,6 +232,10 @@ */ @SuppressWarnings(unused) private native double getZoomMultiple() /*-{ -return $doc.body.parentElement.offsetWidth / $doc.body.offsetWidth; +if ($doc.compatMode == 'CSS1Compat') { + return 1; +} else { + return $doc.body.parentElement.offsetWidth / $doc.body.offsetWidth; +} }-*/; } --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4872 - releases/1.6
Author: j...@google.com Date: Wed Feb 25 12:34:28 2009 New Revision: 4872 Modified: releases/1.6/branch-info.txt Log: Updating branch-info.txt. Modified: releases/1.6/branch-info.txt == --- releases/1.6/branch-info.txt(original) +++ releases/1.6/branch-info.txtWed Feb 25 12:34:28 2009 @@ -7,6 +7,8 @@ Merges: /trunk revisions c3688,c3703,c3700,c3704,c3707,c3715,c3717,c3724,c3725 were merged (r3739) into this branch +/trunk revision c4859 was merged (r4870) into this branch +/trunk revision c4867 was merged (r4871) into this branch /releases/1.5/@r3630:3863 was merged (r3864) into this branch /releases/1.6/@r3739:3876 was merged (r3877) into trunk /releases/1.6/@r3878:3944 was merged (r3945) into trunk, skipping c3878 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4859 - trunk/user/src/com/google/gwt/dom/client
Author: jlaba...@google.com Date: Tue Feb 24 21:25:29 2009 New Revision: 4859 Modified: trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java Log: Fixed a bug in DOMImplIE.getAbsoluteLeft() where the wrong value can be returned in strict mode if the user sets a width on the body element. Patch by: jlabanca Review by: jgw Modified: trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java == --- trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.java(original) +++ trunk/user/src/com/google/gwt/dom/client/DOMImplIE6.javaTue Feb 24 21:25:29 2009 @@ -232,6 +232,10 @@ */ @SuppressWarnings(unused) private native double getZoomMultiple() /*-{ -return $doc.body.parentElement.offsetWidth / $doc.body.offsetWidth; +if ($doc.compatMode == 'CSS1Compat') { + return 1; +} else { + return $doc.body.parentElement.offsetWidth / $doc.body.offsetWidth; +} }-*/; } --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4867 - trunk/user/src/com/google/gwt/user/client/ui/impl
Author: j...@google.com Date: Wed Feb 25 09:37:22 2009 New Revision: 4867 Modified: trunk/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java Log: Disables the popup scrollbar hack for FF3 and later on Mac OS X, where it is no longer necessary. Patch by: jgw Review by: jlabanca (Desk check) Modified: trunk/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java == --- trunk/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java (original) +++ trunk/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java Wed Feb 25 09:37:22 2009 @@ -48,12 +48,26 @@ /** * Cache the value to avoid repeated calls. */ - private static boolean isMac = isMac(); + private static boolean isFF2Mac = isFF2Mac(); - private static native boolean isMac() /*-{ -if (navigator.userAgent.indexOf(Macintosh) != -1) { - return true; -} + private static native boolean isFF2Mac() /*-{ +function makeVersion(result) { + return (parseInt(result[1]) * 1000) + parseInt(result[2]); +} + +var ua = navigator.userAgent; +if (ua.indexOf(Macintosh) != -1) { + // Version logic taken from UserAgent.gwt.xml. + var result = /rv:([0-9]+)\.([0-9]+)/.exec(ua); + if (result result.length == 3) { +// Gecko 1.8 and earlier had the scrollbar bug on OS X. +// (Firefox3 == Gecko 1.9) +if (makeVersion(result) = 1008) { + return true; +} + } +} + return false; }-*/; @@ -61,7 +75,7 @@ public Element createElement() { final Element outerElem = DOM.createDiv(); -if (isMac) { +if (isFF2Mac) { // To solve the scrollbar rendering problem on the Mac, we have to make // the PopupPanel a 'heavyweight' element by setting a style of // 'overflow:auto' on the outermost div. This ensures that all of the @@ -95,12 +109,12 @@ @Override public Element getContainerElement(Element outerElem) { -return isMac ? DOM.getFirstChild(outerElem) : outerElem; +return isFF2Mac ? DOM.getFirstChild(outerElem) : outerElem; } @Override public Element getStyleElement(Element outerElem) { -return isMac ? outerElem : super.getStyleElement(outerElem); +return isFF2Mac ? outerElem : super.getStyleElement(outerElem); } @Override --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4871 - releases/1.6/user/src/com/google/gwt/user/client/ui/impl
Author: j...@google.com Date: Wed Feb 25 12:32:54 2009 New Revision: 4871 Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java Log: Merging tr...@c4867 into the 1.6 release branch. Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java == --- releases/1.6/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java (original) +++ releases/1.6/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java Wed Feb 25 12:32:54 2009 @@ -48,12 +48,26 @@ /** * Cache the value to avoid repeated calls. */ - private static boolean isMac = isMac(); + private static boolean isFF2Mac = isFF2Mac(); - private static native boolean isMac() /*-{ -if (navigator.userAgent.indexOf(Macintosh) != -1) { - return true; -} + private static native boolean isFF2Mac() /*-{ +function makeVersion(result) { + return (parseInt(result[1]) * 1000) + parseInt(result[2]); +} + +var ua = navigator.userAgent; +if (ua.indexOf(Macintosh) != -1) { + // Version logic taken from UserAgent.gwt.xml. + var result = /rv:([0-9]+)\.([0-9]+)/.exec(ua); + if (result result.length == 3) { +// Gecko 1.8 and earlier had the scrollbar bug on OS X. +// (Firefox3 == Gecko 1.9) +if (makeVersion(result) = 1008) { + return true; +} + } +} + return false; }-*/; @@ -61,7 +75,7 @@ public Element createElement() { final Element outerElem = DOM.createDiv(); -if (isMac) { +if (isFF2Mac) { // To solve the scrollbar rendering problem on the Mac, we have to make // the PopupPanel a 'heavyweight' element by setting a style of // 'overflow:auto' on the outermost div. This ensures that all of the @@ -95,12 +109,12 @@ @Override public Element getContainerElement(Element outerElem) { -return isMac ? DOM.getFirstChild(outerElem) : outerElem; +return isFF2Mac ? DOM.getFirstChild(outerElem) : outerElem; } @Override public Element getStyleElement(Element outerElem) { -return isMac ? outerElem : super.getStyleElement(outerElem); +return isFF2Mac ? outerElem : super.getStyleElement(outerElem); } @Override --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4866 - releases/1.6/dev/core/src/com/google/gwt/dev
Author: sco...@google.com Date: Wed Feb 25 08:58:45 2009 New Revision: 4866 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.java Log: Correct the help text for HostdMode -server argument. Modified: releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.javaWed Feb 25 08:58:45 2009 @@ -69,7 +69,7 @@ @Override public String getPurpose() { - return Prevents the embedded Tomcat server from running, even if a port is specified; + return Specify a different embedded web server to run (must implement ServletContainerLauncher); } @Override --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r4772 - in releases/1.6: dev/core/src/com/google/gwt/dev dev/core/src/com/google/gwt/dev/util dev...
Author: sco...@google.com Date: Tue Feb 17 16:26:01 2009 New Revision: 4772 Added: releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java (contents, props changed) releases/1.6/dev/core/test/com/google/gwt/dev/ServletValidatorTest.java (contents, props changed) releases/1.6/dev/core/test/com/google/gwt/dev/invalid.web.xml (contents, props changed) releases/1.6/dev/core/test/com/google/gwt/dev/valid.web.xml (contents, props changed) releases/1.6/distro-source/core/src/doc/helpInfo/servletMappings.html (contents, props changed) Modified: releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.java releases/1.6/dev/core/src/com/google/gwt/dev/util/UnitTestTreeLogger.java Log: Validate servlet tags in GWT modules against the actual web.xml being used. Review by: bruce (TBR) Modified: releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/HostedMode.javaTue Feb 17 16:26:01 2009 @@ -25,6 +25,7 @@ import com.google.gwt.dev.cfg.ModuleDef; import com.google.gwt.dev.shell.ArtifactAcceptor; import com.google.gwt.dev.shell.jetty.JettyLauncher; +import com.google.gwt.dev.util.InstalledHelpInfo; import com.google.gwt.dev.util.Util; import com.google.gwt.dev.util.arg.ArgHandlerExtraDir; import com.google.gwt.dev.util.arg.ArgHandlerLocalWorkers; @@ -337,20 +338,18 @@ } } +ServletValidator servletValidator = null; +File webXml = new File(options.getWarDir(), WEB-INF/web.xml); +if (webXml.exists()) { + servletValidator = ServletValidator.create(getTopLogger(), webXml); +} + for (String moduleName : options.getModuleNames()) { TreeLogger loadLogger = getTopLogger().branch(TreeLogger.DEBUG, - Bootstrap link for command-line module + moduleName); + Bootstrap link for command-line module ' + moduleName + '); try { ModuleDef module = loadModule(loadLogger, moduleName, false); - -// TODO: Validate servlet tags. -String[] servletPaths = module.getServletPaths(); -if (servletPaths.length 0) { - loadLogger.log(TreeLogger.WARN, - Ignoring legacy servlet tag(s) in module ' + moduleName - + '; add servlet tags to your web.xml instead); -} - +validateServletTags(loadLogger, servletValidator, module, webXml); link(loadLogger, module); } catch (UnableToCompleteException e) { // Already logged. @@ -488,5 +487,29 @@ newlyGeneratedArtifacts); linkerStack.produceOutputDirectory(linkLogger, artifacts, moduleOutDir, moduleExtraDir); + } + + private void validateServletTags(TreeLogger logger, + ServletValidator servletValidator, ModuleDef module, File webXml) { +TreeLogger servletLogger = logger.branch(TreeLogger.DEBUG, +Validating servlet tags for module ' + module.getName() + ', +null, new InstalledHelpInfo(servletMappings.html)); +String[] servletPaths = module.getServletPaths(); +if (servletValidator == null servletPaths.length 0) { + servletLogger.log( + TreeLogger.WARN, + Module declares + + servletPaths.length + + servlet declaration(s), but a valid 'web.xml' was not found at ' + + webXml.getAbsolutePath() + '); +} else { + for (String servletPath : servletPaths) { +String servletClass = module.findServletForPath(servletPath); +assert (servletClass != null); +// Prefix module name to convert module mapping to global mapping. +servletPath = / + module.getName() + servletPath; +servletValidator.validate(servletLogger, servletClass, servletPath); + } +} } } Added: releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java == --- (empty file) +++ releases/1.6/dev/core/src/com/google/gwt/dev/ServletValidator.java Tue Feb 17 16:26:01 2009 @@ -0,0 +1,176 @@ +/* + * Copyright 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the License); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.dev; + +import com.google.gwt.core.ext.TreeLogger; +import
[gwt-contrib] [google-web-toolkit commit] r4773 - releases/1.6/dev/core/src/com/google/gwt/dev/javac
Author: sco...@google.com Date: Tue Feb 17 16:44:29 2009 New Revision: 4773 Modified: releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java Log: Added a note regarding the unnecessary cast. Modified: releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java == --- releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/javac/JsniChecker.java Tue Feb 17 16:44:29 2009 @@ -209,6 +209,7 @@ ProblemReferenceBinding prb = (ProblemReferenceBinding) binding; if (prb.problemId() == ProblemReasons.NotVisible) { // It's just a visibility problem, so try drilling down manually + // UNNECESSARY CAST: javac is barfing without it for some reason. ReferenceBinding drilling = (ReferenceBinding) prb.closestMatch(); for (int i = prb.compoundName.length; i compoundName.length; i++) { drilling = drilling.getMemberType(compoundName[i]); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---