Dynamic Properties File Creation not effective
I am using GWT 1.6.4, with OS WinXP, Browser : IE6, IE7, FF I want to create dynamic properties file as per user requirement. On server side, I am creating a properties file in the Folder - \war\WEB-INF\classes\com\abcProject\client\abc.properties I have made entries in abc.GWT.xml file for languages. I am faced a problem when I created a property file in hosted mode, it created. Then i compile/browse and created a file in Browser it created. But when I change to that specific language, only language worked which i created it in hosted mode and I did compile/browse. and not while in web browser. I too tested it in Tomcat by deploying GWT application. and created a new language property file. I restarted the tomcat server. but there was no result of the new properties file. Only the properties file which was compiled/browse before was running. In short when GWT creates a new war file to deploy at server. And it should allow people directly add property file of different language or can change value in properties file and THAT SHOULD REFLECT ON THE SCREEN WHILE RUNING THE APPLICATION. One condition you can make is that no new keys can be added. but atleast one can change value for different languages and can add new properties files for different language and THERE SHOULD NOT BE ANY NEED TO COMPILE AND BROWSE THE WHOLE APPLICATION AGAIN. THIS IS WORST PRACTICE. Thanking you. I hope u understood the problem. --~--~-~--~~~---~--~~ You received 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 how set selected item by value
when i load data to form to edit, how i set selected item in listbox by value --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
getting the same error
I am getting the same error, is there a solution 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: getting the same error
Somehow the reference to the original post got lost strange: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/e39670388248ada8 On 20 Mai, 09:38, DanielK dkim...@googlemail.com wrote: I am getting the same error, is there a solution 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: Hosted mode servlets in GWT 1.6
Got it. But the bad part is that, if I specify the servlets in module.xml only, then the hosted mode gives me warning that they should be in web.xml. So it looks like I will have to have the servlets specified in both module.xml and web.xml, even though I do not need them when I ship my application. Is there any workaround? --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Help with storing into session and accessing the session value in a Panel
Hi, I am new to GWT.We have a requirement to hide a button based on the role of the user. We are able to get the correct data from the database based on SOP statements but invariably it is getting overwritten elsewhere. Is there a way where I can add this role that we get from the DB to add it into session and use that value to hide the button on the form? If so can you please let us know with a snippet.Another problem is how to access the session variable in our Panel in which this button is to be hidden. It is seemingly an extremely trivial requirement but we have spent quite sometime to understand how the existing application works but not able to make much headway. Would appreciate if some one from the community can help us out here. Regards, Chetan --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Compilation takes more than 1 hr
Hi, I am trying to compile my project in windows xp professional and it take around 15 min to compile, where as the same code when I try to compile on Solaris it takes around 100 min to compile the same exact code. Does any of you encountered this issue or any suggestion. Here is my build steps. target name=compile depends=init mkdir dir=${build.dir}/classes / echo message=${build.dir}/classes - classes directory / java classname=com.google.gwt.dev.GWTCompiler fork=true dir=$ {basedir} jvmarg value=-Xmx512M / classpath refid=classpath / arg line=-out ${build.dir}/classes / arg value=%* / arg value=${module} / /java javac destdir=${build.dir}/classes debug=true deprecation=on optimize=off failonerror=true src path=${src.dir} / classpath refid=classpath / /javac /target Thanks -MY --~--~-~--~~~---~--~~ You received 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: Hosted mode servlets in GWT 1.6
On 20 mai, 10:21, Ramanathan rama...@gmail.com wrote: Got it. But the bad part is that, if I specify the servlets in module.xml only, then the hosted mode gives me warning that they should be in web.xml. So it looks like I will have to have the servlets specified in both module.xml and web.xml, even though I do not need them when I ship my application. Is there any workaround? If you have servlets that's only used for unit tests, create a new module (myModuleTest.gwt.xml) that inherits your module to be tested (myModule.gwt.xml) and defines the servlets. This test module won't be passed to the hosted mode which would then not warn. Have a look at how RequestBuilder and FormPanel are being tested in GWT's own code for an example. --~--~-~--~~~---~--~~ You received 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: ListBox how set selected item by value
were you read my post? --~--~-~--~~~---~--~~ You received 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: Dynamic Properties File Creation not effective
I'm not sure if I understand you, do you want to create dynamically new files (property or any other) inside a deployed war? It's impossible, you don't know how the server manage the WAR files (usually it decompresses it in a temporal folder), you'll need to access to the deploy directory (using the deploy userpassword), you'll need to connect to the server (ej: weblogic) to force a redeploy in all the cluster nodes (with the administration userpassword), ... You can store the data in a database, you can configure a working directory from the filesystem (with write permission for the user that startup the app server) for your application and to store the files inside, ... On May 20, 8:49 am, Bhavik bhavik...@gmail.com wrote: I am using GWT 1.6.4, with OS WinXP, Browser : IE6, IE7, FF I want to create dynamic properties file as per user requirement. On server side, I am creating a properties file in the Folder - \war\WEB-INF\classes\com\abcProject\client\abc.properties I have made entries in abc.GWT.xml file for languages. I am faced a problem when I created a property file in hosted mode, it created. Then i compile/browse and created a file in Browser it created. But when I change to that specific language, only language worked which i created it in hosted mode and I did compile/browse. and not while in web browser. I too tested it in Tomcat by deploying GWT application. and created a new language property file. I restarted the tomcat server. but there was no result of the new properties file. Only the properties file which was compiled/browse before was running. In short when GWT creates a new war file to deploy at server. And it should allow people directly add property file of different language or can change value in properties file and THAT SHOULD REFLECT ON THE SCREEN WHILE RUNING THE APPLICATION. One condition you can make is that no new keys can be added. but atleast one can change value for different languages and can add new properties files for different language and THERE SHOULD NOT BE ANY NEED TO COMPILE AND BROWSE THE WHOLE APPLICATION AGAIN. THIS IS WORST PRACTICE. Thanking you. I hope u understood the problem. --~--~-~--~~~---~--~~ You received 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: reset a widget
Hi again, thanks for your fast reply. Your Tip was very useful, even though the mentionend method was not available for me as i didn't switch to 1.6 yet. Nonetheless, i understood the technique and implemented it with onTabSelected. Thanks a lot George On 14 Mai, 16:06, Salvador Diaz diaz.salva...@gmail.com wrote: How can this be achieved? Not difficult, just keep a reference to your widget somewhere, make it implement a reset() method and have a SelectionHandler call that method when the tab is selected. Here's an example of that exact same thing:http://code.google.com/p/hellagwt/source/browse/trunk/hellagwt/src/ma... Take a look at lines 69 - 87, that's the selection handler calling reset (or some equivalent method) on the widgets contained by the tabPanel Hope that helps, Salvador On 14 mai, 14:33, George georgios.stav...@gmail.com wrote: Hi, I have the following problem: I start a widget by clicking a tab on a tabpanel, i.e.: tabPan.add(new UserInfoWidget(), Settings); After some interaction with this widget (UserInfoWidget()), i switch to another tab. When I come back now to the Settings panel i want it to be resetted and not showing the state as i left it. How can this be achieved? Any help is appreciated. Thanks. George --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Any way to set tooltip text for a individual Grid cells?
Hi All, i just wanted to know anyway I can set tooltip text only to certain cells in a Grid?? I saw setTitle()..but thats for the entire Grid Any advise welcome Thanks Suren --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Inherit java.seurity and commons-codec-1.3.jar
Im using java.security and commons-codec-1.3 jar for passwprd hashing. but im unable to inherit those jars. I always get a compilation error that the required module is not inherited. How to inherit external jars even when they are included in ur lib folder and classpath. Or does gwt provides any alternative for these functionalities? Thnx in advance. Asif. --~--~-~--~~~---~--~~ You received 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: Exception Handling
Thnxfor the reply. what do u mean by specific? can u explain it a lil bit clearly please? what wrong im doing in the above code? Can u give me an working example please On May 12, 11:30 am, Paul Grenyer paul.gren...@gmail.com wrote: IIRC GWT doesn't like serializing Object. You need to use something more specific. Sent from my BlackBerry® wireless device -Original Message- From: abbu minhaj.mis...@gmail.com Date: Mon, 11 May 2009 23:06:20 To: Google Web ToolkitGoogle-Web-Toolkit@googlegroups.com Subject:ExceptionHandling Hi everybody, I have a customexceptionclass which extendsException. But im not able to use it in my entry point class. on the load itself its throwing an error saying sub types are not serializable which is not so. can anybody help me regarding this? This is my custom ApplicationException class: package com.cts.swiss.gwt.server.common.exception; public class ApplicationException extendsException{ private String errorMessage; private Throwable throwable; private Object[] messageParams; public ApplicationException(String errorMessage, Object[] params){ super(errorMessage); this.errorMessage=errorMessage; this.messageParams=params; } public ApplicationException(String errorMessage, Object[] params,Throwable throwable){ super(errorMessage,throwable); this.errorMessage=errorMessage; this.messageParams=params; this.throwable=throwable; } /** * @return the errorMessage */ public String getErrorMessage() { return errorMessage; } /** * @return the throwable */ public Throwable getThrowable() { return throwable; } /** * @return the messageParams */ public Object[] getMessageParams() { return messageParams; } }- 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 -~--~~~~--~~--~--~---
Imports in the Client Side
Hi all, I am developing a password hashing approach for my project. I first convert my password string into a MD5 String and and send it across to the server side where i compare it with the MD5 string saved in the database. I used a code for doing the string conversion to MD5 at client side but I am getting errors for the following import statements that I used. import java.io.FileInputStream; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; And the error was something like java.io.FileInputStream can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly. Please let me know if i am missing out something as I am not sure what i need to add in the .gwt.xml file for this. First of all, is it possible to put this code in the client side? --~--~-~--~~~---~--~~ You received 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: Design best practice
Oh forgot to mention something important... I have to be able to add/subtract dates aswell... Back to using Calendar object I guess? On 19 Maj, 20:29, Dalla dalla_man...@hotmail.com wrote: Thanks, that seems like a better solution :-) On 19 Maj, 17:26, Salvador Diaz diaz.salva...@gmail.com wrote: No, the right way to do this is with formatters: http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g... Hope that helps, Salvador On 19 mai, 17:10, Magius antonio.diaz@gmail.com wrote: You can (a) call to the server and receive a string formatted date or (b) build the string using Date.getDay( ), Date.getMonth( ), ... and an array with Sunday, Monday, ... On May 19, 4:57 pm, Dalla dalla_man...@hotmail.com wrote: I´m building an application where I need to print the day of the week and the current date, like so: Tuesday, 2009-05-19 This would be very easy using the Calender class. But since this isn´t part of the JRE emulation, I guess I have to solve it another way. What would be the best way to do this? I solved it by creating a simple Javabean: public class CustomDate implements IsSerializable { public CustomDate() { } private Date date; private String dayOfWeek; //Get / Set } which I populate with info from the Calendar class. Is this a godd way to solve the problem? How would you solve it? --~--~-~--~~~---~--~~ You received 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: Hosted mode servlets in GWT 1.6
Thanks a lot Thomas ! That worked. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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 Class.forName
Hi, I am tring to use Class.forName at cleint for object creation and getting the following exception. [ERROR] Line 196: The method forName(String) is undefined for the type Class [ERROR] Line 197: The method newInstance() is undefined for the type Class Can't we use it? Any possible way around? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Using Class.forName
hello,No you cannot use it, bc java reflection is not supported. The alternative is to use GWT.create(yourClass.class) and deffered binding. On Wed, May 20, 2009 at 2:27 PM, Pints rohitvad...@gmail.com wrote: Hi, I am tring to use Class.forName at cleint for object creation and getting the following exception. [ERROR] Line 196: The method forName(String) is undefined for the type Class [ERROR] Line 197: The method newInstance() is undefined for the type Class Can't we use it? Any possible way around? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can not debug in Eclipse
On May 19, 4:40 pm, Miguel Méndez mmen...@google.com wrote: Wow. That seems pretty strict. Seems like you should be able to get a waiver for that... otherwise it's a productivity killer. I'm not that familiar with the security app, but it usually asks if I want to allow app A to run app B (and even does that for eclipse originally), but there is something about the debugger for web apps that it is not even asking about it. Just denying the request. Since I can debug desktop apps, I have to assume it is related to how the debugger is being called for web apps (is this a GWT thing or is it the same for debugging straight JSP apps as well - I don't know). --~--~-~--~~~---~--~~ You received 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: Any way to set tooltip text for a individual Grid cells?
On 20 mai, 12:14, Suren nsurendi...@gmail.com wrote: Hi All, i just wanted to know anyway I can set tooltip text only to certain cells in a Grid?? I saw setTitle()..but thats for the entire Grid Any advise welcome Try this: grid.getCellFormatter().getElement(x, y).setTitle(title) but keep in mind that while most (if not all GWT-supported) browsers show title= as a tooltip on mouseover, you're not guaranteed that title == tooltip (and how about users not using a mouse?) --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Validation problem
Can anyone help me in writing a simple gwt class for validating the input. My requirement is that, I need to check that the input in the textbox is alphabetic, and if the input is anything other than alphabet it displays the error message. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: ListBox how set selected item by value
On 20 mai, 09:32, zeroonea zeroo...@gmail.com wrote: when i load data to form to edit, how i set selected item in listbox by value Loop over the items until you find the one you want to select, and set it selected (though depending on whether you have a multiple-selection- enabled ListBox or not, and/or whether you'd like to clear the current selection or add to it --in case ismultipleSelect() == true--, you'd use setItemSelected vs. setSelectedIndex). GWT could have provided a shortcut method (setSelectedValue or selectByValue) but it would do exactly this, as there's no other way of doing it at the JS-level (and it would probably result in less- optimized code, as developers would be using this shortcut method instead of trying to optimize their own algorithm a bit; denpending on their use case, multiple selection vs. single selection, replace selection vs. add to selection, etc.). --~--~-~--~~~---~--~~ You received 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: Imports in the Client Side
What are you using a FileInputStream and InputStream for on the client side? I don't think they would be valid for GWT client Side code. If you want input you either have to get it from one of your widgets (TextBox, TextArea..etc) or from the server via an RPC call or HTTP request. On May 20, 6:50 am, abhiram abhir...@gmail.com wrote: Hi all, I am developing a password hashing approach for my project. I first convert my password string into a MD5 String and and send it across to the server side where i compare it with the MD5 string saved in the database. I used a code for doing the string conversion to MD5 at client side but I am getting errors for the following import statements that I used. import java.io.FileInputStream; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; And the error was something like java.io.FileInputStream can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly. Please let me know if i am missing out something as I am not sure what i need to add in the .gwt.xml file for this. First of all, is it possible to put this code in the client side? --~--~-~--~~~---~--~~ You received 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: Can not debug in Eclipse
We extend the standard eclipse java launch configurations to add some program arguments. We don't do anything special. It should work just like debugging a desktop app in eclipse. The only think that I could think to try would be to use a regular java launch configurations and see if it has the same problem. The following link talks about how to do that, http://code.google.com/webtoolkit/doc/1.6/DevGuideCompilingAndDebugging.html#DevGuideHostedMode . On Wed, May 20, 2009 at 8:10 AM, sfeinst sfei...@gmail.com wrote: On May 19, 4:40 pm, Miguel Méndez mmen...@google.com wrote: Wow. That seems pretty strict. Seems like you should be able to get a waiver for that... otherwise it's a productivity killer. I'm not that familiar with the security app, but it usually asks if I want to allow app A to run app B (and even does that for eclipse originally), but there is something about the debugger for web apps that it is not even asking about it. Just denying the request. Since I can debug desktop apps, I have to assume it is related to how the debugger is being called for web apps (is this a GWT thing or is it the same for debugging straight JSP apps as well - I don't know). -- Miguel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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 -~--~~~~--~~--~--~---
Apache JNDI dbcp connection pool working w/ GWT 1.6 and Oracle
I hope i can save some people a little time... below is what is required to get Jetty and Apache JNDI dbcp connection pool working w/ GWT 1.6 and Oracle 1) these 2 jars are needed in the WEB-INF/lib directory, : jetty-plus-6.1.11.jar jetty-naming-6.1.11.jar 2) for the Apache dbcp connection pool these 2 files are needed in WEB- INF directory: commons-dbcp-1.2.jar commons-pool-1.2.jar 3) for oracle, add this to WEB-INF/lib directory, odbc14.jar 4)this Argjdbc/database/Arg :: has to match :: ^ DataSource lDataSource = (DataSource) lContext.lookup(jdbc/ database); ^^^ 5) no changes to the web.xml file... #common errors# if you copy the jetty-web.xml into the WEB-INF/ from http://humblecode.blogspot.com/2009/05/gwt-16-using-jndi-datasource.html be very carefule that of the double quotes, they are slanted double quotes which the sax parser does not like. ***errors ** if you get the below error, you do not have jetty-naming-6.1.11.jar on your classpath [WARN] Config error at New id=website class=org.mortbay.jetty.plus.naming.Resource java.lang.ClassNotFoundException: org.mortbay.jetty.plus.naming.Resource if you get the below error, you do not have jetty-plus-6.1.11.jar on your classpath [WARN] Config error at New id=website class=org.mortbay.jetty.plus.naming.ResourceArgjdbc/database/ ArgArg java.lang.ClassNotFoundException: org.mortbay.jetty.plus.naming.Resource ** here is my \WEB-INF\jetty-web.xml * ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext New id=website class=org.mortbay.jetty.plus.naming.Resource Argjdbc/database/Arg Arg New class=org.apache.commons.dbcp.BasicDataSource Set name=driverClassNameoracle.jdbc.OracleDriver/ Set Set name=urljdbc:oracle:thin:@192.142.49.8:1521:xe/Set Set name=usernameuser/Set Set name=passwordpass/Set /New /Arg /New /Configure these are specific to the drive used, if you have user instead of username Set name=driverClassNameoracle.jdbc.OracleDriver/ Set Set name=urljdbc:oracle:thin:@192.142.49.8:1521:xe/Set * Set name=useruser/Set * Set name=passwordpass/Set java.lang.NoSuchMethodException: class org.apache.commons.dbcp.BasicDataSource.setUser(class java.lang.String) JETTY docs http://docs.codehaus.org/display/JETTY/JNDI http://docs.codehaus.org/display/JETTY/DataSource+Examples --~--~-~--~~~---~--~~ You received 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 widget - HTML rendering
Alyxandor, thanks a lot! That was exactly that help I needed. The only problem now is that it perfectly works in Hosted mode and in Safary but totally fails in Firefox. Firebug sais: uncaught exception: [Exception... Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLTableElement.appendChild] nsresult: 0x80004003 (NS_ERROR_INVALID_POINTER) location: JS frame :: http://localhost:/package.Main/601C4746C2C9302863FEA163B011868C.cache.html :: C5c :: line 2696 data: no] and I have no idea what's the problem. Tried to google it but no results so far. May be you can advise me a direction? On May 20, 1:39 am, Alyxandor a.revolution.ultra.b...@gmail.com wrote: You can make your own widgets with custom html without wrappers, just be careful because event listening often relies on the proper html elements being present to operate properly {spans can be wonky when it comes to KeyListeners} The following code is for a simple widget that you can send arbitrary html or plain text and have it converted into a widget... It's got a little extra code in it, but that's code cloneNode is way faster than document.createElement()... public class xSimpleWidget extends Widget{ protected xSimpleWidget(){this(div/;} public xSimpleWidget(String xHtml){ setElement(xMakeHtml((xHtml.startsWith()?xHtml:div style='display:inherit;' +xHtml+ /div).replaceAll(\r|\n, br/))); } public xSimpleWidget(Element x){ setElement(x); } private static Element xBLANK_DIV= Document.get().createDivElement() ,xBLANK_X= xDiv() ; public static Element xDiv(){ return xBLANK_DIV.cloneNode(false).cast(); } public static Element xMakeHtml(String x){ xBLANK_X.setInnerHTML(x); if(xUserAgent.xStandards())//Non IE browsers don't have to forget their reference to the new child return xBLANK_X.getFirstChildElement(); Element xRet = xBLANK_X.getFirstChildElement();//Get the element created inside our div xBLANK_X=xDiv();//Reset the div so IE won't lose it's reference the next time the xBLANK_X is overwritten return xRet; } } Basically, a Widget, Panel or Composite needs setElement(e), setElement (e) and initWidget(w) {respectively} before you call getElement() or add(), and all gwt widgets already call these functions {can only be set once}. If you want widgets with element's of any dynamic type with including the proper GWT-wrapped widgets {they've got a widget for pretty much every element already}... If you can't find the GWT widgets, go to the DOM.createFormElement(), or whatever element you're interested in, right-click and select open call hierarchy to find out where GWT uses those calls... Should lead to better Widgets than my xSimpleWidget... CHEERS! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-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: ListBox how set selected item by value
Okay, i have many listbox in some module, so i decided write a method to do this loop, share it between several module, a problem is i put this method in a tool class, but gwt do not allow i import it into entry point class, so it must be in same package with entry point class, but i do not want put all entry point classes of other modules in a same package, so what i should do? --~--~-~--~~~---~--~~ You received 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 and Hibernate XML files vs Annotations
Hello everyone! I have the following problem and was hoping you guys could help me out. I have the need to implement a relation inheritance (table per subclass) so i searched the hibernate documentation. The thing is that i am using a project structure which i took from a tutorial i found, and i have the following configuration files: applicationContext.xml (Spring stuff i suppose) hibernate.cfg.xml (mappings) database.hbm.xml (hibernate query definitions) My question is where should the code to define complex relations should go, hibernate.cfg.xml or database.hbm.xml? Is it possible to take care of everything with annotations (eliminating the need to change xml files)? Thanks in advance y'all! PD: Thank you Eggsy for your tutorial on GWT, Hibernate ans Spring combined! very enlightning :) --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Failed to resolve 'client.DataService' via deferred binding
Hi, I am building applications using GWT 1.5.3 on JDK 1.5.0_09. While trying to build an application regarding GWT RPC, I got stucked with the following compilation error.. E:\GWT_WORKSPACE\HelloServletHelloServlet-compile * Compiling module HelloServlet Scanning for additional dependencies: file:/E:/GWT_WORKSPACE/ HelloServlet/src/client/HelloServlet.java Computing all possible rebind results for 'client.DataService' Rebinding client.DataService Invoking generate-with class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/ Generating client proxy for remote service interface 'client.DataService' Checking the synchronous interface 'client.DataService' against its asynchronous version 'client.DataServiceAsync' [ERROR] The asynchronous version of client.DataService has more methods than the synchronous version A valid definition for the asynchronous version of interface 'client.DataService' would be: [ERROR] package client; public interface DataServiceAsync { void reverseString(client.TestString stringToReverse, com.google.gwt.user.client.rpc.AsyncCallbackjava.lang.String arg2); } [ERROR] Errors in 'file:/E:/GWT_WORKSPACE/HelloServlet/src/client/ HelloServlet.java' [ERROR] Line 26: Failed to resolve 'client.DataService' via deferred binding [ERROR] Cannot proceed due to previous errors [ERROR] Build failed --- The source code follows -- DataService.java package client; import com.google.gwt.user.client.rpc.RemoteService; public interface DataService extends RemoteService { public String getData(); } DataServiceAsync.java - package client; import com.google.gwt.user.client.rpc.AsyncCallback; public interface DataServiceAsync extends AsyncCallback{ void getData(AsyncCallback callback); } DataServiceImpl .java -- package server; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import client.DataService; public class DataServiceImpl extends RemoteServiceServlet implements DataService{ public String getData(){ return (From Server: Your command is my wish); } } HelloServlet.java --- package com.prithvi.gwt.sample.hello.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; /** * HelloServlet application. */ public class HelloServlet implements EntryPoint { private static DataServiceAsync service = null; private Label label = new Label(Welcome, talk to server); public void onModuleLoad() { // execute the service getService().getData(new AsyncCallback() { public void onFailure(Throwable e) { label.setText(Server call failed); } public void onSuccess(Object obj) { if (obj != null) { label.setText(obj.toString()); } else { label.setText(Server call returned nothing); } } }); RootPanel content = RootPanel.get(content); content.add(label); } public static DataServiceAsync getService() { if (service == null) { / The following line of code cause ERROR **/ service = (DataServiceAsync) GWT.create(DataService.class); ((ServiceDefTarget) service).setServiceEntryPoint (GWT.getModuleBaseURL()+ /DataService); } return service; } } HelloServlet.gwt.xml - module inherits name=com.google.gwt.user.User/ entry-point class=com.prithvi.gwt.sample.hello.client.HelloServlet/ servlet path=/DataService class=com.prithvi.gwt.sample.hello.server.DataServiceImpl/ /module HelloServlet.html !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleHello Servlet/title script type=text/javascript language=javascript src=com.prithvi.gwt.sample.hello.HelloServlet.nocache.js/script /head body bgcolor=white h1Hello Servlet/h1 table align=center width=100% tr td id=content/td /tr /table /body /html HelloServlet-compile.cmd - @java -Xmx256M -cp %~dp0\src;%~dp0\bin;%E:/GoogleWidgetToolkit/gwt-
Re: GWT and Hibernate XML files vs Annotations
Hi If you find Hibernate is difficult to use, you may try Dreamsource ORM for your application. You can find an GWT example in http://www.gwtorm.com/mail/Mail.html. Is anyone else getting a little sick of this constant gratuitous on-list plugging? -- Thanks Paul Paul Grenyer e: paul.gren...@gmail.com w: http://www.marauder-consulting.co.uk b: paulgrenyer.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT Button does not work after asigning a stylename
I wrote the following code Button firstPB = new Button( msgs.srw_first(), this ); hPanel.add( firstPB ); This works fine and i have no problems. But after adding... Button firstPB = new Button( msgs.srw_first(), this ); hPanel.add( firstPB ); firstPB.setStyleName(PaginationButton-Passive); ...to the code the button has no longer any behavior and i cannot click it anymore. The style looks like this .PaginationButton-Passive { height:25px;background:url('graphics/ PaginationButton_Passive.png') repeat-x;border:#444 solid 1px;color:#444;} What am i doing wrong here? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
i cant run Web Application Project in eclipse
i want to create an application with gwt+eclipse+googleAppEngine i create new project with Web Application Project button in the toolbar whene i try to run or debug it i recive this messages Exception in thread main java.lang.UnsatisfiedLinkError: /media/sdb8/ Install/gwt-linux-1.6.4/libswt-pi-gtk-3235.so: /media/sdb8/Install/gwt- linux-1.6.4/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132) at org.eclipse.swt.internal.gtk.OS.clinit(OS.java:22) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54) at org.eclipse.swt.widgets.Display.clinit(Display.java:126) at com.google.gwt.dev.SwtHostedModeBase.clinit (SwtHostedModeBase.java:82) Could not find the main class: com.google.gwt.dev.HostedMode. Program will exit. --~--~-~--~~~---~--~~ You received 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.1 Released
Hi, SmartGWT 1.1 has been released. Here's the release announcement : http://www.jroller.com/sjivan/entry/smartgwt_out_of_beta_v1 Project Page : http://code.google.com/p/smartgwt/ Showcase Demo : http://www.smartclient.com/smartgwt/showcase/ The new samples can be found under the New Samples side nav item. This release has several bug fixes and features with over 100 new API's. Here are some of the important notes for this release : * Support for GWT-RPC DataSource with DataBoundComponents. * Formula and Summary fields: built-in wizards for end users to define formula fields that can compute values using other fields, or summary fields that can combine other fields with intervening / surrounding text. Available in all DataBoundComponents, easy to persist as preferences. * i18n support with resource bundles for 14 locales. * Significant improvements to javadocs with tons of documentation on various concepts. (~30MB on disk) * Automatic databound dragging behaviors : grids and trees will now inspect data relations declared in DataSources and automatically do the right thing for a databound drag. * API's to save and restore the display and selection state of various components to/from the server in a serializable format. * Performance improvements to various components and skins * Several new samples. The Adaptive Filter and Adaptive Sort samples are really neat, be sure to check them out. Feel free to provide any feedback or suggestions. 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: Links within widgets
On Wed, May 20, 2009 at 10:42, Alfred S freddi...@gmail.com wrote: I've been using GWT for some time now, so I know my way around. I did my homework, but for the life of me, I can't figure out how to open a link aside from having some sort of: new HTML(a href=.my link/a); Look at the Hyperlink, InlineHyperlink and Anchor classes. Anchor creates the a, and if you use setHref, creates the href attribute. This type is good for links outside of your application. Hyperlink and InlineHyperlink can be used to create links within the application, firing history events via History.newItem(), so you can create multiple bookmarkable states. --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Introducing Shandor Xul: Run you app as Gwt, Swing and SWT
For the past year Pentaho has been developing a Java Xul framework for writing apps that run in Swing, Swt and Gwt without code modification. It's been open source from the start (LGPLv2) but not advertised. We've recently moved the project out into BitBucket.org as Shandor Xul and are looking for contributors! About Shandor Xul: Shandor allows you to write applications in a UI agnostic framework built on the Mozilla XUL declarative mark-up syntax. Shandor is not code-gen! It's a runtime framework with agnostic interfaces that you code against. There's an live abstract DOM representing your application that you can interact with and bind your code to. Below are some of the Killer things Shandor can do for you: Built-in Binding Framework (including collections to UI) Includes and Overlays (overlays allow runtime changing of the UI, free plug-in framework!) IOC ready (Spring, Juice, etc.) Groovy event handler support. Built-in i18n Being able to change a UI without recompiling is fantastic for our users as well as our Graphic Designers. Not having to write and maintain the same code in 3 places... dead sexy. Shandor has been of great use to us and we hope that it can do the same for the larger java community. We're looking for anyone who would like to contribute to the project, from users to coders! The code, doc (some) and a sample application can be found here: http://bitbucket.org/codeoncoffee/shandor-xul/wiki/Home --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
move the row in flextable
Hi All, I am new to GWT. I am doing some project where i need to use flextable to store the data.Even i have requirement to edit,delete ,up and down the inserted row data.I am able to delete using a button which i have put on each row same like that i want to add another three button to edit ,up and down the row. Please help me Thanks in advance Sushil --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Links within widgets
I've been using GWT for some time now, so I know my way around. I did my homework, but for the life of me, I can't figure out how to open a link aside from having some sort of: new HTML(a href=.my link/a); Obviously, that works. But what do I put in a ChangeListener, for example? Sample: ListBox tableOfContents = new ListBox(); // ... fill list box ... tableOfContents.addChangeListener(new ChangeListener() { public void onChange(Widget sender) { // this will open a new window, which is *not* what I want Window.open(tableOfContents.getValue (tableOfContents.getSelectedIndex()), null, null); } }); Please help! I think javascript had something like: document.location='[url]'; Thanks, ~Alfred --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Events on non HTML DOM elements
[GWT 1.5] Hello! I'm using SVG tags to draw diagrams in my window. I use a JS library to manipulate the DOM and add my SVG elements. No problem with that, it works perfectly fine with Firefox3 and IE7 (still a big work in progress, so not tested in other browsers). So i get things like : svg circle cx=10 cy=20 r=10 stroke=black / circle cx=50 cy=50 r=10 stroke=black / path fill=none stroke=#00 d=M0.000 0.000 L100.000 100.000 / /svg Now, I want my diagrams to be interactive. I would like to use the GWT events model to get this done. So I create widgets to wrap this up. Like this == __ public class MySVGWidget extends Widget implements SourcesClickEvents{ protected MySVGWidget(){ //Let's say we create a circle/ node element with all attributes set up this.setElement(this.nativeCreateSVGElement()); } private static final native Element nativeCreateSVGElement() /*- { Some native code here } -*/ public void addClickListener(ClickListener listener) { if (this.clickListeners == null) this.clickListeners = new ClickListenerCollection(); this.clickListeners.add(listener); this.sinkEvents(Event.ONCLICK); this.sinkEvents(Event.ONDBLCLICK); } @Override public void onBrowserEvent(Event event) { switch (event.getTypeInt()) { case Event.ONCLICK: this.clickListeners.fireClick(this); break; } } } __ So in my main code, I use it like this == __ MySVGWidget w = new MySVGWidget(); w.addClickListener( new ClickListener() { public void onClick(Widget sender) { someInfoLabel.setText(A click was detected on a SVG element.); } }); __ ...and nothing happens. I dove deeper into the GWT code and found out (I may think) it was the way to build new widgets and handle events on them. But no event seems willing to be sunken into my SVG elements. Would it be a restriction of the GWT engine? Would it limit the sinking onto only pure HTML elements? However, in pure javascript code, I can easily set onclick property to, say, change the circle color. The event is correctly passed to the svg element, which reacts accordingly. So why does it not work through GWT? Thanks for reading, hope I'm clear enough. Cheers O. --~--~-~--~~~---~--~~ You received 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 and Hibernate XML files vs Annotations
Rafael, If you find Hibernate is difficult to use, you may try Dreamsource ORM for your application. You can find an GWT example in http://www.gwtorm.com/mail/Mail.html. Jim http://www.gwtorm.com for GWT ORM http://code.google.com/p/dreamsource-orm/ On May 20, 12:52 pm, Rafael boraf...@gmail.com wrote: Hello everyone! I have the following problem and was hoping you guys could help me out. I have the need to implement a relation inheritance (table per subclass) so i searched the hibernate documentation. The thing is that i am using a project structure which i took from a tutorial i found, and i have the following configuration files: applicationContext.xml (Spring stuff i suppose) hibernate.cfg.xml (mappings) database.hbm.xml (hibernate query definitions) My question is where should the code to define complex relations should go, hibernate.cfg.xml or database.hbm.xml? Is it possible to take care of everything with annotations (eliminating the need to change xml files)? Thanks in advance y'all! PD: Thank you Eggsy for your tutorial on GWT, Hibernate ans Spring combined! very enlightning :) --~--~-~--~~~---~--~~ You received 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 developer - Georgia Tech - Summer
The Cognitive Computing Lab (CCL), Georgia Tech is looking for a web developer with experience in Google Web Toolkit framework, to enhance a social interactive search and recommendation website. The work involves re-designing and extending pages and modular widgets and work with XMPP technologies for the website. Local developers (Atlanta based) preferred. Potential job opportunity with the VentureLab funded startup. Please send your resumes to sauravsa...@gmail.com (reply with the same subject) Saurav -- Go placidly amid the noise and haste, and remember what peace there may be in silence. As far as possible, without surrender, be on good terms with all persons. — Desiderata, MAX EHRMANN, 1927 --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Capture right-click / control-click events? (oncontextmenu and NativePreviewEvent)
I want my NativePreviewHandler to intercept oncontextmenu events. Is that possible? Details on what I'm doing: I've got a page with a bunch of hyperlinks on it. If the hyperlink is of a certain form (...author/AUTHOR_ID), then when the user shift- clicks on the link my NativePreviewHandler calls event.preventDefault () and pops up an editing dialog box instead of letting the browser do it's thing. I want to do something similar when the user control-clicks the links, but it looks like Event.ONCONTEXTMENU events are never passed to my NativePreviewHandler in hosted mode. In Firefox, they ARE passed, but I can't seem to prevent Firefox from popping up it's context menu. --~--~-~--~~~---~--~~ You received 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 and Hibernate XML files vs Annotations
Rafael, You could use annotations to describe the mappings but if not use the following. Since you are using Spring you can use their Hibernate support to look for mapping files in a particular directory. This way you don't have to call them out in the hibernate file. Lookup org.springframework.orm.hibernate3.LocalSessionFactoryBean. Here is an example: bean id=sessionFactory class=org.springframework.orm.hibernate3.LocalSessionFactoryBean property name=dataSource ref local=dataSource / /property property name=hibernateProperties props prop key=hibernate.cache.provider_class org.hibernate.cache.HashtableCacheProvider /prop prop key=hibernate.dialect org.hibernate.dialect.Oracle10gDialect /prop prop key=hibernate.show_sqlfalse/prop prop key=hibernate.format_sqlfalse/prop /props /property property name=mappingDirectoryLocations list value classpath*:/org/myexample/server/dao/hibernate /value /list /property /bean The mappingDirectoryLocations property tells spring to look for hbm.xml files in the org.myexample.server.dao.hibernate package. Then you need a *.hbm.xml for each table and the relationships are defined in those files. You also need a datasource described in your application context. Hope this helps. Gordon Pike http://devbright.com On May 20, 10:52 am, Rafael boraf...@gmail.com wrote: Hello everyone! I have the following problem and was hoping you guys could help me out. I have the need to implement a relation inheritance (table per subclass) so i searched the hibernate documentation. The thing is that i am using a project structure which i took from a tutorial i found, and i have the following configuration files: applicationContext.xml (Spring stuff i suppose) hibernate.cfg.xml (mappings) database.hbm.xml (hibernate query definitions) My question is where should the code to define complex relations should go, hibernate.cfg.xml or database.hbm.xml? Is it possible to take care of everything with annotations (eliminating the need to change xml files)? Thanks in advance y'all! PD: Thank you Eggsy for your tutorial on GWT, Hibernate ans Spring combined! very enlightning :) --~--~-~--~~~---~--~~ You received 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 and Hibernate XML files vs Annotations
Hi, Looks like the hibernate.cfg.xml file is the one used to define relationship (the good practice is to have a mapping file for each Domain class, such as User.hbm.xml, Message.hbm.xml, and so on). Of course, since GWT 1.5, you can define your mapping attributes using annotations (so you can use GWT-Validator on your domain classes for example). Hope this helps Bruno PS : I agree with you Paul. Jim, instead of spamming every Hibernate thread, maybe you could try to answer the Hibernate question, it would be helpful ;-) On 20 mai, 20:35, Paul Grenyer paul.gren...@gmail.com wrote: Hi If you find Hibernate is difficult to use, you may try Dreamsource ORM for your application. You can find an GWT example in http://www.gwtorm.com/mail/Mail.html. Is anyone else getting a little sick of this constant gratuitous on-list plugging? -- Thanks Paul Paul Grenyer e: paul.gren...@gmail.com w:http://www.marauder-consulting.co.uk b: paulgrenyer.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: i cant run Web Application Project in eclipse
Hey Taha, It sounds like the problem is that, while GWT comes with a 32-bit version of SWT, you're using a 64-bit JVM. If you switch to a 32-bit JVM, then you'll be set! (and in future versions of GWT, once we have the OOPHM feature, it won't be an issue) We should probably document this better for GWT. Hope this helps! On Wed, May 20, 2009 at 2:42 PM, taha taha...@gmail.com wrote: i want to create an application with gwt+eclipse+googleAppEngine i create new project with Web Application Project button in the toolbar whene i try to run or debug it i recive this messages Exception in thread main java.lang.UnsatisfiedLinkError: /media/sdb8/ Install/gwt-linux-1.6.4/libswt-pi-gtk-3235.so: /media/sdb8/Install/gwt- linux-1.6.4/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132) at org.eclipse.swt.internal.gtk.OS.clinit(OS.java:22) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54) at org.eclipse.swt.widgets.Display.clinit(Display.java:126) at com.google.gwt.dev.SwtHostedModeBase.clinit (SwtHostedModeBase.java:82) Could not find the main class: com.google.gwt.dev.HostedMode. Program will exit. -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ You received 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 best Practices - JS Library Wrappers Overlay Types
Thanks for the tips Eric. - I noticed that newInstance was used in Google Maps so i'm adopted the same convention. - I see what you mean about exception handling. I'll make use of your ExceptionHelper for Runnables. For the AsyncCallbacks, i'll try to mirror your ExceptionHelper implementation. - When generating the overloads i plug undefined in place of omitted optional parameters. Methods with only one parameter were causing the single undefined parameter you pointed out, this will be gone after polishing. I have another batch of questions/comments coming up - there's one class in GData, the base class for all service classes, which requires some thought since it has methods that may receive constructors (for example GetFeed, which receives the constructor of the feed to be returned). How this class is implemented has some implications on the classes that extend it. I'll have the auto-generated GWT library up sometime next week, this way i'll be able to link to the GWT and JS classes and hopefully get some more feedback on the implementation - not so much on the JSNI code but on the architecture/structure of the library. I'm also attempting to auto-generating base Unit tests for each class - most classes are data classes, so Unit tests are straightforward enough (e.g. call each setter, call the corresponding getter, check that the gotten value is the set value). The service classes themselves, which retrieve and update data in the various systems are more difficult, i don't have a plan for those, there will probably be some manual labor but it's not the end of the world if it comes to that. Bobby On May 18, 3:30 pm, Eric Ayers zun...@google.com wrote: Hi Bobby, Thanks for the update, here is some feedback inline. Sorry for the delay, I was out last week. On Mon, May 11, 2009 at 3:17 AM, Bobby bobbysoa...@gmail.com wrote: I'm very close, i've just compiled a GData JS example via the GData GWT library - which retrieves a Calendar feed - and it worked. Here are some of the implementation choices i've made so far: - map all namespaces to be under com.google.gwt.gdata.client.* - map all Object parameters to JavaScriptObject (some GData functions receive generic JS objects for initialization purposes). - implement JS classes as Overlay Types - implement class constants as JSNI methods, for example: public static native String REL_MESSAGE_TO() /*-{ return $wnd.google.gdata.Who.REL_MESSAGE_TO; }-*/; - implement constructors as JSNI methods (since i'm using Overlay Types), for example: public static native Who construct() /*-{ return new $wnd.google.gdata.Who(undefined); }-*/; In the gwt-google-apis, I have been naming these factory methods newInstance() or getInstance() for constructing singletons. This comes from convention in the JRE and Joshua Bloch's Effective Java. - generate overloads for methods that have optional parameters or multi-type parameters in JS, for example: public final native void setValueString(String valueString) /*- { this.setValueString(valueString); }-*/; public final native void setValueString() /*-{ this.setValueString (undefined); }-*/; - implement continuation callbacks (non success/failure) as Runnable, for example: public static final native boolean getInfo(Runnable callback) /*- { return $wnd.google.accounts.user.getInfo(function() { callba...@java.lang.runnable::run()(); }); }-*/; This is good, but in order to display exceptions in Hosted mode, a more complex pattern is needed. Essentially, you need to call a special handler for exceptions in hosted mode. A particularly nice implementation of this is the Handler class in gwt-visualization which uses the ExceptionHelper class in the ajaxloader package. http://code.google.com/p/gwt-google-apis/source/browse/releases/visua...http://code.google.com/p/gwt-google-apis/source/browse/releases/ajaxl... I usually pull the ajaxloader class into the other gwt-google-api projects using an svn:externals property if you haven't done that already. - implement success/failure callbacks as AsyncCallbackT, for example: public final native CalendarAclFeed getAclFeed(String uri, AsyncCallbackCalendarAclFeed callback) /*-{ return this.getAclFeed(uri, function(result) { @com.google.gwt.gdata.client.impl.Utils::handleSuccessCallback(Lcom/ google/gwt/user/client/rpc/AsyncCallback;Ljava/lang/Object;)(callback, result); }, function(error) { @com.google.gwt.gdata.client.impl.Utils::handleFailureCallback(Lcom/ google/gwt/user/client/rpc/AsyncCallback;Ljava/lang/String;)(callback, error); }); }-*/; Same comment here - if you don't add the UncaughtExceptionHandler stuff, hosted mode will miss exceptions that occur in the callback. - ignore all instance fields, since GData implements getters and setters. - use the existing AjaxLoader to loading the JS libraries. Pending testing. Adding overloads has been interesting,
How to gray out readonly text in a text box
If I don't explicitly set a style for a TextBox widget, it picks up the stylesheet .gwt-TextBox and .gwt-TextBox-readonly from the standard.css file. That's fine except that I want to customize it using the css file in the WEB-INF folder which is where I set all my custom styles (styles specific to a specif widget in a specific panel, etc). My understanding is that if I use the default style name, in this case the two mentioned above, in my local css file, I would override the default styles in standard.css. But that does not seem to be happening. Is there a special trick to it? Thanks, Rob --~--~-~--~~~---~--~~ You received 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] Not enough arguments (2) passed to external.gwtOnLoad(), expected (3); error
I was hitting the same error from the hosted mode in Eclipse once I added the gwt-ext library. Curiously, when I hit the 'Browse/Compile' button in the GWT plugin test environment, the code would actually recompile and run properly in a browser. So, if hosted mode gives you this error, it might be worthwhile to test the application directly in a browser. More discussion here: http://www.coderanch.com/t/446258/Application-Frameworks/Not-enough-arguments-passed-external#1985657 -Cameron McKenzie --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
New to GWT -- Having Eclipse PlugIn Installation Problems
Hello All: I am a new GWT user who is having problems with installation. I installed the Eclipse plugin by extracting the zip file (per the instructions in the FAQ). I restarted Eclipse and did a File-New Web Application Project and the New Web Application Project dialog appeared. I noticed that Use Google Web Toolkit was checked but Use default SDK (none) is greyed out. When I look in my dropins\eclipse \plugins directory, I have 4 jars: com.google.appengine.eclipse.core_1.0.1.v200905131143.jar com.google.gdt.eclipse.core_1.0.1.v200905131143.jar com.google.gdt.eclipse.suite_1.0.1.v200905131143.jar com.google.gwt.eclipse.core_1.0.1.v200905131143.jar It seems like I am missing some or all of the SDK. I looked at the documentation but perhaps I missed an instruction to install the SDK after extracting the plugin files. So my question is ... where should I download the SDK for use with the eclipse plugin? Does the location matter? Thanks, Jennifer --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Migration Instructions 1.5 to 1.6 rename-to
The page at http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html is somewhat unclear regarding rename-to: module rename-to='testapp' Which left me wondering: is the value arbitrary, and, how does it relate to any other settings or directories? (Since the file tree shown under that doesn't have a testapp directory, but does have TestApp). I followed the example, and made it the all-lowercase version of my project name, and noticed that it replaced the last part of the package structure (i.e., what had been an uppercase first letter was now a lowercase letter as in the rename-to value.) Doing this in Eclipse, I then had a testapp directory under war, but I assume that the graphic shown is prior to that occurring. But it might clarify what happens with the rename-to value to show that. --~--~-~--~~~---~--~~ You received 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 -~--~~~~--~~--~--~---
Right Click menu on an Image
Is there anyway to add a right click menu on an Image class? I want to use my own right click menu, not the browsers. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to gray out readonly text in a text box
On 05/20/2009 02:31 PM, Rob Tanner wrote: If I don't explicitly set a style for a TextBox widget, it picks up the stylesheet .gwt-TextBox and .gwt-TextBox-readonly from the standard.css file. That's fine except that I want to customize it using the css file in the WEB-INF folder which is where I set all my custom styles (styles specific to a specif widget in a specific panel, etc). My understanding is that if I use the default style name, in this case the two mentioned above, in my local css file, I would override the default styles in standard.css. But that does not seem to be happening. Is there a special trick to it? Do you call out the stylesheet in your *.gwt.xml file? E.g: !-- Specify the application specific style sheet. -- stylesheet src='equine.css' / If that's already there, are you sure the stylesheet's being loaded? Check your httpd server logs or use Firebug (or whatever tool IE has for debugging HTTP protocol) Thanks, Rob --~--~-~--~~~---~--~~ You received 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: Migration Instructions 1.5 to 1.6 rename-to
It doesn't appear after your creating static file structures. It appears after your running your application in hosted mode. Jim http://www.gwtorm.com - GWT ORM On May 20, 5:22 pm, Steve C st...@steveclaflin.com wrote: The page athttp://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html is somewhat unclear regarding rename-to: module rename-to='testapp' Which left me wondering: is the value arbitrary, and, how does it relate to any other settings or directories? (Since the file tree shown under that doesn't have a testapp directory, but does have TestApp). I followed the example, and made it the all-lowercase version of my project name, and noticed that it replaced the last part of the package structure (i.e., what had been an uppercase first letter was now a lowercase letter as in the rename-to value.) Doing this in Eclipse, I then had a testapp directory under war, but I assume that the graphic shown is prior to that occurring. But it might clarify what happens with the rename-to value to show that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Help with storing into session and accessing the session value in a Panel
Send the role information to your GWT client side application. On May 20, 1:38 am, Chetan chetan.minaj...@gmail.com wrote: Hi, I am new to GWT.We have a requirement to hide a button based on the role of the user. We are able to get the correct data from the database based on SOP statements but invariably it is getting overwritten elsewhere. Is there a way where I can add this role that we get from the DB to add it into session and use that value to hide the button on the form? If so can you please let us know with a snippet.Another problem is how to access the session variable in our Panel in which this button is to be hidden. It is seemingly an extremely trivial requirement but we have spent quite sometime to understand how the existing application works but not able to make much headway. Would appreciate if some one from the community can help us out here. Regards, Chetan --~--~-~--~~~---~--~~ You received 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 Upgradation error from 1.4 to 1.5/1.6
Incubator releases have breaking changes so you will have to adjust. Some of the classes get moved to the main GWT trunk. On Apr 23, 5:56 am, Satya Bobba nasbo...@yahoo.com wrote: Hi hazy, thanks, i tried with latest version of incubator, but i am getting different errors means some of the classes are not available in that new jar. we have used 1.4 incubator classes in our applications those classes are not avaliable in that new jar. so to avoid the compilation errors, i am keeping the 1.4 incubator jar with the latest version of GWT jars, then i am not getting any compilation errors in eclipse. But i am getting problem, while generating the script files by using the shells(compile, shell bat files). On Apr 23, 12:16 am,hazy1matt.egyh...@gmail.com wrote: Um, there is probably a new incubator release for 1.6. Might want to try it. On Apr 22, 11:40 am, Satya Bobba nasbo...@yahoo.com wrote: Hi, I am upgrading my existing code from GWT 1.4 to GWT 1.6.we have used the FastTree.java in our code. it is compiling fine with 1.4. I have kept the latest jar files(gwtuser, gwt windows, gwt servlet, and gwt-incubator_1-4_final.jar) in the path, but still it is throwing an error. I have used eclipse editor and also kept all jar file in the reference. i also tested with jdk 1.5 and jdk 1.6 , same problem i am getting. I am getting the below message eror message while trying to compile the code. [ERROR] Errors in 'jar:file:/C:/path/gwt-incubator_1-4_final.jar!/ com/google/gwt/widgetideas/client/FastTree.java' [ERROR] Internal compiler error java.lang.IncompatibleClassChangeError: Found class com.google.gwt.core.ext.TreeLogger, but interface was expected at com.google.gwt.libideas.resources.rebind.context.InlineResourceBundleGenerator.createResourceContext (Unknown Source) at com.google.gwt.libideas.resources.rebind.AbstractResourceBundleGenerator.generate (Unknown Source) at com.google.gwt.dev.cfg.RuleGenerateWith.realize (RuleGenerateWith.java:49) at com.google.gwt.dev.shell.StandardRebindOracle $Rebinder.tryRebind(StandardRebindOracle.java:113) at com.google.gwt.dev.shell.StandardRebindOracle $Rebinder.rebind(StandardRebindOracle.java:62) at com.google.gwt.dev.shell.StandardRebindOracle.rebind (StandardRebindOracle.java:172) at com.google.gwt.dev.shell.StandardRebindOracle.rebind (StandardRebindOracle.java:161) at com.google.gwt.dev.Precompile $DistillerRebindPermutationOracle.getAllPossibleRebindAnswers (Precompile.java:204) at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds (WebModeCompilerFrontEnd.java:128) at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.process (AbstractCompiler.java:151) at org.eclipse.jdt.internal.compiler.Compiler.compile (Compiler.java:444) at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile (AbstractCompiler.java:85) at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.compile (AbstractCompiler.java:181) at com.google.gwt.dev.jdt.AbstractCompiler$CompilerImpl.access $400(AbstractCompiler.java:71) at com.google.gwt.dev.jdt.AbstractCompiler.compile (AbstractCompiler.java:473) at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations (WebModeCompilerFrontEnd.java:73) at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile (JavaToJavaScriptCompiler.java:254) at com.google.gwt.dev.Precompile.precompile(Precompile.java: 300) at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:180) at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:150) at com.google.gwt.dev.GWTCompiler$1.run(GWTCompiler.java:119) at com.google.gwt.dev.CompileTaskRunner.doRun (CompileTaskRunner.java:84) at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger (CompileTaskRunner.java:78) at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:126) [ERROR] Unexpected java.lang.IncompatibleClassChangeError: Found class com.google.gwt.core.ext.TreeLogger, but interface was expected at com.google.gwt.libideas.resources.rebind.context.InlineResourceBundleGenerator.createResourceContext (Unknown Source) at com.google.gwt.libideas.resources.rebind.AbstractResourceBundleGenerator.generate (Unknown Source) at com.google.gwt.dev.cfg.RuleGenerateWith.realize (RuleGenerateWith.java:49) at com.google.gwt.dev.shell.StandardRebindOracle $Rebinder.tryRebind(StandardRebindOracle.java:113) at com.google.gwt.dev.shell.StandardRebindOracle $Rebinder.rebind(StandardRebindOracle.java:62) at
Re: Any way to set tooltip text for a individual Grid cells?
Hi, Thanks alot. It works. Yep, I checked the tooltip with mozilla and IE. Make sure with other browsers too. Our App. requires mouse anyway. But what you mentioned is a valid one to consider for only keyboard users as well. Thanks. Suren On May 20, 5:42 pm, Thomas Broyer t.bro...@gmail.com wrote: On 20 mai, 12:14, Suren nsurendi...@gmail.com wrote: Hi All, i just wanted to know anyway I can set tooltip text only to certain cells in a Grid?? I saw setTitle()..but thats for the entire Grid Any advise welcome Try this: grid.getCellFormatter().getElement(x, y).setTitle(title) but keep in mind that while most (if not all GWT-supported) browsers show title= as a tooltip on mouseover, you're not guaranteed that title == tooltip (and how about users not using a mouse?) --~--~-~--~~~---~--~~ You received 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 gray out readonly text in a text box
Anything you put to WEB-INF folder will not be served by the web server. That folder is for configuration files. Place css into root folder or any other folder. 2009/5/20, Rob Tanner caspersg...@gmail.com: If I don't explicitly set a style for a TextBox widget, it picks up the stylesheet .gwt-TextBox and .gwt-TextBox-readonly from the standard.css file. That's fine except that I want to customize it using the css file in the WEB-INF folder which is where I set all my custom styles (styles specific to a specif widget in a specific panel, etc). My understanding is that if I use the default style name, in this case the two mentioned above, in my local css file, I would override the default styles in standard.css. But that does not seem to be happening. Is there a special trick to it? Thanks, Rob --~--~-~--~~~---~--~~ You received 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 gray out readonly text in a text box
On May 20, 3:16 pm, Jeff Chimene jchim...@gmail.com wrote: On 05/20/2009 02:31 PM, Rob Tanner wrote: If I don't explicitly set a style for a TextBox widget, it picks up the stylesheet .gwt-TextBox and .gwt-TextBox-readonly from the standard.css file. That's fine except that I want to customize it using the css file in the WEB-INF folder which is where I set all my custom styles (styles specific to a specif widget in a specific panel, etc). My understanding is that if I use the default style name, in this case the two mentioned above, in my local css file, I would override the default styles in standard.css. But that does not seem to be happening. Is there a special trick to it? Do you call out the stylesheet in your *.gwt.xml file? E.g: !-- Specify the application specific style sheet. -- stylesheet src='equine.css' / If that's already there, are you sure the stylesheet's being loaded? Check your httpd server logs or use Firebug (or whatever tool IE has for debugging HTTP protocol) Thanks, Rob The css file is defined in the main html (actually jsp) file. A stupid spelling error on my part. It all works now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to gray out readonly text in a text box
I was looking the Eclipse layout and somehow just thought it was in WEB-INF. You know how that goes, you press send and then hit yourself in the forehead for being a dork. It's in the war folder at the same level as WEB-INF and the problem turned out to be a spelling error. Thanks, Rob On May 20, 10:02 pm, Peter Ondruška peter.ondru...@gmail.com wrote: Anything you put to WEB-INF folder will not be served by the web server. That folder is for configuration files. Place css into root folder or any other folder. 2009/5/20, Rob Tanner caspersg...@gmail.com: If I don't explicitly set a style for a TextBox widget, it picks up the stylesheet .gwt-TextBox and .gwt-TextBox-readonly from the standard.css file. That's fine except that I want to customize it using the css file in the WEB-INF folder which is where I set all my custom styles (styles specific to a specif widget in a specific panel, etc). My understanding is that if I use the default style name, in this case the two mentioned above, in my local css file, I would override the default styles in standard.css. But that does not seem to be happening. Is there a special trick to it? Thanks, Rob --~--~-~--~~~---~--~~ You received 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] [google-web-toolkit commit] r5437 - Addresses public issue 3566: Offer option to not decode cookies
Author: kpro...@google.com Date: Wed May 20 06:17:16 2009 New Revision: 5437 Modified: trunk/user/src/com/google/gwt/user/client/Cookies.java trunk/user/test/com/google/gwt/user/client/CookieTest.java Log: Addresses public issue 3566: Offer option to not decode cookies Addresses public issue 1574: RFE: Provide a Cookies.removeCookie(name, path) method Patch by: kprobst Review by: jat, jwg Modified: trunk/user/src/com/google/gwt/user/client/Cookies.java == --- trunk/user/src/com/google/gwt/user/client/Cookies.java (original) +++ trunk/user/src/com/google/gwt/user/client/Cookies.java Wed May 20 06:17:16 2009 @@ -40,10 +40,34 @@ static String rawCookies; /** + * Flag that indicates whether cookies should be URIencoded (when set) and + * URIdecoded (when retrieved). Defaults to URIencoding. + */ + private static boolean uriEncoding = true; + + /** + * Gets the URIencode flag + */ + public static boolean getUriEncode() { +return uriEncoding; + } + + /** + * Updates the URIencode flag and empties the cached cookies set + */ + public static void setUriEncode(boolean encode) { +if (encode != uriEncoding) { + uriEncoding = encode; + cachedCookies = null; +} + } + + /** * Gets the cookie associated with the given name. * * @param name the name of the cookie to be retrieved - * @return the cookie's value, or codenull/code if the cookie doesn't exist + * @return the cookie's value, or codenull/code if the cookie doesn't + * exist */ public static String getCookie(String name) { MapString, String cookiesMap = ensureCookies(); @@ -64,9 +88,40 @@ * * @param name the name of the cookie to be removed */ - public static native void removeCookie(String name) /*-{ -$doc.cookie = name + =;expires=Fri, 02-Jan-1970 00:00:00 GMT; - }-*/; + public static void removeCookie(String name) { +if (uriEncoding) { + uriEncode(name); +} +removeCookieNative(name); + } + + /** + * Native method to remove a cookie + */ + private static native void removeCookieNative(String name) /*-{ +$doc.cookie = name + =;expires=Fri, 02-Jan-1970 00:00:00 GMT; + }-*/; + + /** + * Removes the cookie associated with the given name. + * + * @param name the name of the cookie to be removed + * @param path the path to be associated with this cookie (which should match + * the path given in {...@link #setCookie}) + */ + public static void removeCookie(String name, String path) { +if (uriEncoding) { + uriEncode(name); +} +removeCookieNative(name, path); + } + + /** + * Native method to remove a cookie with a path + */ + public static native void removeCookieNative(String name, String path) /*-{ + $doc.cookie = name + =;path= + path + ;expires=Fri, 02-Jan-1970 00:00:00 GMT; + }-*/; /** * Sets a cookie. The cookie will expire when the current browser session is @@ -76,7 +131,7 @@ * @param value the cookie's value */ public static void setCookie(String name, String value) { -setCookieImpl(name, value, 0, null, null, false); +setCookie(name, value, null, null, null, false); } /** @@ -91,49 +146,97 @@ } /** - * Sets a cookie. + * Sets a cookie. If uriEncoding is false, it checks the validity of name and + * value. Name: Must conform to RFC 2965. Not allowed: = , ; white space. Also + * can't begin with $. Value: No = or ; * * @param name the cookie's name * @param value the cookie's value * @param expires when the cookie expires * @param domain the domain to be associated with this cookie * @param path the path to be associated with this cookie - * @param secure codetrue/code to make this a secure cookie (that is, - * only accessible over an SSL connection) + * @param secure codetrue/code to make this a secure cookie (that is, only + * accessible over an SSL connection) */ public static void setCookie(String name, String value, Date expires, String domain, String path, boolean secure) { -setCookieImpl(name, value, (expires == null) ? 0 : expires.getTime(), domain, path, secure); +if (uriEncoding) { + uriEncode(name); + uriEncode(value); +} else if (!isValidCookieName(name) || !isValidCookieValue(value)) { + throw new IllegalArgumentException(Illegal cookie format.); +} +setCookieImpl(name, value, (expires == null) ? 0 : expires.getTime(), +domain, path, secure); + } + + /* + * Checks whether a cookie name is valid: can't contain =;, or whitespace. + * Can't begin with $. + * + * @param name the cookie's name + */ + private static boolean isValidCookieName(String name) { +if (uriEncoding) { + // check not necessary + return true; +} else if
[gwt-contrib] Re: Small clean-up in SOYC dashboard
LGTM. There was earlier a reason for some to be non-static, then that got removed through the review process, and then I forgot to make them consistent again. http://gwt-code-reviews.appspot.com/34813 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5438 - MakeTopLevelHtmlForPerm had some inconsistencies in which methods were static and which w...
Author: kpro...@google.com Date: Wed May 20 06:36:47 2009 New Revision: 5438 Modified: trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java trunk/tools/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java Log: MakeTopLevelHtmlForPerm had some inconsistencies in which methods were static and which weren't. This resulted in inconsistent-looking code in SoycDashboard, which calls a number of the methods in MakeTopLevelHtmlForPerm. This patch makes all these methods non-static. Patch by: kprobst Review by: spoon Modified: trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java == --- trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java (original) +++ trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java Wed May 20 06:36:47 2009 @@ -131,7 +131,7 @@ return escaped; } - public static void makeBreakdownShell(SizeBreakdown breakdown) + public void makeBreakdownShell(SizeBreakdown breakdown) throws IOException { // this will contain the place holder iframes where the actual information // is going to go. @@ -249,7 +249,7 @@ outFile.close(); } - public static void makeCodeTypeClassesHtmls(SizeBreakdown breakdown) + public void makeCodeTypeClassesHtmls(SizeBreakdown breakdown) throws IOException { HashMapString, CodeCollection nameToCodeColl = breakdown.nameToCodeColl; @@ -344,7 +344,7 @@ } } - public static void makeLiteralsClassesTableHtmls(SizeBreakdown breakdown) + public void makeLiteralsClassesTableHtmls(SizeBreakdown breakdown) throws IOException { MapString, LiteralsCollection nameToLitColl = breakdown.nameToLitColl; @@ -455,7 +455,7 @@ } } - public static void makeStringLiteralsClassesTableHtmls(SizeBreakdown breakdown) + public void makeStringLiteralsClassesTableHtmls(SizeBreakdown breakdown) throws IOException { MapString, LiteralsCollection nameToLitColl = breakdown.nameToLitColl; @@ -578,7 +578,7 @@ } } - public static void makeTopLevelShell() throws IOException { + public void makeTopLevelShell() throws IOException { PrintWriter outFile = new PrintWriter(SoycDashboard-index.html); outFile.println(!DOCTYPE HTML PUBLIC \-//IETF//DTD HTML//EN\); @@ -781,7 +781,7 @@ return outFileName; } - private static String makeLiteralsHtml(SizeBreakdown breakdown, + private String makeLiteralsHtml(SizeBreakdown breakdown, MapString, LiteralsCollection nameToLitColl) throws IOException { String outFileName = breakdown.getId() + _literalsBreakdown.html; float maxSize = 0f; @@ -858,7 +858,7 @@ return outFileName; } - private static String makePackageHtml(SizeBreakdown breakdown) + private String makePackageHtml(SizeBreakdown breakdown) throws FileNotFoundException { String outFileName = breakdown.getId() + _ + packageBreakdown.html; MapString, Float packageToPartialSize = breakdown.packageToPartialSize; @@ -931,7 +931,7 @@ return outFileName; } - private static String makeStringLiteralsHtml(SizeBreakdown breakdown, + private String makeStringLiteralsHtml(SizeBreakdown breakdown, MapString, LiteralsCollection nameToLitColl) throws IOException { String outFileName = breakdown.getId() + _stringLiteralsBreakdown.html; final PrintWriter outFile = new PrintWriter(outFileName); Modified: trunk/tools/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java == --- trunk/tools/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java (original) +++ trunk/tools/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java Wed May 20 06:36:47 2009 @@ -212,12 +212,12 @@ MakeTopLevelHtmlForPerm makeTopLevelHtmlForPerm, SizeBreakdown breakdown) throws IOException { makeTopLevelHtmlForPerm.makePackageClassesHtmls(breakdown); -MakeTopLevelHtmlForPerm.makeCodeTypeClassesHtmls(breakdown); -MakeTopLevelHtmlForPerm.makeLiteralsClassesTableHtmls(breakdown); -MakeTopLevelHtmlForPerm.makeStringLiteralsClassesTableHtmls(breakdown); +makeTopLevelHtmlForPerm.makeCodeTypeClassesHtmls(breakdown); +makeTopLevelHtmlForPerm.makeLiteralsClassesTableHtmls(breakdown); +makeTopLevelHtmlForPerm.makeStringLiteralsClassesTableHtmls(breakdown); makeTopLevelHtmlForPerm.makeSplitPointClassesHtmls(); -MakeTopLevelHtmlForPerm.makeBreakdownShell(breakdown); -MakeTopLevelHtmlForPerm.makeTopLevelShell(); +makeTopLevelHtmlForPerm.makeBreakdownShell(breakdown); +makeTopLevelHtmlForPerm.makeTopLevelShell(); } private static DefaultHandler parseXMLDocument() { --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Small clean-up in SOYC dashboard
Thanks, commited to trunk as r5438. On Wed, May 20, 2009 at 9:29 AM, sp...@google.com wrote: LGTM. There was earlier a reason for some to be non-static, then that got removed through the review process, and then I forgot to make them consistent again. http://gwt-code-reviews.appspot.com/34813 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5439 - Merging /trunk r4820 into /releases/1.6.
Author: j...@google.com Date: Wed May 20 06:49:41 2009 New Revision: 5439 Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java releases/1.6/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java Log: Merging /trunk r4820 into /releases/1.6. Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java == --- releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java (original) +++ releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java Wed May 20 06:49:41 2009 @@ -389,8 +389,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: releases/1.6/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java == --- releases/1.6/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java (original) +++ releases/1.6/user/test/com/google/gwt/user/client/ui/RadioButtonTest.java Wed May 20 06:49:41 2009 @@ -15,6 +15,7 @@ */ package com.google.gwt.user.client.ui; +import com.google.gwt.dom.client.Element; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.junit.client.GWTTestCase; @@ -210,4 +211,22 @@ //InputElement r1Radio = InputElement.as(Element.as(radioButton.getElement().getFirstChild())); //return r1Radio; // } + + /** + * 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] r5440 - Merging /trunk r5230 into /releases/1.6.
Author: j...@google.com Date: Wed May 20 06:50:05 2009 New Revision: 5440 Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozilla.java releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java releases/1.6/user/src/com/google/gwt/dom/client/DOMImplSafari.java releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java Log: Merging /trunk r5230 into /releases/1.6. 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 Wed May 20 06:50:05 2009 @@ -15,6 +15,7 @@ */ package com.google.gwt.dom.client; + /** * Mozilla implementation of StandardBrowser. */ @@ -66,6 +67,15 @@ }-*/; @Override + public int getScrollLeft(Element elem) { +if (!isGecko19() isRTL(elem)) { + return super.getScrollLeft(elem) + - (elem.getScrollWidth() - elem.getClientWidth()); +} +return super.getScrollLeft(elem); + } + + @Override public native boolean isOrHasChild(Element parent, Element child) /*-{ // For more information about compareDocumentPosition, see: // http://www.quirksmode.org/blog/archives/2006/01/contains_for_mo.html @@ -78,6 +88,14 @@ }-*/; @Override + public void setScrollLeft(Element elem, int left) { +if (!isGecko19() isRTL(elem)) { + left += elem.getScrollWidth() - elem.getClientWidth(); +} +super.setScrollLeft(elem, left); + } + + @Override public native String toString(Element elem) /*-{ // Basic idea is to use the innerHTML property by copying the node into a // div and getting the innerHTML @@ -130,5 +148,21 @@ return doc.getBoxObjectFor(elem).screenY - doc.getBoxObjectFor(doc.documentElement).screenY; } + }-*/; + + private native boolean isGecko19() /*-{ +var result = /rv:([0-9]+)\.([0-9]+)/.exec(navigator.userAgent.toLowerCase()); +if (result result.length == 3) { + var version = (parseInt(result[1]) * 1000) + parseInt(result[2]); + if (version = 1009) { +return true; + } +} +return false; + }-*/; + + private native boolean isRTL(Element elem) /*-{ +var style = elem.ownerDocument.defaultView.getComputedStyle(elem, null); +return style.direction == 'rtl'; }-*/; } Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java == --- releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java Wed May 20 06:50:05 2009 @@ -64,7 +64,7 @@ elem.appendChild(elem.ownerDocument.createTextNode(text)); } }-*/; - + private native int getAbsoluteLeftImpl(Element viewport, Element elem) /*-{ var doc = elem.ownerDocument; var style = doc.defaultView.getComputedStyle(elem, null); Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImplSafari.java == --- releases/1.6/user/src/com/google/gwt/dom/client/DOMImplSafari.java (original) +++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImplSafari.java Wed May 20 06:50:05 2009 @@ -236,6 +236,6 @@ } private native boolean isRTL(Element elem) /*-{ -return $wnd.getComputedStyle(elem).direction == 'rtl'; +return elem.ownerDocument.defaultView.getComputedStyle(elem, '').direction == 'rtl'; }-*/; } Modified: releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java == --- releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java (original) +++ releases/1.6/user/test/com/google/gwt/dom/client/ElementTest.java Wed May 20 06:50:05 2009 @@ -142,13 +142,23 @@ // correctly in RTL mode. outer.getStyle().setProperty(overflow, scroll); +inner.getStyle().setProperty(position, absolute); +inner.getStyle().setProperty(top, 0px); +inner.getStyle().setProperty(left, 0px); +inner.getStyle().setProperty(right, 0px); inner.getStyle().setProperty(marginTop, 800px); inner.getStyle().setProperty(marginRight, 800px); outer.appendChild(inner); Document.get().getBody().appendChild(outer); -inner.setInnerText(:-)); outer.setDir(rtl); + +// FF2 does not render scroll bars reliably in RTL, so we set a large +// content to force the scroll bars. +String content = ++ sss + + sss; +
[gwt-contrib] [google-web-toolkit commit] r5441 - Updating branch-info again.
Author: j...@google.com Date: Wed May 20 06:51:52 2009 New Revision: 5441 Modified: releases/1.6/branch-info.txt Log: Updating branch-info again. Modified: releases/1.6/branch-info.txt == --- releases/1.6/branch-info.txt(original) +++ releases/1.6/branch-info.txtWed May 20 06:51:52 2009 @@ -57,6 +57,8 @@ /trunk revision c5333 was merged (r5429) into this branch /trunk revision c5398 was merged (r5430) into this branch /releases/1.6 [r5408:5410 r5411:5422 r5423:5424] was merged into trunk (no changes in these ranges) +/trunk revision c4820 was merged (r5439) into this branch +/trunk revision c5230 was merged (r5440) into this branch The next merge into trunk will be: svn merge -r5430: https://google-web-toolkit.googlecode.com/svn/releases/1.6 . --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] split up long var lines
Reviewers: jgw, Description: Per issue 3455, split up very long var lines to avoid a new Webkit bug. This also adds a CompilerParameters module. It looks useful for testing to be able to tune way down compiler settings such as this one. Please review this at http://gwt-code-reviews.appspot.com/33826 Affected files: dev/core/src/com/google/gwt/dev/CompilePerms.java dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java dev/core/src/com/google/gwt/dev/js/JsBreakUpLargeVarStatements.java user/src/com/google/gwt/core/CompilerParameters.gwt.xml user/src/com/google/gwt/core/Core.gwt.xml user/test/com/google/gwt/emultest/EmulSuite.gwt.xml --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: add -out to SoycDashboard
Thanks. Committed at r5442. http://gwt-code-reviews.appspot.com/33825 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5442 - Adds a -out argument to SoycDashboard specifying
Author: sp...@google.com Date: Wed May 20 07:16:36 2009 New Revision: 5442 Modified: trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java trunk/tools/soyc-vis/src/com/google/gwt/soyc/Settings.java trunk/tools/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java Log: Adds a -out argument to SoycDashboard specifying the directory to generate the HTML into. Review by: kprobst Modified: trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java == --- trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java (original) +++ trunk/tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java Wed May 20 07:16:36 2009 @@ -149,21 +149,21 @@ } String inputFileName = roundedCorners.css; File inputFile = new File(classPath + inputFileName); -File outputFile = new File(roundedCorners.css); +File outputFile = getOutFile(roundedCorners.css); copyFileOrDirectory(inputFile, outputFile, classPath, inputFileName, false); inputFileName = classLevel.css; File inputFile2 = new File(classPath + inputFileName); -File outputFile2 = new File(classLevel.css); +File outputFile2 = getOutFile(classLevel.css); copyFileOrDirectory(inputFile2, outputFile2, classPath, inputFileName, false); inputFileName = images; File inputDir = new File(classPath + images); -File outputDir = new File(images); +File outputDir = getOutFile(images); copyFileOrDirectory(inputDir, outputDir, classPath, inputFileName, true); -final PrintWriter outFile = new PrintWriter(shellFileName(breakdown)); +final PrintWriter outFile = new PrintWriter(getOutFile(shellFileName(breakdown))); outFile.println(!DOCTYPE HTML PUBLIC \-//IETF//DTD HTML//EN\); outFile.println(html); outFile.println(head); @@ -279,7 +279,7 @@ } } - final PrintWriter outFile = new PrintWriter(outFileName); + final PrintWriter outFile = new PrintWriter(getOutFile(outFileName)); outFile.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\); outFile.println(\http://www.w3.org/TR/html4/strict.dtd\;); @@ -351,8 +351,8 @@ for (String literalType : nameToLitColl.keySet()) { String outFileName = literalType + Lits.html; - final PrintWriter outFile = new PrintWriter(breakdown.getId() + _ - + outFileName); + final PrintWriter outFile = new PrintWriter(getOutFile(breakdown.getId() + + _ + outFileName)); outFile.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\); outFile.println(\http://www.w3.org/TR/html4/strict.dtd\;); @@ -461,8 +461,8 @@ for (String literalType : nameToLitColl.get(string).stringTypeToSize.keySet()) { String outFileName = literalType + Strings.html; - final PrintWriter outFile = new PrintWriter(breakdown.getId() + _ - + outFileName); + final PrintWriter outFile = new PrintWriter(getOutFile(breakdown.getId() + + _ + outFileName)); outFile.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\); outFile.println(\http://www.w3.org/TR/html4/strict.dtd\;); @@ -579,7 +579,8 @@ } public void makeTopLevelShell() throws IOException { -PrintWriter outFile = new PrintWriter(SoycDashboard-index.html); +PrintWriter outFile = new PrintWriter( +getOutFile(SoycDashboard-index.html)); outFile.println(!DOCTYPE HTML PUBLIC \-//IETF//DTD HTML//EN\); outFile.println(html); @@ -703,6 +704,15 @@ } } + /** + * Return a {...@link File} object for a file to be emitted into the output + * directory. + */ + private static File getOutFile(String localFileName) { +File outDir = new File(GlobalInformation.settings.out.get()); +return new File(outDir, localFileName); + } + private static String makeCodeTypeHtml(SizeBreakdown breakdown, MapString, CodeCollection nameToCodeColl) throws IOException { String outFileName = breakdown.getId() + _codeTypeBreakdown.html; @@ -725,7 +735,7 @@ } } -final PrintWriter outFile = new PrintWriter(outFileName); +final PrintWriter outFile = new PrintWriter(getOutFile(outFileName)); outFile.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\); outFile.println(\http://www.w3.org/TR/html4/strict.dtd\;); @@ -802,7 +812,7 @@ } } -final PrintWriter outFile = new PrintWriter(outFileName); +final PrintWriter outFile = new PrintWriter(getOutFile(outFileName)); outFile.println(!DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01//EN\); outFile.println(\http://www.w3.org/TR/html4/strict.dtd\;); @@ -874,7 +884,7 @@ } } -final PrintWriter outFile = new PrintWriter(outFileName); +final PrintWriter outFile = new PrintWriter(getOutFile(outFileName));
[gwt-contrib] Re: split up long var lines
It is still possible for super-deep expressions to come out of the compiler. As yet it is not a practical problem, however. The depth limit is 1. We are only bumping into such a large limit because of the unusual encoding used for var statements. That said, if it's a practical problem, would could de-deepen trees in general. However, it is actually a little bit tricky to do this in general and also preserve order of evaluation, so it would take multiple days to develop. http://gwt-code-reviews.appspot.com/33826/diff/1/6 File dev/core/src/com/google/gwt/dev/js/JsBreakUpLargeVarStatements.java (right): http://gwt-code-reviews.appspot.com/33826/diff/1/6#newcode34 Line 34: * trouble on Safari 4 and possibly other Webkit-based browsers. See Issue 3455. My mistake. The comments need to indicate the JS engine being the problem. http://gwt-code-reviews.appspot.com/33826 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Patch for issue 3279
Thanks for getting back to me on this. I'll respond to the 5 issues here, saving the first issue for last, as it's the longest and it's easier to just skip over if it's not important to you, or if you wholeheartedly agree or disagree with me. (ii) BitSet.toString() is incorrect because it does not check for -1 as return value of nextSetBit(..) I think the confusion here is with the length() method. Sun's Java documentation says BitSet's length() method returns the logical length. Which they define as the last set bit + 1. So there are two cases 1) length is 0, there are not set bits, we return empty 2) length is not 0, we call nextSetBit for the first set bit, there must be at least one I also check during the loop. I've attached comments here on lines 940, 941, 947, and 950 to point this out. They say if someone is confused by your code, you should rewrite it to be clearer, but half the problem is Sun's confusing definition of length(). I've edited some comments into my local copy to clarify this, but would you prefer I rewrite it to be clearer? (iii) BitSetTest.java: remove the LONG_TEST variable and the code corresponding to !LONG_TEST. I meant to ask about that. I tossed that in at the last second when I realized my test cases were too long. I wasn't sure if your test suite was run after every change, in which case a much shorter test can do nearly as good of a check. I will do as you suggested in regards to this. (iv) instead of the following pattern in BitSetTest... Will do. (v) The test cases are pretty long. Factor them out wherever possible. Will do. I could probably also find other ways to simplify the testing without compromising the tests. I'll look over it again. I have a few other inline comments. Thanks, I see them, and I'll fix those spots now. I've replied to some of those comments in case you were curious. (i) Can you refactor some of the code in BitSet.java to make it more concise? For example, can't you write andNot in terms of flip, and, and length methods? Please do this for other methods as well where doing so will not have significant performance penalty. Like I said earlier, I saved this for last so you could skip over it at any point if you wholeheartedly agree or disagree with me. I to answer in the negative here, but I believe it is unwise to replace any of the bitwise operator implementations with simpler calls to other methods. I understand code reuse is important because it cuts down on the number bugs and fixes needed. /Any/ of these bitwise operations could be implemented more simply with the other bitwise methods. However, aside from performance issues, the problem of memory usage repeatedly comes up. With general purpose sorting functions, we assume memory is an issue so that the programmer calling the function doesn't have to worry if she will run out of memory. This mindset is also important with BitSet, as one of the major reasons for using it is to operate on large binary sets. We don't know if memory is an issue, but we should avoid causing trouble for programmers who use BitSet in this way. I will go through these one at a time, in case I'm overlooking an obvious solution that will allow reuse in these cases. andNot: We can, as you suggested, implement andNot using and, flip, and length. But we can not modify the set passed in, so we need a second set of equal length: BitSet clone = (BitSet)set.clone(); clone.flip(0, length()); and(clone); Nothing of this sort happens in Java's BitSet. This unexpected memory spike is dangerous to the unsuspecting programmer. This can be done in memory with De Morgan's law, however it now takes three bitwise operations: //length can shorten, but it shouldn't, so save it int length = Math.max(length(), set.length()); flip(0, length); or(set); flip(0, length); At this point it's iterating through and modifying the memory of the array three times. Twice with ~ operations, and once with | operations. This is exactly three times the work, and it is likely 3 times slower. Of course this will vary depending on the JavaScript vm, but I believe it falls under the category of significant performance penalty. and and or: Using De Morgans law, and can be implemented with flips and ors: int length = Math.max(length(), set.length()); BitSet clone = (BitSet)set.clone(); flip(0, length); clone.flip(0, length); and(clone); flip(0, length); I was attempting to work out a way to do this without extra memory, but unless I'm overlooking something, it's too complicated to be a reasonable solution performance wise. The exact same problems come up with or. We can implement it with just flips and ands, but we have the exact same problems. xor: This is by far the messiest. It's probably impossible to do in memory, but just for completion sake, xor(a, b) could be done using flip (as a not) and and or or. Using and: (a and !b) or
[gwt-contrib] Re: split up long var lines
I'm also concerned that it only splits var statements; are we sure GWT won't generate too deep expressions on other kind of statements? http://gwt-code-reviews.appspot.com/33826/diff/1/6 File dev/core/src/com/google/gwt/dev/js/JsBreakUpLargeVarStatements.java (right): http://gwt-code-reviews.appspot.com/33826/diff/1/6#newcode34 Line 34: * trouble on Safari 4 and possibly other Webkit-based browsers. See Issue 3455. It's actually not about WebKit but JS engine. I've just tested an app that fails in Adobe AIR 1.5.1 (Squirrelfish) with the Expression too deep error but works OK in both Safari 4 Beta (version 528.16, using AFAICT Nitro, aka Squirrelfish Extreme) and Android (emulator from SDK 1.5_r1, using a target=3 AVD; I thought it'd have failed in this one, is Android using V8?). http://gwt-code-reviews.appspot.com/33826 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: split up long var lines
As a practical example, ClientBundle can already generate deep expressions for Css resource injection that exhaust the stack space of the JVM when compiling. You end up with something like: var cssText = a + b + c + . (hundreds) which produces a very deeply nested binary expression tree. -Ray On Wed, May 20, 2009 at 9:04 AM, sp...@google.com wrote: It is still possible for super-deep expressions to come out of the compiler. As yet it is not a practical problem, however. The depth limit is 1. We are only bumping into such a large limit because of the unusual encoding used for var statements. That said, if it's a practical problem, would could de-deepen trees in general. However, it is actually a little bit tricky to do this in general and also preserve order of evaluation, so it would take multiple days to develop. http://gwt-code-reviews.appspot.com/33826/diff/1/6 File dev/core/src/com/google/gwt/dev/js/JsBreakUpLargeVarStatements.java (right): http://gwt-code-reviews.appspot.com/33826/diff/1/6#newcode34 Line 34: * trouble on Safari 4 and possibly other Webkit-based browsers. See Issue 3455. My mistake. The comments need to indicate the JS engine being the problem. http://gwt-code-reviews.appspot.com/33826 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Speed up escapeXml methods
Reviewers: kprobst, Description: Convert \['] into their XML equivalents without using the (very slow) String.replaceAll method. Please review this at http://gwt-code-reviews.appspot.com/34814 Affected files: dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java dev/core/src/com/google/gwt/dev/util/Util.java --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5444 - Note merge of trunk c5347
Author: rj...@google.com Date: Wed May 20 13:07:16 2009 New Revision: 5444 Modified: releases/1.6/branch-info.txt Log: Note merge of trunk c5347 Modified: releases/1.6/branch-info.txt == --- releases/1.6/branch-info.txt(original) +++ releases/1.6/branch-info.txtWed May 20 13:07:16 2009 @@ -59,6 +59,7 @@ /releases/1.6 [r5408:5410 r5411:5422 r5423:5424] was merged into trunk (no changes in these ranges) /trunk revision c4820 was merged (r5439) into this branch /trunk revision c5230 was merged (r5440) into this branch +/trunk revision c5347 was merged (r5443) into this branch (removes broken test from c5333) The next merge into trunk will be: svn merge -r5430: https://google-web-toolkit.googlecode.com/svn/releases/1.6 . --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Add @external to CssResource
Reviewers: , Description: This patch adds an @external directive to the CSS system to allow for selective non-obfuscation of identifiers and to bypass strict-mode checks. Please review this at http://gwt-code-reviews.appspot.com/33827 Affected files: user/src/com/google/gwt/resources/client/CssResource.java user/src/com/google/gwt/resources/css/CssGenerationVisitor.java user/src/com/google/gwt/resources/css/GenerateCssAst.java user/src/com/google/gwt/resources/css/ast/CssExternalSelectors.java user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java user/src/com/google/gwt/resources/css/ast/CssVisitor.java user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java user/src/com/google/gwt/resources/rg/CssResourceGenerator.java user/test/com/google/gwt/resources/client/CSSResourceTest.java user/test/com/google/gwt/resources/client/test.css user/test/com/google/gwt/resources/client/unrelatedDescendants.css --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Speed up escapeXml methods
LGTM Like you mentioned, with a more intrusive change we might (in the future) be able to get away without ever converting to/from String. http://gwt-code-reviews.appspot.com/34814 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Speed up escapeXml methods
http://gwt-code-reviews.appspot.com/34814/diff/1/2 File dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java (right): http://gwt-code-reviews.appspot.com/34814/diff/1/2#newcode406 Line 406: private static String escapeXml(String unescaped) { Should this instead use the one in Util (making that one public)? http://gwt-code-reviews.appspot.com/34814/diff/1/2#newcode423 Line 423: char c = unescaped.charAt(index + 1); You need to check for being at the end of the string here, right? http://gwt-code-reviews.appspot.com/34814 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Speed up escapeXml methods
http://gwt-code-reviews.appspot.com/34814/diff/1/2 File dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java (right): http://gwt-code-reviews.appspot.com/34814/diff/1/2#newcode423 Line 423: char c = unescaped.charAt(index + 1); On 2009/05/20 20:47:23, jat wrote: You need to check for being at the end of the string here, right? Nevermind. http://gwt-code-reviews.appspot.com/34814 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5447 - Merging trunk c5445 into this branch.
Author: sco...@google.com Date: Wed May 20 14:35:08 2009 New Revision: 5447 Added: branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorder.java - copied, changed from r5414, /branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorderImpl.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorder.java - copied, changed from r5414, /branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorderImpl.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorder.java - copied, changed from r5414, /branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java Removed: branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/SplitPointRecorder.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/StoryRecorder.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorderImpl.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorderImpl.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java Modified: branches/snapshot-2009.05.12-r5406/branch-info.txt branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/AbstractLinker.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/CompilationAnalysis.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/SyntheticArtifact.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/impl/StandardCompilationAnalysis.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/dev/jjs/JJSOptions.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/dev/jjs/JJSOptionsImpl.java branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java Log: Merging trunk c5445 into this branch. Modified: branches/snapshot-2009.05.12-r5406/branch-info.txt == --- branches/snapshot-2009.05.12-r5406/branch-info.txt (original) +++ branches/snapshot-2009.05.12-r5406/branch-info.txt Wed May 20 14:35:08 2009 @@ -6,3 +6,4 @@ /branches/snapshot-2009.05.12-r5406 was created (r5412) as a straight copy from /trunk/@5406 Merges: +/trunk c5445 was merged into this branch Modified: branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/AbstractLinker.java == --- branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/AbstractLinker.java (original) +++ branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/AbstractLinker.java Wed May 20 14:35:08 2009 @@ -38,7 +38,7 @@ */ protected final SyntheticArtifact emitBytes(TreeLogger logger, byte[] what, String partialPath) throws UnableToCompleteException { -return new SyntheticArtifact(logger, getClass(), partialPath, what); +return new SyntheticArtifact(getClass(), partialPath, what); } /** @@ -53,7 +53,7 @@ */ protected final SyntheticArtifact emitBytes(TreeLogger logger, byte[] what, String partialPath, long lastModified) throws UnableToCompleteException { -return new SyntheticArtifact(logger, getClass(), partialPath, what, lastModified); +return new SyntheticArtifact(getClass(), partialPath, what, lastModified); } /** Modified: branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/CompilationAnalysis.java == --- branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/CompilationAnalysis.java (original) +++ branches/snapshot-2009.05.12-r5406/dev/core/src/com/google/gwt/core/ext/linker/CompilationAnalysis.java Wed May 20 14:35:08 2009 @@ -17,8 +17,6 @@ import com.google.gwt.core.ext.Linker; -import java.io.File; - /** * Represents analysis data for a CompilationResult. */ @@ -31,17 +29,17 @@ /** * @return a file of dependencies */ - public abstract File getDepFile(); + public abstract EmittedArtifact getDepFile(); /** * @return a file of split points */ - public abstract File getSplitPointsFile(); + public abstract EmittedArtifact getSplitPointsFile(); /** * @return a file of stories */ - public abstract File
[gwt-contrib] Re: Add @external to CssResource
http://gwt-code-reviews.appspot.com/33827/diff/1/12 File user/src/com/google/gwt/resources/client/CssResource.java (right): http://gwt-code-reviews.appspot.com/33827/diff/1/12#newcode229 Line 229: * recommended as the default behavior for CssResources. hindsightShould have made it the default behavior, and provided @Lenient/hindsight http://gwt-code-reviews.appspot.com/33827/diff/1/10 File user/src/com/google/gwt/resources/css/GenerateCssAst.java (right): http://gwt-code-reviews.appspot.com/33827/diff/1/10#newcode420 Line 420: Collections.addAll(externals.getClasses(), parts); It's creepy that CssExternalSelectors's classes list is externally modifiable. Any reason not to give it a CollectionString constructor arg? http://gwt-code-reviews.appspot.com/33827/diff/1/9 File user/src/com/google/gwt/resources/css/ast/CssExternalSelectors.java (right): http://gwt-code-reviews.appspot.com/33827/diff/1/9#newcode24 Line 24: * subject to obfuscation requirements. @see CssResource.External http://gwt-code-reviews.appspot.com/33827/diff/1/7 File user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java (right): http://gwt-code-reviews.appspot.com/33827/diff/1/7#newcode135 Line 135: public boolean visit(CssExternalSelectors x, Context ctx) { I loves me a good Visitor. http://gwt-code-reviews.appspot.com/33827/diff/1/8 File user/src/com/google/gwt/resources/css/ast/CssVisitor.java (right): http://gwt-code-reviews.appspot.com/33827/diff/1/8#newcode21 Line 21: * The base class for visiting a CSS tree. Please document what happens when the visit methods return true or false. (Up here is fine, copy / paste on each and every seems silly.) Also document how to kick off a traversal. Are these only used for traversal, or will you sometimes just visit a single node for double dispatch purposes? If both, doc for both would be nice. Not asking for a novel, but a recipe line or two. If that doc already exists somewhere else, this would be a good place to have a link to it. http://gwt-code-reviews.appspot.com/33827/diff/1/11 File user/src/com/google/gwt/resources/rg/CssResourceGenerator.java (right): http://gwt-code-reviews.appspot.com/33827/diff/1/11#newcode105 Line 105: static class ClassRenamer extends CssVisitor { Should really pull this out into ClassRenamer.java. (Not in this patch.) http://gwt-code-reviews.appspot.com/33827/diff/1/11#newcode107 Line 107: private final MapString, MapJMethod, String classReplacementsWithPrefix; It would be nice to have doc explaining this map. Tell us that the outer key is the prefix, the inner key the replacement name. And tell us what the prefix is, I can't figure out where it comes from. http://gwt-code-reviews.appspot.com/33827/diff/1/11#newcode120 Line 120: this.classReplacementsWithPrefix = classReplacementsWithPrefix; defensive copy would be wise. http://gwt-code-reviews.appspot.com/33827/diff/1/11#newcode1511 Line 1511: + method.getName() + () is missing the @Strict annotation.); You're going to scold me if I set a system wide force-strict flag, but don't provide a redundant annotation on every method? What did I ever do to you? Also, comment above implies the opposite warning does already have the @Strict. http://gwt-code-reviews.appspot.com/33827/diff/1/4 File user/test/com/google/gwt/resources/client/test.css (right): http://gwt-code-reviews.appspot.com/33827/diff/1/4#newcode212 Line 212: /* The @external parser attempts to be flexible */ Mad man. So I could do @external able baker; .able, .baker, .charlie { border: green; } and only able and baker will be externalized? Is that documented? Is that particular case worth testing? http://gwt-code-reviews.appspot.com/33827 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: SOYC story recording without indentation, with string builders
LGTM. BTW: if you want to go the extra mile, you can get even more speed up by reusing the StringBuilder. Call setLength(0) to start fresh, but it retains the internal char buffer so you can avoid tons of allocations. You could probably either pass a reusable buffer through as a param, or keep an instance var if you're careful about it. There's a similar trick to avoid the implicit allocation in pw.print(sb.toString());. You use your own reusable char[] to transfer the data. For an example, see: http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/core/linker/SymbolMapsLinker.java#112 May not be worth it since this is only for -soyc compiles; I did it for SymbolMapsLinker because that runs during every compile. http://gwt-code-reviews.appspot.com/34815/diff/1/2 File dev/core/src/com/google/gwt/core/ext/soyc/impl/StoryRecorderImpl.java (right): http://gwt-code-reviews.appspot.com/34815/diff/1/2#newcode74 Line 74: //private HtmlTextOutput htmlOut; Might as well delete rather than just comment out. http://gwt-code-reviews.appspot.com/34815 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] patch to allow forcing NumberFormat to use latin digits/separators
Reviewers: andreasst_google.com, Description: This patch allows an app to force use of latin digits/separators instead of localized digits. Please review this at http://gwt-code-reviews.appspot.com/34816 Affected files: user/src/com/google/gwt/i18n/client/NumberFormat.java user/test/com/google/gwt/i18n/client/NumberFormat_ar_Test.java --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] RadioButtons were not sinking click events
Reviewers: scottb, Description: Fix for http://code.google.com/p/google-web-toolkit/issues/detail?id=3679 Please review this at http://gwt-code-reviews.appspot.com/34817 Affected files: user/src/com/google/gwt/user/client/ui/RadioButton.java Index: user/src/com/google/gwt/user/client/ui/RadioButton.java === --- user/src/com/google/gwt/user/client/ui/RadioButton.java (revision 5346) +++ user/src/com/google/gwt/user/client/ui/RadioButton.java (working copy) @@ -63,7 +63,8 @@ public RadioButton(String name) { super(DOM.createInputRadio(name)); setStyleName(gwt-RadioButton); - + +sinkEvents(Event.getTypeInt(ClickEvent.getType().getName())); sinkEvents(Event.getTypeInt(MouseUpEvent.getType().getName())); sinkEvents(Event.getTypeInt(BlurEvent.getType().getName())); sinkEvents(Event.getTypeInt(KeyDownEvent.getType().getName())); --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: patch to allow forcing NumberFormat to use latin digits/separators
LGTM http://gwt-code-reviews.appspot.com/34816 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RadioButtons were not sinking click events
LGTM http://gwt-code-reviews.appspot.com/34817 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit Contributors group. To post to this group, send email to Google-Web-Toolkit-Contributors@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit-contributors+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit-Contributors?hl=en -~--~~~~--~~--~--~---
[gwt-contrib] Re: patch to allow forcing NumberFormat to use latin digits/separators
On Thu, May 21, 2009 at 12:19 AM, andrea...@google.com wrote: LGTM Thanks, committed to trunk in r5450. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5450 - Allow an app to force use of latin digits/separators instead
Author: j...@google.com Date: Wed May 20 21:41:21 2009 New Revision: 5450 Modified: trunk/user/src/com/google/gwt/i18n/client/NumberFormat.java trunk/user/test/com/google/gwt/i18n/client/NumberFormat_ar_Test.java Log: Allow an app to force use of latin digits/separators instead of localized digits. Patch by: jat Review by: andreasst Modified: trunk/user/src/com/google/gwt/i18n/client/NumberFormat.java == --- trunk/user/src/com/google/gwt/i18n/client/NumberFormat.java (original) +++ trunk/user/src/com/google/gwt/i18n/client/NumberFormat.java Wed May 20 21:41:21 2009 @@ -306,29 +306,53 @@ */ public class NumberFormat { - // Sets of constants as defined for the default locale. - private static final NumberConstants defaultNumberConstants = LocaleInfo.getCurrentLocale().getNumberConstants(); + // Sets of constants as defined for the current locale from CLDR. + protected static final NumberConstants localizedNumberConstants = LocaleInfo.getCurrentLocale().getNumberConstants(); + + /** + * Current NumberConstants interface to use, see + * {...@link #setForcedLatinDigits(boolean)} for changing it. + */ + protected static NumberConstants defaultNumberConstants = localizedNumberConstants; + + // Cached instances of standard formatters. + private static NumberFormat cachedCurrencyFormat; + private static NumberFormat cachedDecimalFormat; + private static NumberFormat cachedPercentFormat; + private static NumberFormat cachedScientificFormat; + + // Number constants mapped to use latin digits/separators. + private static NumberConstants latinNumberConstants = null; + + // Localized characters for dot and comma in number patterns, used to produce + // the latin mapping for arbitrary locales. Any separator not in either of + // these strings will be mapped to non-breaking space (U+00A0). + private static final String LOCALIZED_COMMA_EQUIVALENTS = .\u060C\u066B\u3001\uFE10\uFE11\uFE50\uFE51\uFF0C\uFF64; + private static final String LOCALIZED_DOT_EQUIVALENTS = .\u2024\u3002\uFE12\uFE52\uFF0E\uFF61; // Constants for characters used in programmatic (unlocalized) patterns. - private static final char PATTERN_ZERO_DIGIT = '0'; - private static final char PATTERN_GROUPING_SEPARATOR = ','; + private static final char CURRENCY_SIGN = '\u00A4'; private static final char PATTERN_DECIMAL_SEPARATOR = '.'; - private static final char PATTERN_PER_MILLE = '\u2030'; - private static final char PATTERN_PERCENT = '%'; private static final char PATTERN_DIGIT = '#'; - private static final char PATTERN_SEPARATOR = ';'; private static final char PATTERN_EXPONENT = 'E'; + private static final char PATTERN_GROUPING_SEPARATOR = ','; private static final char PATTERN_MINUS = '-'; - private static final char CURRENCY_SIGN = '\u00A4'; - private static final char QUOTE = '\''; + private static final char PATTERN_PER_MILLE = '\u2030'; + private static final char PATTERN_PERCENT = '%'; + private static final char PATTERN_SEPARATOR = ';'; + private static final char PATTERN_ZERO_DIGIT = '0'; - // Cached instances of standard formatters. - private static NumberFormat cachedDecimalFormat; - private static NumberFormat cachedScientificFormat; - private static NumberFormat cachedPercentFormat; - private static NumberFormat cachedCurrencyFormat; + private static final char QUOTE = '\''; /** + * @return true if all new NumberFormat instances will use latin digits + * and related characters rather than the localized ones. + */ + public static boolean forcedLatinDigits() { +return defaultNumberConstants != localizedNumberConstants; + } + + /** * Provides the standard currency format for the default locale. * * @return a codeNumberFormat/code capable of producing and consuming @@ -341,7 +365,7 @@ } return cachedCurrencyFormat; } - + /** * Provides the standard currency format for the default locale using a * specified currency. @@ -427,49 +451,184 @@ return cachedScientificFormat; } - // Locale specific symbol collection. - private final NumberConstants numberConstants; + /** + * Specify whether all new NumberFormat instances will use latin digits + * and related characters rather than the localized ones. + * + * @param useLatinDigits true if latin digits/etc should be used, false if + *localized digits/etc should be used. + */ + public static void setForcedLatinDigits(boolean useLatinDigits) { +// Invalidate cached formats if changing +if (useLatinDigits != forcedLatinDigits()) { + cachedCurrencyFormat = null; + cachedDecimalFormat = null; + cachedPercentFormat = null; + cachedScientificFormat = null; +} +if (useLatinDigits) { + if (latinNumberConstants == null) { +latinNumberConstants = createLatinNumberConstants( +